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

Suppressing Crosstab fields conditionally.

Status
Not open for further replies.

sreeramnavale

Programmer
Feb 18, 2004
40
US
Hi,

I have a crosstab.

It is product verses Store sales crosstab.

Products are rows.
Stores are columns.

And sum of the sale is in the Crosstab fields.

The table Data is as

ProductA Store1 100
ProductA Store1 105
ProductB Store2 110
ProductB Store1 205
ProductC Store2 0
ProductC Store1 125


The cross tab should look like

Store1 Store2
ProductA 205
ProductB 205 110
ProductC 125 0

How can I get it like the above
Note: ProductA Store2 does not have any values there not even zero.
And ProductC Store2 should have a zero as there is record in the table for it.

Any help appreciated.

SN

 
I don't think that you can differentiate between null and zero, you can turn off all zero values or not.

You could manually generate the crosstab, but it requires knowing which stores will be used.

Then you could group by product and manually build formulas for the columns and check for count({table.store},{table.product}) = 0 to suppress the field.

This assumed that you want null for no activity,and zero where there was some but it resulted in zero.

-k

-k

 
You could add a count of records to the crosstab. Or do a crosstab on a formula field that shows the figure as text, if your version of Crystal will allow it.

It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top