In Sql server reporting services the formatting the data is pretty much simple as we have plenty of built in options available for percentage, numbers, decimal, currency etc. So, just them to data format and display the data as you want. Below are most commonly use format for the usual reports.
- c – Currency
- d – Decimal
- n – Number
- p – Percentage.
If you want two decimal places in decimal number then in the format option [Text box properties -> format] then the format should be d2. In percentage if you want two decimal places in percentage then the format is p2 etc.. But, I have tried it some reports, and found not working. Then used the default C# string formats for the data formatting in reports. That is, for two decimal places the format is like 0.00. Then the result data will be two decimal places. Example, 5.67. So, you can try both and use which one is best fit for you.
There are other plenty of formats available and they are completely described here.
http://msdn.microsoft.com/en-us/library/ms252080%28VS.80%29.aspx
This help you to understand the data formatting in SSRS. What do you think?
0 komentar:
Post a Comment