Link to home
Start Free TrialLog in
Avatar of thayduck
thayduckFlag for United States of America

asked on

SSRS Left Align $

I'm trying to have all dollar signs line up left aligned  (in my $amt text box)  while the values are right aligned without using 2 fields.

Here is an example:

$             6,123.00
$                     1.00
$                   12.22
$                       .35


Is there a way to do this ?
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

afaik not without converting the value to a varchar, and then you lose the ability to SUM the column and do interactive sorts as a number.

Recommend adding the '$' in the column header, or if possible format the column to have the $ display in the first row but not all others below it.
Avatar of thayduck

ASKER

So,  there is no way to change the below current format,  to do what I want ?
Copied from Properties/Format of this textbox.

'$' #,0.00;('$' #,0.00);'-'
SOLUTION
Avatar of Jim Horn
Jim Horn
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
BilledAmt is the actual SQL field with the dollars in it.

I tried below, but nothing shows in BilledAmtx when displayed in report.





CASE LEN(CAST(BilledAmt as varchar(12)))
   WHEN 1 THEN '$            ' + CAST(BilledAmt as varchar(12))
   WHEN 2 THEN '$           ' + CAST(BilledAmt as varchar(12))
   WHEN 3 THEN '$          ' + CAST(BilledAmt as varchar(12))
   WHEN 4 THEN '$         ' + CAST(BilledAmt as varchar(12))
   WHEN 5 THEN '$        ' + CAST(BilledAmt as varchar(12))
   WHEN 6 THEN '$       ' + CAST(BilledAmt as varchar(12))
   WHEN 7 THEN '$      ' + CAST(BilledAmt as varchar(12))
   WHEN 8 THEN '$     ' + CAST(BilledAmt as varchar(12))
   WHEN 9 THEN '$    ' + CAST(BilledAmt as varchar(12))
   WHEN 10THEN '$   ' + CAST(BilledAmt as varchar(12))
   WHEN 11THEN '$  ' + CAST(BilledAmt as varchar(12))
   WHEN 12THEN '$ ' + CAST(BilledAmt as varchar(12))  
   
  END as BilledAmtx
Got above to work but spaces are still removed.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hopefully what I wrote makes sense.

Thanks for your help. It got me pointed in the right direction.