Previous Thread
Next Thread
Print Thread
#26629 03/21/11 05:59 PM
Joined: Jan 2011
Posts: 16
R
Adagio Groupie
Adagio Groupie
R Offline
Joined: Jan 2011
Posts: 16
I am fairly new at using Crystal Reports with Adagio and have been trying to create a formula that when the field has a "zero" qty it will return a - (dash)instead of a 0 otherwise it returns the value but have been unsuccessful. This is the formula I tried ...

IF {ICW65 Items.Qty on sales order} = 0 THEN "-" ELSE {ICW65 Items.Qty on sales order}

Can anyone tell me what I am doing wrong.

Thanks,

Reen #26630 03/21/11 06:10 PM
Joined: Jan 2011
Posts: 16
R
Adagio Groupie
Adagio Groupie
R Offline
Joined: Jan 2011
Posts: 16
Also I do not want to just surpress the zeros.

Reen #26631 03/21/11 06:38 PM
Joined: Mar 1999
Posts: 11,763
Adagio Action Team
Adagio Action Team
Joined: Mar 1999
Posts: 11,763
Hi Reen,

Crystal Reports wants both the 'True' and 'False' results to have the same data type. In your example, the 'True' result is a character, but the 'False' result is a number. This is an error as far as Crystal Reports is concerned.

There is a way to do this without even having to create a formula field. Assuming you have the 'Qty on Sales Order' field already in your report, right-click on it and pick 'Format Field' from the pop-up menu. From the Number tab, click the Customize button below all the pre-defined number formats.

On this 'Custom style' screen at the bottom right side, there is a selection for 'Show zero values as', and a dash is one of the available choices. Pick this and click OK to save it. Now when you print the report, zeroes are replaced by dashes.


Regards,
Softrak Tech Support
Softrak Support #26632 03/21/11 06:52 PM
Joined: Jan 2011
Posts: 16
R
Adagio Groupie
Adagio Groupie
R Offline
Joined: Jan 2011
Posts: 16
Thank you. I had been through the format field section but missed the setting for zeros.

Much appreciated.


Moderated by  Softrak Support 

Link Copied to Clipboard
Who's Online Now
0 members (), 1,100 guests, and 3 robots.
Key: Admin, Global Mod, Mod
Forum Statistics
Forums5
Topics14,680
Posts71,644
Members1,874
Most Online1,408
Dec 9th, 2025
November
S M T W T F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30
Powered by UBB.threads™ PHP Forum Software 8.0.0