Solved

not to display zeros in decimal place

Posted on 2007-04-09
3
503 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now