Report Writer or Word Templates - Change the decimal places for a report field.

A customer has asked me today to change the decimal places to zero on a SOP Invoice in a Word Template. Note that this technique applies to the native Report Writer report also

Here we document the technique; it basically involves going into Report Writer and resetting a Format Definition. Oddly, when you change it in Report Writer it changes it in the Word Template automatically.

 

Print the report in Dynamics. Be sure to print the Report Writer version, not the 'template'. The print dialog is below so you can see what it should look like.

In our example we're modifying the SOP Invoice report, but this will work on any report

After printing the report, press the 'Modify' button to open Report Writer.

Double click on the field you want to change. In my case we're in the 'Quantity Ordered' field in the SOP Invoice. The Report Field Options dialog is below. There are two important things.

The first is the 'Format Field' area, it's set to Decimal Places QTYS. This will cause the decimal place to move based on this field. I don't want that behavior, so I'll click the 'None' button

 

Next is the format. Click the elipsis next to the format field. Click Open in the Format Lookup box to look at the format properties. The default format has 'Relative Decimal Position' checked, and I don't want that.

We don't want to simply modify this format, because that'll change all of them. Create a new format (Resources > Formats) based on the same type (Currency, in my case). I gave mine the name of 'A' so it would sort to the top of the list. Make it exactly the same as the old format, without that one check box.

Set the format of the field to our new format, and we're done. The field will now have no decimal places.

 

 

 


RealWorldCode gives developers practical, real‑world solutions with clean, working code — no fluff, no theory, just answers.
Links
Home
Knowledge Areas
Sitemap
Contact
Et cetera
Privacy Policy
Terms and Conditions
Cookie Preferences