Solved

not to display zeros in decimal place

Posted on 2007-04-09
3
507 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 AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Crystal Report Filter Question 6 64
C# Infragistics UltraGrid - Export to Excel 2 109
Formatting a Crystal Report 2 60
"A string is required here" error in Formula 7 51
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…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

821 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