Hi
Crystal XI, SQL DB
I have 10 sub reports for a set of reports to show monthly patient data (Scary I know)
Jan Feb Mar Apr etc
SR1-Admissions
SR2-Discharges
SR3-PatientDays
SR4-Newborns
etc
I use sub reports because the data qualification in each may be 'slightly' different. I create formulas in each sub report to count the admissions etc for each month
Example:
//@JanAdmissions
if {PatCost_Episode_Category.admitDate} in date(2004,01,01) to date(2004,01,31) then 1
Currently I have these formulas in all the sub reports. But I was thinking when I need to update this for the new year I have to go into every sub report and change the dates. So I was hoping to create a variable in the main report and to have the sub reports use this.
I put this in the main report (and inserted it in the report header)
//@SetDates
beforereadingrecords;
global DateVar JanStart ;
JanStart := Date(2004,01,01);
beforereadingrecords;
global DateVar JanEnd ;
JanEnd := Date(2004,01,31);
I put this in the sub report
//@01Jan
whileprintingrecords;
shared datevar Janstart;
shared datevar Janend;
if {PatCost_Episode_Category.admitDate} in JanStart to JanEnd then 1
But when I run the report I get an error:
A summary has been specified on a non-recurring field. Details: @01Jan
Any guidance/comments much appreciated.
SjjCat
Crystal XI, SQL DB
I have 10 sub reports for a set of reports to show monthly patient data (Scary I know)
Jan Feb Mar Apr etc
SR1-Admissions
SR2-Discharges
SR3-PatientDays
SR4-Newborns
etc
I use sub reports because the data qualification in each may be 'slightly' different. I create formulas in each sub report to count the admissions etc for each month
Example:
//@JanAdmissions
if {PatCost_Episode_Category.admitDate} in date(2004,01,01) to date(2004,01,31) then 1
Currently I have these formulas in all the sub reports. But I was thinking when I need to update this for the new year I have to go into every sub report and change the dates. So I was hoping to create a variable in the main report and to have the sub reports use this.
I put this in the main report (and inserted it in the report header)
//@SetDates
beforereadingrecords;
global DateVar JanStart ;
JanStart := Date(2004,01,01);
beforereadingrecords;
global DateVar JanEnd ;
JanEnd := Date(2004,01,31);
I put this in the sub report
//@01Jan
whileprintingrecords;
shared datevar Janstart;
shared datevar Janend;
if {PatCost_Episode_Category.admitDate} in JanStart to JanEnd then 1
But when I run the report I get an error:
A summary has been specified on a non-recurring field. Details: @01Jan
Any guidance/comments much appreciated.
SjjCat