Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSRS Text Box Properties: 2008 Expand / Collapse
Author
Message
Posted Monday, October 29, 2012 2:29 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, February 4, 2014 8:11 AM
Points: 78, Visits: 233
Hi , currently in my reports, i have 3 types of columns.
1. sales 989999
2.sales % 98
3.count 400000

here i need to get the values as
if the value is <999999 then it should be like 9999.99, if it is >999999 it should be same.
so what could be the expression for this?

TR
Niharika



Post #1378153
Posted Monday, October 29, 2012 6:25 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 7:50 AM
Points: 1,234, Visits: 1,273
Try something like:

=IIF(Fields!YourField.Value &lt; 99999, FormatPercent(Fields!YourField.Value), CInt(Fields!YourField.Value))


I haven't tried this, so you may need to play around with this. But it should give you a start.

HTH,
Rob
Post #1378213
Posted Monday, October 29, 2012 6:41 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, February 4, 2014 8:11 AM
Points: 78, Visits: 233
Thanks for the reply ,

problem has moved a bit forward , But strucked over a little change
=iif(Cint(ReportItems!Sales38.Value)>99999,ReportItems!Sales38.Value,FormatNumber(CDbl(ReportItems!Sales38.Value),"N2"))


this is the expression i have written. with help of this am getting values with decimal values
like 76585.23 for some rows 89096.2

Problem is: i need to get 2 decimal points after " . "
can anybody suggest something.


Thanks in advance,
Niharika
Post #1378223
Posted Monday, October 29, 2012 2:05 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 7:50 AM
Points: 1,234, Visits: 1,273
niha.736 (10/29/2012)

problem has moved a bit forward , But strucked over a little change
=IIF(CInt(ReportItems!Sales38.Value) &gt; 99999, ReportItems!Sales38.Value, FormatNumber(CDbl(ReportItems!Sales38.Value),"N2"))


this is the expression i have written. with help of this am getting values with decimal values
like 76585.23 for some rows 89096.2

Problem is: i need to get 2 decimal points after " . "
can anybody suggest something.

Would FormatCurrency() work better for you than FormatNumber()?

Or something like:

=Format(Fields!Sales38.Value, "#,##0.00") 

Good luck,
Rob
Post #1378454
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse