The May 2009 Flexible Solutions GP Reports Newsletter brings us a tip for dynamically changing decimal places in Crystal Reports. This can be really useful for creating Sales Order Processing (SOP) reports for Dynamics GP, where GP stores the number of decimal places for each line item in the SOP10200 and SOP30300 tables.
Here are the steps to have Crystal dynamically determine how many decimal places to use for the quantity fields:
-
Right click on the report field and choose Formal Field
-
Go to the Number tab and click Customize
-
Enter the formula that determines how many decimal places to use – the result of the formula will be the number of decimal places the report will use
In the Dynamics GP SOP example, for SOP quantities the formula should be:
{SOP10200.DECPLQTY}-1
If you want do use a formula for the currency amounts, use the following:
{SOP10200.DECPLCUR}-1
And check out the latest demo video for GP Reports Viewer showing how easy it is to replace Dynamics GP’s SOP reports with Crystal Reports!
Exactly what i needed to. Thanks
LikeLike
Hi Victoria,
I am trying to run a simple Vacation Available report in Crystal. I’m pulling from UPR00100, the name and number of hours of vacation available. My issue is that the number pulls in as 1750 (for example). And it needs to be 17.50 hours. I have tried adding and subtracting the # of decimals, but nothing will move the decimal left two spaces.
I tried your {SOP10200.DECPLQTY}-1 above , with the VACAVLBL field from the UPR00100 table. It saves as a valid formula in Crystal, but when I try to preview the report, I receive the message “Bad Formula Result”.
Do you know of another formula that will work with this field?
Thanks,
Laurie
LikeLike
Hi Laurie,
You cannot use the SOP10200 table if it is not in your data set, and I suspect that it would not be for a payroll report.
Unless I am missing something you should just be able to create a formula to take the field that holds the 1750 (in your example) and divide it by 100. There should be no need to do this dynamically – that field will always need to be divided by 100.
-Victoria
LikeLike
Found this in a google search. Just what I needed. Thanks
LikeLike