Reporting Services fomating a textbox (round)

sesose
Member Posts: 2
hi,
in my reporting services report i have a textbox wich shows the sum of unit prices (=Sum(Fields!Sales_Line__Unit_Price_.Value).
my problem is, i would like to fomat the textbox that it shows me the value without decimal places.
i tried many format codes in the fomat propertie like '########'. This code works but with that i dont have the point of the tousand value.
with that code the output is: 100000 but i would like to have 100.000,-. I also tryed ####.#### but it doesnt work.
have somebody an idea how to fomat it?
thanks, rené
in my reporting services report i have a textbox wich shows the sum of unit prices (=Sum(Fields!Sales_Line__Unit_Price_.Value).
my problem is, i would like to fomat the textbox that it shows me the value without decimal places.
i tried many format codes in the fomat propertie like '########'. This code works but with that i dont have the point of the tousand value.
with that code the output is: 100000 but i would like to have 100.000,-. I also tryed ####.#### but it doesnt work.
have somebody an idea how to fomat it?
thanks, rené
0
Comments
-
I Hate to bring up an old topic but does anyone have a solution for this? My current prices are showing like $46.335 instead of $46.34 ....
The field is called UnitPrice and Unit price has another value in the data set that is UnitPriceFormat that when printed on the report it displays as "#,##0.00" I'm wondering why the format isn't working. Any more info just ask! Sorry if i'm being unclear!-rico19310 -
0
-
-rico19310
-
Are you sure that you dont have a field like
Sales_Line__Unit_PriceFormat
in your dataset?0 -
mohana_cse06 wrote:Are you sure that you dont have a field like
Sales_Line__Unit_PriceFormat
in your dataset?
yup I do.. and when I insert that field into my table above Sales_Line__Unit_Price it does nothing..-rico19310 -
rico1931 wrote:mohana_cse06 wrote:Are you sure that you dont have a field like
Sales_Line__Unit_PriceFormat
in your dataset?
yup I do.. and when I insert that field into my table above Sales_Line__Unit_Price it does nothing..
I didnt get where you have inserted?0 -
mohana_cse06 wrote:rico1931 wrote:mohana_cse06 wrote:Are you sure that you dont have a field like
Sales_Line__Unit_PriceFormat
in your dataset?
yup I do.. and when I insert that field into my table above Sales_Line__Unit_Price it does nothing..
I didnt get where you have inserted?
I put the PriceFormat field in the body section - same table - in the cell above Unit_Price... so its in the same area.. I even tried putt priceformat field in the header everyone in the body and nothing. Can anyone tell me where it's "suppose" to go?-rico19310 -
Can you show the report layout so that we can help you...
you need to add priceformat in the Sales_Line__Unit_Price field format property...0 -
Well here is the thing.. I have a very unique situation. If you see the table in the attachment you'll see that the table has been moved around and modified. Where the red arrow is showing, I have concatenated a series of fields so they show up in one cell ( the reason behind this is long, mostly to do with the picture in the cell to the far left was messing up the format of my data I was trying to return) but here is what is located in the cell...
=Sum(Fields!Sales_Line___Unit_Price_.Value) & vbcrlf & Fields!DM_GetInvoiceDiscPct.Value &" % " & vbcrlf & Fields!DM_GetNetUnitPrice.Value
This evens it all out and looks nice..as you can see in my 2nd attachment
but the "Net Price" format looks all messed up . I added this field "=Fields!Sales_Line___Unit_Price_Format.Value" into the Format property of the cell but it did nothing...i'm all out of ideas!
any suggestions will be tried! I promise!-rico19310 -
you've concatenated text and numbers in the same textbox: the final result will be a text, so the numbering format won't work!if you split your values through different cells, i guess the number format will work correctly. In order to solve your problem, you've to round this value (Fields!DM_GetNetUnitPrice.Value) before sending the value to visual studio with the round function (in the onaftergetrecord trigger of nav, i guess).
If you've problems about value Sum(Fields!Sales_Line___Unit_Price_.Value), you've two ways:
1. round the unit price correctly in nav (and if all the unit prices have 2 decimals, their Sum aggregate will have 2 decimals, obviously)
2. use the round function of visual web developer on your sum function (in the expression menu in visual web dev, view common functions -> math to see its syntax)0 -
Belias wrote:you've concatenated text and numbers in the same textbox: the final result will be a text, so the numbering format won't work!if you split your values through different cells, i guess the number format will work correctly. In order to solve your problem, you've to round this value (Fields!DM_GetNetUnitPrice.Value) before sending the value to visual studio with the round function (in the onaftergetrecord trigger of nav, i guess).
If you've problems about value Sum(Fields!Sales_Line___Unit_Price_.Value), you've two ways:
1. round the unit price correctly in nav (and if all the unit prices have 2 decimals, their Sum aggregate will have 2 decimals, obviously)
2. use the round function of visual web developer on your sum function (in the expression menu in visual web dev, view common functions -> math to see its syntax)
Hey Belias,
As always you come to the rescue! LOL thanks and yes that is a lot closer than I was before using the round function
=Round(Fields!DM_GetNetUnitPrice.Value)
The only thing is that it rounds to the nearest WHOLE int. so a number like 46.335 rounds to 46 ... and I tried the following
Round(Fields!DM_GetNetUnitPrice.Value,#.##0.00) and other combination's of that and I get an error.. I've looked up on
http://msdn.microsoft.com/en-us/library/dd338738.aspx
to try to figure it out but it really doesn't help me much.. have any suggestions on how to specify to Round to nearest hundredth decimal?-rico19310 -
Well since I wasn't the OP can a Mod please mark this as solved or at least a good posting... GRACIAS!-rico19310
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions