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
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, June 13, 2013 1:07 AM
Points: 70, Visits: 211
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
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, June 17, 2013 6:44 AM
Points: 759, Visits: 802
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
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, June 13, 2013 1:07 AM
Points: 70, Visits: 211
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
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Monday, June 17, 2013 6:44 AM
Points: 759, Visits: 802
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