Formatting Columns in SSRS Reports

by | Updated August 15, 2016 | Development, Dynamics AX

When working on SSRS reports in the Dynamics AX 2012 reporting framework, a lot of the information comes over from the MorphX Extended Data Types.  However, there are still times when you need to work in SSRS to make the format of the column match what your client requests.

For example, say you are calculating a percentage for your report, and your client wants to have the column display the value to one decimal place.  Also, the requirement is to show 0.0 if the value comes in as 0.  There really are a couple of ways to do this.

1.   From what I have seen, the recommended approach is to use the Format property of the textbox that contains your value.  Set the property to the following:

  • ###,##0.0

 

  • This will put a comma between the hundreds and thousands column (if applicable to the value) and will default 0.0 into the column if the value is 0, otherwise the value will show up with a single decimal place.

 

 2.   Right click on the textbox, and choose Properties from the menu that appears.  This allows you to control the formatting of the text that comes into the textbox based on the type of data (General, number, currency, etc.).  Set the appropriate values based on the Development criteria for your data.

 

3.   You can use an expression to do the work for you.  The expression would be something like the following:

 

  • =Format(Fields!Mypercentfield.Value,”###,##0.0”)

 

  • This will do the same as the first example.

 

So, the question is, why bring this up?  The reason I do so is, what happens if the client decides they want to have a percent sign ‘%’ be displayed after the value?  If you use the formatting method where you set the format on the column, if you try to append a ‘%’ to the value, the report will show #Error in that column.  BUT, if you use the second method, you can do an expression like the following (NO formatting property configuration on the text box):

=Format(Fields!Mypercentfield.Value,”###,##0.0”) + “  %”

 

This gives you additional flexibility in formatting the column, as you are not limiting what goes in the column by using the Format property of the textbox.  I prefer to use the first method, but there are times where that just won’t work.

 

 

Related Posts

  • SSRS in the Parameters Node If you regularly develop Dynamics AX 2012 reports you have likely seen the report parameters displayed in SSRS under the Parameters node.  It is the…

  • If the Debugger will not break in your SQL Server Reporting Services Report and/or you want to speed up the debugging session by not printing the report and only stepping…

  • The other day when I was going through one another check (cheque) customization in AX 2012, I found that there was one more possible solution that I did not discuss…

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Upcoming Events

july

01jul11:00 am12:00 pmConfab Live with Stoneridge – Dataverse Virtual Entities

14jul12:00 pm12:30 pmBeyond Reporting - What Business Intelligence Can Do For Your Agribusiness

15jul10:00 am11:00 amMastering the Production Floor

21jul10:00 am10:30 amThe Modern Manufacturer: Manufacturing Software in the Real World

21jul12:00 pm1:00 pmIs it Worth it to Upgrade to Dynamics 365 Finance and Supply Chain Management? - Everything AX Users Need to Consider

28jul10:00 am10:30 amLot Management for Batch Manufacturers in Life Sciences, Chemical and Food

28jul2:00 pm2:30 pmConsiderations for Successful Testing Plans for Major Releases of Dynamics 365 Finance and Supply Chain Management

29jul11:00 am12:00 pmConfab Live with Stoneridge – Integration Strategies for End User Success

august

04aug2:00 pm2:30 pmSimplifying Payroll and HR Management with ADP Workforce Now

10aug(aug 10)8:00 am11(aug 11)11:00 amPower BI for Dynamics 365 - Online Workshop

11aug10:00 am10:30 amThe Modern Manufacturer - Enterprise Asset Management

11aug12:00 pm12:30 pmBusiness Intelligence with Dynamics 365 Finance and Supply Chain Management – Game Changing Insights and Analytics

11aug2:00 pm2:30 pmUsing Technology to Manage Complex Sales Pricing, Commission, and Rebate Programs

18aug10:00 am11:00 amTop Five Reasons Why NOW is the Right Time to Move from Salesforce to Dynamics 365 Customer Engagement

18aug10:00 am12:00 pmIntro to Power BI for Dynamics 365 Business Central – Online Workshop

18aug12:00 pm1:00 pmSolving the Biggest Challenges in Agribusiness Through Innovation and Technology

About Stoneridge
Stoneridge Software is a unique Microsoft Gold Partner, with emphasis on partner. With specialties in Microsoft Dynamics 365, Microsoft Dynamics AX, Microsoft Dynamics NAV, Microsoft Dynamics GP and Microsoft Dynamics CRM, we focus on attracting the most knowledgeable experts in the field to our team, and prioritize delivering stellar solutions with maximum impact for your business. At Stoneridge, we are deeply committed to your results. Each engagement is met with a dedicated team, ready to provide thorough, tailored, and expert service. Based in Minnesota, we intentionally “step into your shoes,” wherever you are. We focus on what you care about, and develop trusting, long-term relationships with our clients.

Subscribe To Our Blog

Sign up to get periodic updates on the latest posts.

Thank you for subscribing!

X