Aaaaah!!!! I have spent ages trawling this forum but couldn't resist any longer.
I am using cr8, sql server odbc link.
I have been trying to share a number variable FROM the main report to the subreport. The reports are not linked.
Main report: -
In group header (only one group)
//@VPOOLID_reset
whileprintingrecords;
Shared NumberVar x:=0
In details section
//@VPOOLID
whileprintingrecords;
Shared NumberVar x;
x:= {Pool.Id};
The subreport is in the main report footer b and the following variable is in the subreport details section
//@VPOOLID
whileprintingrecords;
Shared NumberVar x;
Now, when viewed, the pool id from the last record in the main report cascades down all the records in the subreport thus:-
svar x sub pool id
1111 1110
1111 1111
1111 1112
Obviously I would like to see the records match up, though some of the records in the subreport should not have a matching record in the main report.
I have tried different positions for all the variables but this is as close as I got and now need some expert help to resolve it!
Cheers
Trev
I am using cr8, sql server odbc link.
I have been trying to share a number variable FROM the main report to the subreport. The reports are not linked.
Main report: -
In group header (only one group)
//@VPOOLID_reset
whileprintingrecords;
Shared NumberVar x:=0
In details section
//@VPOOLID
whileprintingrecords;
Shared NumberVar x;
x:= {Pool.Id};
The subreport is in the main report footer b and the following variable is in the subreport details section
//@VPOOLID
whileprintingrecords;
Shared NumberVar x;
Now, when viewed, the pool id from the last record in the main report cascades down all the records in the subreport thus:-
svar x sub pool id
1111 1110
1111 1111
1111 1112
Obviously I would like to see the records match up, though some of the records in the subreport should not have a matching record in the main report.
I have tried different positions for all the variables but this is as close as I got and now need some expert help to resolve it!
Cheers
Trev