vbtab in reporting services 2008 expression
i am trying to use tabs in reporting service 2008 expression on a particular textbox. i have tried using three tabs (& vbTab & vbTab & vbTab &) between field name and value for two fields. (Line-wrapped for legibility) =iif(Trim(Fields!Field1.Value) <>"","FVE1:" & vbTab & vbTab & Fields!Field1.Value & VbCrLf,"") & iif(Trim(Fields!Field2.Value) <>"","RV:" & vbTab & vbTab & Fields!Field2.Value,"" ) what i am trying to aceive is some thing like this (aligned one below the other) FEV1: 3.29 RV: 0.51 But i am unable to achieve this insted it get like below FEV1: 3.29 RV: 0.51 any help will be much appeiciated. thanks
August 15th, 2012 9:28am

Do you want to right justify the text after the label? If so just use the SPACE(n) where n is string length driven to stuff/pad the whole string equally.Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
August 15th, 2012 9:33am

i have tried this but does not justify the text after the label. =iif(Trim(Fields!Field1.Value) <>"","FVE1:" & Space(10) & Fields!Field1.Value & VbCrLf,"") & iif(Trim(Fields!Field2.Value) <>"","RV:" & Space(10) & Fields!Field2.Value,"" ) any suggestions. am i doing this right? thanks
August 16th, 2012 4:20am

Hi Jai-k, In your scenario, the length of FVE1 string is longer than the length of RV string. So please add more space between field name and value. Please try the expression below: =iif(Trim(Fields!Field1.Value) <>"","FVE1:" & vbTab & vbTab & Fields!Field1.Value & VbCrLf,"") & vbNewLine & iif(Trim(Fields!Field2.Value) <>"","RV:" & vbTab & vbTab & vbTab & vbTab & vbTab & vbTab & Fields!Field2.Value,"" ) Or =iif(Trim(Fields!Field1.Value) <>"","FVE1:" & Space(10) & Fields!Field1.Value & VbCrLf,"") & vbNewLine iif(Trim(Fields!Field2.Value) <>"","RV:" & Space(14) & Fields!Field2.Value,"" ) If you have any questions, please feel free to ask. Regards, Charlie Liao
Free Windows Admin Tool Kit Click here and download it now
August 17th, 2012 2:35am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics