none
Need help with fixed dollar sign in SSRS

    Question

  • I'm trying to have all dollar signs line up left aligned while the values are right aligned without using 2 fields (so that when it exports to excel there aren't two columns).

    Here is an example:


    $             1,0000
    $                     1
    $                  222

    Neither of these line up correctly:

    ="$"& Right(SPACE(25)&Sum(Fields!Myfield.Value), 25)

    ="$"&"                                   "&Sum(Fields!Myfield.Value), 25)

    Any ideas on how to do this in R2?




    Wednesday, April 17, 2013 10:33 PM

Answers

  • Hi,

    Try this way,

    1) Place 2 textboxes inside a rectangle. The rectangle should be the same size as the cell of the matrix

    2) Now put the rectangle inside the datacell of the matrix

    3) In the first text, put the $ and left align it by using the expression --> ="<p align=left>"&"$"

    4) In the secont textbox, put the value and right align it    --> ="<p align=right>"& Fields!c.Value

    P.S. Make sure that the width of the first textbox is less as it just has to accomodate the $ symbol and give more width for the second textbox.

    Take care about the borders and all those stuff..

    This will fix your requirement. 


    Sreekanth Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem.*****

    Friday, April 19, 2013 9:05 AM

All replies

  • Hi 

    What issues do you get when you try 

    ="$"& Right(SPACE(25)&Sum(Fields!Myfield.Value), 25) 

    Regards,

    Vinaya

    Thursday, April 18, 2013 1:54 AM
  • Unless I use a fixed font (which I can't because the customer insists on Arial 10), the spacing is off and the dollar sign does not align.
    Thursday, April 18, 2013 2:31 PM
  • Hi,

    This can be done by the place holder in ssrs. As shown in the below images.

    Use this expression as part the fx          ="<p align=left>"&"$" &"<p align=right>"& Fields!c.Value

    Note: Check the radio button of HTML as shown.



    Sreekanth Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem.*****

    Thursday, April 18, 2013 3:13 PM
  • Not sure what I'm doing wrong - but it's putting the $ on one line (left aligned) and the value down lower a line (right aligned) - I need them to be on the same line.
    Thursday, April 18, 2013 5:03 PM
  • Hi,

    Try this way,

    1) Place 2 textboxes inside a rectangle. The rectangle should be the same size as the cell of the matrix

    2) Now put the rectangle inside the datacell of the matrix

    3) In the first text, put the $ and left align it by using the expression --> ="<p align=left>"&"$"

    4) In the secont textbox, put the value and right align it    --> ="<p align=right>"& Fields!c.Value

    P.S. Make sure that the width of the first textbox is less as it just has to accomodate the $ symbol and give more width for the second textbox.

    Take care about the borders and all those stuff..

    This will fix your requirement. 


    Sreekanth Note: Please vote/mark the post as answered if it answers your question/helps to solve your problem.*****

    Friday, April 19, 2013 9:05 AM
  • TRY SOMETHING LIKE

    "$" & SPACE(23 -Len(ROUND(Fields!.Value,2))) & Sum(Fields!.Value)

    Thursday, September 12, 2013 4:51 PM