Solved

not to display zeros in decimal place

Posted on 2007-04-09
3
508 Views
Last Modified: 2011-09-20
dear crystal report experts,

I have this custom formula in my cr (v 10X embedded with vs2005). I need to find a way to drop the zeros after the decimal point. 7,500.00 --> 7,500.

The data is from sql server, and is numeric (13,4). I have it cast to numberic(13,0) in the stored procedure, but the cr still showing all the 00s.

stringVar LnDesc := '';
LnDesc := LnDesc + totext({OptSvs.Qty}) + ' @ $' + totext({OptSvs.UPrice}) + '/ each = $' + totext({OptSvs.Net});
LnDesc;

0
Comment
Question by:ommer
  • 2
3 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 125 total points
ID: 18879759
Try this

LnDesc := LnDesc + totext({OptSvs.Qty}) + ' @ $' + totext({OptSvs.UPrice}, 0) + '/ each = $' + totext({OptSvs.Net}, 0);

mlmcc
0
 

Author Comment

by:ommer
ID: 18882032
Works great, thank you!
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 18882442
Glad i could help

mlmcc
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question