locked
Need Expression For below requirement RRS feed

  • Question

  • Hi,

    me getting from DB value like 1-555(73)

    i just want to show in report  below Output

          555

         (73) means in first line  555 than  next line  (73) .  i am using below expression right now

    =Mid(Fields!AllProgramRates.Value, InStr(Fields ! AllProgramRates.Value,

    which is given output like 555(73) but i want (33) is to be in next line. 

                                         

    "-") + 1, Len(Fields!AllProgramRates.Value))
    Thursday, May 9, 2013 4:40 AM

Answers

  • Thanxs Charlie :)

    It's Working Fine

    Regards,

    Akhil

    • Marked as answer by Akhil_ji Friday, May 10, 2013 12:06 PM
    Friday, May 10, 2013 11:47 AM

All replies

  • Hi,

    use VBCRLF in your expression to bring it to next line..

    just to shown an example,i have hardcoded input string

    =Mid("1-555(73)",InStr("1-555(73)","-")+1,LEN("1-555(73)")-InStr("1-555(73)","("))+VBCRLF+Mid("1-555(73)",InStr("1-555(73)","("),LEN("1-555(73)"))


    sathya --------- Please Mark as answered if my post solved your problem and Vote as helpful if my post was useful.


    Thursday, May 9, 2013 5:01 AM
  • Hi Sathya,

    Sometimes one extra bracket is coming and somtime 3 digit value comes as 2 digit

    73

    (44)

    and

    777(

    (55)

    me using below one

    =Mid(Fields!AllProgramRates.Value,InStr(Fields!AllProgramRates.Value,"-")+1,LEN(Fields!AllProgramRates.Value)-InStr(Fields!AllProgramRates.Value,"("))+VBCRLF+Mid(Fields!AllProgramRates.Value,InStr(Fields!AllProgramRates.Value,"("),LEN(Fields!AllProgramRates.Value))

    Regards,

    Akhil


    • Edited by Akhil_ji Thursday, May 9, 2013 5:41 AM needs
    Thursday, May 9, 2013 5:39 AM
  • Hi Sathya,

    Sometimes one extra bracket is coming and somtime 3 digit value comes as 2 digit

    73

    (44)

    and

    777(

    (55)

    Regards,

    Akhil


    Before using Mid and Instr ,replace 2 brackets as 1 '((' as '('

    sathya --------- Please Mark as answered if my post solved your problem and Vote as helpful if my post was useful.


    Thursday, May 9, 2013 5:42 AM
  • Hi Sathya,

    Not Getting..

    i have to used replace function in that.

    plz send me expression 

    Thursday, May 9, 2013 6:10 AM
  • Hi Sathya,

    Not Getting..

    i have to used replace function in that.

    plz send me expression 

    Hi,

    =Mid(Replace("1-555((73)","((","("),InStr(Replace("1-555((73)","((","("),"-")+1,LEN(Replace("1-555((73)","((","("))-InStr(Replace("1-555((73)","((","("),"("))+VBCRLF+Mid(Replace("1-555((73)","((","("),InStr(Replace("1-555((73)","((","("),"("),LEN(Replace("1-555((73)","((","(")))


    sathya --------- Please Mark as answered if my post solved your problem and Vote as helpful if my post was useful.

    Thursday, May 9, 2013 6:40 AM
  • Hi Sathya,

    Still some where 555 is coming 55 than next line (44) , one last 5 not coming.

    Rest all working

    plz let me know anything is there.

    Thanks!!

    Thursday, May 9, 2013 6:57 AM
  • Hi Akhil,

    Try this link for example on splitting strings into parts - http://smartbipeople.weebly.com/1/post/2011/07/ssrs-midstr-function.html

    and then use VBCRLF to bring the splitted parts into next line.


    sathya --------- Please Mark as answered if my post solved your problem and Vote as helpful if my post was useful.

    Thursday, May 9, 2013 7:03 AM
  • Hi Sathya,

    shared Url Blocked Here :(

    only Full Digit is not coming , if any possibility

    Regards,

    Akhil

    Thursday, May 9, 2013 7:40 AM
  • Hi Sathya,

    shared Url Blocked Here :(

    only Full Digit is not coming , if any possibility

    Regards,

    Akhil

    Hi Akhil,

    below expression will work for both cases,

    73(44)

    555((44)

    =REPLACE(Mid("1-73(44)",InStr("1-73(44)","-")+1,3),"(","")+VBCRLF+REPLACE(Mid("1-73(44)",InStr("1-73(44)","(")),"((","(")+VBCRLF &
    REPLACE(Mid("1-555((44)",InStr("1-555((44)","-")+1,3),"(","")+VBCRLF+REPLACE(Mid("1-555((44)",InStr("1-555((44)","(")),"((","(")

    note: to show both cases i have concatenated expression twice.

    sathya --------- Please Mark as answered if my post solved your problem and Vote as helpful if my post was useful.


    Thursday, May 9, 2013 8:03 AM
  • Hi Akhil,

    You can use the expression below to achieve you requirement.
    =split(Split(Fields!AllProgramRates.Value,"-")(1),"(")(0) & Vbcrlf & "(" & split(Split(Fields!AllProgramRates.Value,"-")(1),"(")(1)

    If you have any questions, please feel free to ask.

    Regards,


    Charlie Liao
    TechNet Community Support

    Friday, May 10, 2013 6:07 AM
  • Thanxs Charlie :)

    It's Working Fine

    Regards,

    Akhil

    • Marked as answer by Akhil_ji Friday, May 10, 2013 12:06 PM
    Friday, May 10, 2013 11:47 AM