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!

Removing '0' under Crystal reports 6.0 for Simply Accounting

Status
Not open for further replies.

kawajanagi

Programmer
Mar 12, 2001
2
CA
Hi,

I want to remove the 0 value from a quantity on an invoice when there is no item number. Right now when I put a comment on a line it puts a 0 under quantity orderd and quantity back ordered because it considers it has an item. So I want to put a condition in these fields so that there is no more 0 when the item is null.

example of what I tried and wasn't succesfull:

NumberVar nLen;
StringVar sNum;
sNum := ToText({INVITEM_CSV.ORDERED},4,",",".");
nLen := Length(sNum);
If Right( sNum, 1) = "0" Then
nLen := nLen -1;
If Right( sNum, 2) = "00" Then
nLen := nLen -1;
If Right( sNum, 3) = "000" Then
nLen := nLen -1;
If Right( sNum, 4) = "0000" Then
nLen := nLen -2;
Left(sNum,nLen);
//This is the part I tried to add:
IfNull({INVITEM_CSV.ITEM})
sNum := "";
nLen :="";
//End

Thank you for your time!
 
If you use format - Field on the Qty field, you can check off "Suppress when 0" and this will make all zero values print blank.

Is that enough, or do you want some zeros to print? Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Thank you!

Everything works fine that way!

Have a nice day ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top