Formatting calculation

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF CoreSuite for .NET (v8)  /  Formatting calculation

DynamicPDF CoreSuite for .NET (v8) Forum

 Feb 17 2016 10:40 AM
I have purchased dynamic PDF but I am having some trouble formatting a field. I have a field which displays correctly as follows:

Format(ChargesForThisPeriod,"£0.00")

Unfortunately I have just discovered that a StandingCharge needs to be subtracted from this total but trying the calculation I am getting parameter errors. I have tried this:

SUM(ChargesForThisPeriod-StandingCharge)

This correctly returns the figure but when I try to apply the formatting to this as follows:

Format(SUM(ChargesForThisPeriod-StandingCharge),"£0.00")

It falls over. Any ideas how I can correctly compose this string?

 Feb 17 2016 3:46 PM
Posted by a ceTe Software moderator
Hello,

Please use the Subtract function as shown below to perform subtractions instead of SUM which is an aggregate function.
 
Format(Subtract(fieldname1,fieldname2),"£0.00")

Please refer to the documentation on all the available functions here

If you are still receiving an error even after using the subtract function, please email the following details to support@cete.com so that we can look into it further.

1. DPLX file.
2. Code sample.
3. Full error message along with stack trace.
4. Exact version and build number of the DynamicPDF DLL file. You can get this information in DLL reference properties (Version and Descriptions fields) in Visual Studio.

This thread was incorrectly posted in Generator for .NET forum and has been moved to ReportWriter for .NET forum. 

Thanks,
ceTe Software Support Team.
 Feb 17 2016 4:08 PM
Perfect thanks lost my functions list :)

All times are US Eastern Standard time. The time now is 9:39 AM.