Hi,
I am running Crystal V10 on an SQL 2000 DB, using an SQL ADO Driver.
My main report lists all Customer Transactions, my sub report shows all customer receipts.
The desired outcome of my report is to show any customer transactions less any allocated receipts, hence showing an overall o/s balance for that transaction.
I have shared variables in the report, which display and calculate. The issue is that where I have a transaction in the main report with no information in the subreport, the shared variable total from the detail line above it appears in the shared variable field for that line.
The shared variable only appears to reset when there is a line in my subreport to populate it with.
The variables are as follows...
In the subreport
Variable_InvSumApplied
WhilePrintingRecords;
shared numbervar Variable_InvSumApplied :=
Sum ({RCT2.SumApplied}, {RCT2.DocEntry})
In the main report
Variable_SumApplied
whileprintingrecords;
Shared NumberVar Variable_InvSumApplied;
Variable_InvSumApplied
and the reset variable is
Variable_InvSumApplied_Reset
whileprintingrecords;
numbervar Variable_InvSumApplied;
Variable_InvSumApplied :=0
The sub report is situated in Detail A on the main report.
The Shared Variable is in Detail B on the main report.
The Reset Variable is in Detail C on the main report.
An example of what is displaying at present
Cust Code Cust Name Inv No Inv Amt Variable Should BE
C1000 Antoinette 100 5000 1500 1500
C1000 Antoinette 101 2500 2500 2500
C1000 Antoinette 108 100 2500 0
C1000 Antoinette 101 6000 6000 6000
Any help is greatly appreciated.
Kind Regards
Antoinette
I am running Crystal V10 on an SQL 2000 DB, using an SQL ADO Driver.
My main report lists all Customer Transactions, my sub report shows all customer receipts.
The desired outcome of my report is to show any customer transactions less any allocated receipts, hence showing an overall o/s balance for that transaction.
I have shared variables in the report, which display and calculate. The issue is that where I have a transaction in the main report with no information in the subreport, the shared variable total from the detail line above it appears in the shared variable field for that line.
The shared variable only appears to reset when there is a line in my subreport to populate it with.
The variables are as follows...
In the subreport
Variable_InvSumApplied
WhilePrintingRecords;
shared numbervar Variable_InvSumApplied :=
Sum ({RCT2.SumApplied}, {RCT2.DocEntry})
In the main report
Variable_SumApplied
whileprintingrecords;
Shared NumberVar Variable_InvSumApplied;
Variable_InvSumApplied
and the reset variable is
Variable_InvSumApplied_Reset
whileprintingrecords;
numbervar Variable_InvSumApplied;
Variable_InvSumApplied :=0
The sub report is situated in Detail A on the main report.
The Shared Variable is in Detail B on the main report.
The Reset Variable is in Detail C on the main report.
An example of what is displaying at present
Cust Code Cust Name Inv No Inv Amt Variable Should BE
C1000 Antoinette 100 5000 1500 1500
C1000 Antoinette 101 2500 2500 2500
C1000 Antoinette 108 100 2500 0
C1000 Antoinette 101 6000 6000 6000
Any help is greatly appreciated.
Kind Regards
Antoinette