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

Conditionally formatting rows in a cross tab - v7.0

Status
Not open for further replies.

DLTaylor

MIS
Dec 17, 2003
51
GB
Crystal v7.0

Hi

Is it possible to conditionally format rows in a cross tab?

My report uses both the details section and a cross tab. I have formatted the details section to suppress duplicates but because I cannot do this in the cross tab, this gives me a discrepancy in the report because the cross tab shows one thing and the details section another.

Any help would be appreciated.

Thanks

Sian
 
Are you talking about a display of duplicate values in the crosstab or do you mean that summary values in the crosstab are inflated because they are including duplicates?

It would help if you provided a sample of your crosstab and your main report and provided a little more explanation of the differences.

-LB
 
The summary values are inflated in the cross tab due to duplicates being included.

The cross tab displays 14 records, but the report (with the suppress duplicates applied) shows 13 records

Cross tab:
Total
05/06/2004 3
06/06/2004 1
07/06/2004 1
10/06/2004 2
14/06/2004 1
15/06/2004 1
23/06/2004 2
24/06/2004 1
28/06/2004 2
Total 14

Details section on report:

TSA022799 05/06/2004 09:30:07
TSA022631 05/06/2004 09:30:13
TSA022632 05/06/2004 15:00:43
TSA022633 06/06/2004 12:30:46
TSA022643 09/06/2004 10:59:30
TSA022984 11/06/2004 08:30:49
TSA022986 11/06/2004 17:35:00
TSA023212 14/06/2004 09:30:29
TSA023217 15/06/2004 21:15:48
TSA023756 23/06/2004 21:13:00
TSA023757 24/06/2004 17:02:00
TSA023856 27/06/2004 21:32:00
TSA023854 28/06/2004 09:26:59

Total Records = 13

Thanks

Sian

 
It looks like you are not using the same field for the row in the crosstab as you are displaying in the details section. Note the different dates, e.g., there are two 10/06 dates in the crosstab, but none in the details section.

I would guess that you have a null in the date field you are using in your details section. Are you using more than one table? What kind of joins? You would want to have a left join from that includes all records to the table containing the date field.

You might try using a formula instead of the date field in the details section to uncover any nulls:

if isnull({table.date}) or
{table.date} = date(0,0,0) then
Date(9999,09,09) else {table.date}

If you still think the issue is duplicates in the crosstab, you could try concatenating the "TSA___" field with the date field to use as a row field in the crosstab.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top