eightieschic
MIS
Crystal Reports 9.0, SQL Database, ODBC Connection
I have one subreport and one main report. Sum Provider and Sum Dept listed below are both groups on the report. I created formulas for the totals on each the Prov and Dept group and columns.
Main Report Info Subreport Info
AM PM Arrived Booked
Sum Prov 1 10 5 10 15
Sum Prov 2 20 20 30 40
Sum Prov 3 6 4 5 10
Expected results
Sum Dept 36 29 45 65
Actual results
Sum Dept 36 29 5 10
Sum Prov subreport information displays properly on my main report. I need the Sum Dept information to also display on the main report, but my subreport only displays the last record in the group Sum Provider
I have tried to use a shared variable, but it is not working properly
\\Subreport
whileprintingrecords;
shared numbervar BookedNewsumdept:=Sum({@BookedNew});
\\Main Report
whileprintingrecords;
shared numbervar BookedNewsumdept;
numbervar sumBookedNew := sumBookedNew + BookedNewsumdept;
Is there a better way of doing this?
-Eighties
I have one subreport and one main report. Sum Provider and Sum Dept listed below are both groups on the report. I created formulas for the totals on each the Prov and Dept group and columns.
Main Report Info Subreport Info
AM PM Arrived Booked
Sum Prov 1 10 5 10 15
Sum Prov 2 20 20 30 40
Sum Prov 3 6 4 5 10
Expected results
Sum Dept 36 29 45 65
Actual results
Sum Dept 36 29 5 10
Sum Prov subreport information displays properly on my main report. I need the Sum Dept information to also display on the main report, but my subreport only displays the last record in the group Sum Provider
I have tried to use a shared variable, but it is not working properly
\\Subreport
whileprintingrecords;
shared numbervar BookedNewsumdept:=Sum({@BookedNew});
\\Main Report
whileprintingrecords;
shared numbervar BookedNewsumdept;
numbervar sumBookedNew := sumBookedNew + BookedNewsumdept;
Is there a better way of doing this?
-Eighties