Solved

not to display zeros in decimal place

Posted on 2007-04-09
3
510 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

739 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