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

Tricky Problem

Status
Not open for further replies.

subbah

Technical User
Apr 10, 2002
1
IN
Hello all,
i had a formula which has a numeric parameter converted to string used in it.
when i preview the report(from design environment) it is just working fine.

But when i have generated this from actual environment and viewed through crystal viewer, i got blank sub report where this formula is used as a selection formula.
when i traced the actual query from sql profiler, i observed that comma and decimal point are included in the result of the formula(as it is a number field), but i have changed the settings for number in the crystal designer for this report(that is why it is working fine in designer). But those settings are not getting effected in the application environment at run time, how to resolve this.

please solve this.
Thanks.
 
Totext({numberfield}) will typically include a thousands separator and a certain number of decimal places.

If you use ToText({Numberfield},"",0) you should get no decimals and no thousands separators regardless of the machine. The second argument is for the thousands separator and the third is for the number of decimals to include.

I suspect that on the development machine a has been formatted to show no decimal places and no thousands separators, but the above solution should work regardless of individual machine's default format settings.

If this does not work, please cut and paste your formula into your next post.

Software Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
dgillz that should be ToText({Numberfield},0,"","")

to have no decimals, no thousands separator and No decimal point.

I am not sure if that is the problem....Subbah...when refering to formula problems....please paste a complete example of the formula...otherwise we are just guessing here.
Jim

JimBroadbent@Hotmail.com
 
thanks to dgillz and Jim
i have solved this with ToText({Numberfield},'#') are there any other problem hidden in this, it worked fine for my purpose.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top