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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiled/Distributed report number format

Status
Not open for further replies.

5lights

MIS
Nov 19, 2003
53
US
I am compiling a report for a user that has previous distributed reports(no Crystal app installed). The users pc shows numbers w/2 decimal places...mine does not.
Tried variations of TRUNCATE/ROUND/FIX statements to force the format to whole number...no joy.

Any suggestions?
 
Those statements (actually these are Functions) change the uderlying value but not the format of the field. You should be able to specify the format of 0 decimals by going into Format - Field and picking a format other than the default format. If you leave the format at the default it will take on the default windows format from the client PC.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- TEK2(AT)kenhamady.com
 
These are percentages that are converted(TOTEXT)in order to display the percentage sign with them....
I was hoping the TRUNCATE/FIX functions would format the number before textual display.
Is there a better way to show '%'sign?
The only ways I've found around this is:
1 - create a seperate textbox with '%' adjacent to the valuebox.
2 - Go into Crystal on the users pc & set the default number format in options to no decimal places.

Appreciate your response.
 
How would no decimal places give you qa percent?

There are various solutions based on your version of Crystal, a basic piece of information that you should always include with any post in any forum.

One universal method is to right click the field, select format number->Customize->Currency Symbol tab->Change the position to (123)$->Change the currency symbol to %. Now in the Number Tab change the Decimals to show 1 (which means no decimals. You can also change the rounding if required.

Converting to text isn't a veryy good solution, but to do so without decimals use:

totext({table.field},0,"")

0 being the nunmber of decimals, and "" being what type of thousands seperator.

Hope this resolves, if not, try posting complete technical information. Your original post didn't give Ken much of a chance to help you because you didn't mention percentages.

You did learn from Ken that by leaving defaults the report will use the local machines settings, which is an important consideration, however the approaches I offer overide those.

-k
 
Almost all versiions of CR have a percent symbol button right on the toolbar, along with the decimal setting.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Tips and Tricks / Guide to Crystal in VB
- TEK2(AT)kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top