on 02-12-2009 10:09 AM
Hi ,
We are using Crystal Desinger of version 11.5.0.313.
We have numeric fields whose format is picked up fromt he systems regional and language options settings. This approachis working for numeric fields with decimal values. But it is failing in the case of numeric fields which should not diplsya decimal part.
The system numeric format is set as below :
Decimla Seperator : "#"
Thousand Seperator :"!"
eg if the value of the field is "12345", becasue of the system format the value is displayed as "12!345#00" But we are expecting "12!345"
The moment we try to customize by saying the decimal as "1" the fields is not picking the thousand seperator from the regional settings at runtime.
Can you please help us how we cans uppress decimal places at runtime ?
Thanks in advance.
Thanks and Regards,
Shireen.
Seem issue so same solution
Try this and see if it works for you.
ToText({database field},0,'!','');
// 0 = No Decimals
// ! = the thousands separator
// '' (two single quotes with no spaces) = no decimal separator
Edited by: Sanjay Kodidine on Feb 12, 2009 5:27 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shireen Ganni
To avoid taking numeric formatting from your regional settings, open crystal designer and go in FileOptions-select FieldsUnder fields select Number and go in Number Tab here you specify the format which you would like to apply.
This will take all your number fields in the specifyed format.
Thanks,
Sastry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sastry,
Thank you for your inputs. We have two types of numeric fields.
1. Numeric fields which are just whole numbers without decimal values
eg : NO of files -- 100500
2. Numeric fields like Charge which have decimal values
eg: Product charge : 11250.50
So I need to specify data format for each of its kind differently. Also it has to pick the decimal seperator and thpousands seperator at runtime dynamically from the regional settings which is not happening currently for whole number numeric fields.
Thanks in advance.
Thanks and Regards,
Shireen.
By custom formatting the numeric fields you'll then not be able to set the formatting to "System Default Number Format"
AND I suspect that custom formatting you're doing does NOT fit with the system default formatting.
You can't have "System Default Number Format" AND custom formatting simultaneously.
Can't you just reduce the number of decimal places for the field? Crystal defaults to two decimal places for numeric fields, but you can change that to however many places that you want. There's a toolbar button to do this, or you can right-click on the field, select Format Field, and under Number there are options to reduce the decimals to zero.
HTH,
Carl
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.