Using CR 8.5 the objective is basically to pass the Final Total # Beds in each hospital (e.g., Hospital A and Hospital B) from the Sub report to the Main report.
The Final Total # Beds for each hospital is used as a coefficient in calculations at multiple Group levels in the Main report. Hospitals are manually cross-tabulated horizontally across the page. Group-1 is Age group. Groups 2-4 also use the Final Total # Beds in calculations. Because the # Beds need to be totalled differently than the groups allow, I don't see a way to do this in a single report.
So, I created Shared Variables in the Main report called SharedBedsKid coded as ( Shared NumberVar x; ) and
SharedBedsGeri coded as ( Shared NumberVar x; )
I created same-name Shared Variables in the Sub report but used criteria to define the values. In the Sub report, SharedBedsKid is coded as
( if {Table_Bed_Capacity.Hospital} = “A”
then
Shared NumberVar x := Sum ({Table_Bed_Capacity.Beds}, {@AgeGroupByProgram}) ).
Also in the Sub report, SharedBedsGeri is coded as
( if {Table_Bed_Capacity.Hospital} = "B"
then
Shared NumberVar x := Sum ({Table_Bed_Capacity.Beds}, {@AgeGroupByProgram}) ).
Where {@AgeGroupByProgram} is defined as:
( if { Table_Bed_Capacity.program } = "441" then "Geriatric Patients"
else
if { Table_Bed_Capacity.program } = "486" then "Kid Patients"
else
"Adult Patients" )
Main-to-Sub report Linkage is by the effective date of bed capacity. That is sufficient to find the effective Bed Capacity records for the month for each category of patient.
The correct values show in the Sub report, but the Main report only shows zeroes. What can I do to get the Final Total # Beds into the Main report? Your assistance will be much appreciated.
The Final Total # Beds for each hospital is used as a coefficient in calculations at multiple Group levels in the Main report. Hospitals are manually cross-tabulated horizontally across the page. Group-1 is Age group. Groups 2-4 also use the Final Total # Beds in calculations. Because the # Beds need to be totalled differently than the groups allow, I don't see a way to do this in a single report.
So, I created Shared Variables in the Main report called SharedBedsKid coded as ( Shared NumberVar x; ) and
SharedBedsGeri coded as ( Shared NumberVar x; )
I created same-name Shared Variables in the Sub report but used criteria to define the values. In the Sub report, SharedBedsKid is coded as
( if {Table_Bed_Capacity.Hospital} = “A”
then
Shared NumberVar x := Sum ({Table_Bed_Capacity.Beds}, {@AgeGroupByProgram}) ).
Also in the Sub report, SharedBedsGeri is coded as
( if {Table_Bed_Capacity.Hospital} = "B"
then
Shared NumberVar x := Sum ({Table_Bed_Capacity.Beds}, {@AgeGroupByProgram}) ).
Where {@AgeGroupByProgram} is defined as:
( if { Table_Bed_Capacity.program } = "441" then "Geriatric Patients"
else
if { Table_Bed_Capacity.program } = "486" then "Kid Patients"
else
"Adult Patients" )
Main-to-Sub report Linkage is by the effective date of bed capacity. That is sufficient to find the effective Bed Capacity records for the month for each category of patient.
The correct values show in the Sub report, but the Main report only shows zeroes. What can I do to get the Final Total # Beds into the Main report? Your assistance will be much appreciated.