Hi,
When there is only one record in a group in the sub report, I need it to give me a dummy date of 01/01/1900. if there are more than one date records I need it to give me the previous date record.
This is the formula in my sub report:
whileprintingrecords;
if Count ({DRLDCH01.CHCODT}, {DRLDCH01.CHDACN}) = 1 then #01/01/1900# else
if {DRLDCH01.CHDACN} = previous({DRLDCH01.CHDACN}) then
shared datevar PreviousContactDate:=
previous({DRLDCH01.CHCODT}) else #01/01/1900#
It works in the sub report, if I drill down from the main report it gives the correct data.
The sub report is linked to the main report by the {DRLDCH01.CHDACN} field.
This is the formula in the main report
whileprintingrecords;
shared datevar PreviousContactDate
When that formula prints on the main report, instead of giving me 01/01/1900 when it does in the sub report, it gives me the last date from the previous {DRLDCH01.CHDACN} record for all records.
It all works fine if the sub report has more than one record for {DRLDCH01.CHDACN}
I'm hoping I have just been staring at this too long and the answer is obvious
Thank you in advance for your help
VE