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

format of number parameter changes in CE

Status
Not open for further replies.

goodprg

Programmer
Apr 1, 2004
51
0
0
US
I have a number parameter in crystal reports. When I run the report it asks for the parameter value, the format of number is ok like 1123 and the report run fine but when I publish it in CE and try to preview it the format of the parameter changes to 1123.34

Why is that and how can I fix it?
 
Hi,
I'm confused as to how a parameter can change value ( 1123 is not the same as 1123.34).

Is it the parameter or the value in the database that is 1123.34 ?
If the number format on the report is not what you want, right-click on it ( in CR) and change it.

[profile]
 
Actually the parameter values is 2003 (it appears like that in crystal) but in CE when I preview it it shows as 2003.00

The format of the parameter is without decimal points.

Thanks for the help.
 
Hi,
OK, how are you generating the parameter? Is it in a list of default values? Do you get it from the database?

[profile]
 
Hi,

The parameter is in a list of default values. Default values I get it from database.

Thanks & Regards.
 
I had a similar problem returning dates and numbers in a default format when run via CE. The way round it was to use CStr function which specifies the desired output format.
For example to get the year 2004 from date :
cstr({tci_date},"yyyy") returns 2004 and not 2004.00 which was produced from year({tci_date})

CStr also gets round CE displaying dates in American format as opposed to the Welsh format which we require.

Hwyl,

Huws
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top