Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report writer decimal positions

Status
Not open for further replies.

lingtring

IS-IT--Management
Feb 26, 2004
64
MX
I have a currency with 4 decimals, but but when printed it should only print 2, this is working fine.

Then I have a function that prints the written ammount, but this displays the 4 digits on the decimal places. I have tried using the rw_Decimal_Round function to try and lower this but with no luck, it still displays the 4 digits.

What can I do?

Basically the field that displays the written ammount is like this:
FUNCTION_SCRIPT(rw_nsa_written_ammount roundedAmmount currencyId 1 "USD")

where roundedammount is the function that rounds the document ammount.
 
Under Field Options associate a format to reduce the number of decimal places. Rounding to 2 decimal places is good, but it will still show the additional zeros. Adjusting the format will allow you to set what is shown. Create your own format if there isn't one that matches your needs.

David Musgrave
Senior Development Consultant
MBS Services - Asia Pacific

Microsoft Business Solutions

Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties,
and confers no rights.
 
I can't change the format on the field of the written ammount to no decimal places since is a text field, I tried changing the format to the OriginatingDocumentAmmount and DocumentAmmount fields, but is still showing the 4 decimal places on the written ammount.

Any other suggestions?
 
If you look in the SDK (from CD2 Tools folder) you can use the RW functions in the Report Writer Programmers Guide.

You can use RW_Value() to convert back to a currency, and then use currency formats or RW_Format() to format as needed.

David Musgrave
Senior Development Consultant
MBS Services - Asia Pacific

Microsoft Business Solutions

mailto:dmusgrav@nospam-microsoft.com

Any views contained within are my personal views and
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties,
and confers no rights.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top