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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

suppress zero in crosstab

Status
Not open for further replies.

MartUK

MIS
Jul 25, 2007
31
GB
Im using CR Xi. This should be easy but can get it to work. I have ' Sum of @NAC_FaultCode ' in my crosstab which gives zero I want to suppress so 0 doesnt show. I have highlighted in crosstab results preview. FormatField, Common, and in the supprees X-2 box put Sum of @NAC_FaultCode =0 but it doesnt work.

Any suggestions welcome
 
Right-click on the field, choose Format Field and on the Number tab choose Suppress if Zero

If that doesn't work, you may have an 'infinitessimal', a fractional number too small to show but which does get found in tests. If the correct display was two decimals, you could put
Code:
Truncate((Sum of @NAC_FaultCode), 2) = 0

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 

Yes this worked, thanks
Can we conditionaly colour an area in a cross tab. I have a field 'Max of @NAC%' and if its greater than 5 then I want it to show in red. Trouble is this object only exists in the crosstab and so cant see it in the list to conditionally colour!
 
To conditionally color a crosstab object, right click the object in the crosstab and select format. Find the background color X-2 button, and enter the following formula:

If CurrentFieldValue > 5 then red else DefaultAttribute

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Yes this also worked, I used the current field value a long time ago and forgot about it, thanks again . As I asked earlier are we limited to the small range of colours?
 
What do you mean by small range?

In the formula workshop, under the function tree, you can see a "color constants" branch. If you open that up it lists 16 colors, which ought to be plenty.

If 16 isn't enough, you can also create your own custom color with the color() function. The color() function has 3 arguments, red, green and blue. These are expressed numerically 0 to 255. So if you know how the color you want is expressed numerically, you can get there using this function.



Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports

"If you have a big enough dictionary, just about everything is a word"
--Dave Barry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top