Hi,
I am using CR8.0 with SQL2005 and am writing a report which uses a Transaction Header table which includes multiple records for a single transaction (there is one record for each payment method used on the transaction).
The Transaction Header Table is joined to the Transaction Detail table from which I extract the Quantities sold and Sales Values to sum up to a total.
I only want a single record for each transaction in the Transaction Header file. At the moment the totals I am calculating from the Detail File are being multiplied by the number of records in the Header File for this transction.
I have tried selecting Database->Select Distinct in Crystal but this does not work as I am now missing records from the Detail File.
I thought about using a formula like:-
IF {Header.Txn} = PREVIOUS({Header.Txn} THEN False ELSE True
I inserted this formula (@Include) in the Detail section of the report and then made a formula for the sales total which
said :-
IF (@Include) THEN {Detail.value} ELSE 0
I then SUM the above formula but get Evaluation time problems.
Can any clever person suggest a way round this problem please.
I am using CR8.0 with SQL2005 and am writing a report which uses a Transaction Header table which includes multiple records for a single transaction (there is one record for each payment method used on the transaction).
The Transaction Header Table is joined to the Transaction Detail table from which I extract the Quantities sold and Sales Values to sum up to a total.
I only want a single record for each transaction in the Transaction Header file. At the moment the totals I am calculating from the Detail File are being multiplied by the number of records in the Header File for this transction.
I have tried selecting Database->Select Distinct in Crystal but this does not work as I am now missing records from the Detail File.
I thought about using a formula like:-
IF {Header.Txn} = PREVIOUS({Header.Txn} THEN False ELSE True
I inserted this formula (@Include) in the Detail section of the report and then made a formula for the sales total which
said :-
IF (@Include) THEN {Detail.value} ELSE 0
I then SUM the above formula but get Evaluation time problems.
Can any clever person suggest a way round this problem please.