I have a main report that is grouped by department number. In the Da I have a newhire subreport. This report returns data on surveys that are sent out. I have the subreport joined to the main report on department number, start date, and end date.
In Db I have an exitdata subreport. This report returns data on surveys that are sent out to employees leaving the company. I have this report joined by department, start date, and end date.
The problem that I have is when I set the subreport to suppress blank subreport and then the Da and Db sections to suppress blank section that works fine. But I cannot suppress the GH1b (that has the department number and name) on the main report.
I have created shared variables that capture if there are records in the subreport. These I placed in the Dc and GF1 and they are returning the correct amount. When I suppress the GH1b based on these variables it suppresses the NEXT GH1b or does not suppress the NEXT GH1b based on the previous GF1 totals.
NewHire Subreport is in Da
ExitData Subreport is in Db
I have put in the formulas the following:
(NewHire Subreport)
GF1: {@rec_returned}
whileprintingrecords;
shared numbervar nhCount := 0;
nhCount := Count ({DEPTCODE_V.DEPARTMENT}, {@VP_NAME})
(ExitData Subreport)
GF1b: {@rec_returned}
WhilePrintingRecords;
shared numbervar exCount := 0;
exCount := sum({HR_EXITSURVEY.Q1_1});
(Main Report)
Dc: {@NewHireCount}
WhilePrintingRecords;
shared numbervar nhCount;
nhCount
Dc: {@ExitDataCount}
WhilePrintingRecords;
shared numbervar exCount;
exCount;
GF1: {@Eval_Shared_Var}
whileprintingrecords;
evaluateafter({@NewHireCount});
evaluateafter({@ExitDataCount});
shared numbervar x;
x := 0;
x := ({@ExitDataCount} + {@NewHireCount});
GH1b: (Suppression Function)
EvaluateAfter ({@eval_shared_var});
shared numbervar x;
if x > 0 then
false
else
true
Now if I move the x := 0 to a separate function and put into GH1a and suppress the GH1a section then all of the GH1b sections are suppressed.
It's a runtime evaluation problem. It's like it's printing the group header 1b before processing the subreport and getting the totals for the records even though I'm telling it to evaluate the suppression statement AFTER the function that totals the number of responses is run.
Please help.
If you have any questions, please let me know.
Thank you,
Matt.
In Db I have an exitdata subreport. This report returns data on surveys that are sent out to employees leaving the company. I have this report joined by department, start date, and end date.
The problem that I have is when I set the subreport to suppress blank subreport and then the Da and Db sections to suppress blank section that works fine. But I cannot suppress the GH1b (that has the department number and name) on the main report.
I have created shared variables that capture if there are records in the subreport. These I placed in the Dc and GF1 and they are returning the correct amount. When I suppress the GH1b based on these variables it suppresses the NEXT GH1b or does not suppress the NEXT GH1b based on the previous GF1 totals.
NewHire Subreport is in Da
ExitData Subreport is in Db
I have put in the formulas the following:
(NewHire Subreport)
GF1: {@rec_returned}
whileprintingrecords;
shared numbervar nhCount := 0;
nhCount := Count ({DEPTCODE_V.DEPARTMENT}, {@VP_NAME})
(ExitData Subreport)
GF1b: {@rec_returned}
WhilePrintingRecords;
shared numbervar exCount := 0;
exCount := sum({HR_EXITSURVEY.Q1_1});
(Main Report)
Dc: {@NewHireCount}
WhilePrintingRecords;
shared numbervar nhCount;
nhCount
Dc: {@ExitDataCount}
WhilePrintingRecords;
shared numbervar exCount;
exCount;
GF1: {@Eval_Shared_Var}
whileprintingrecords;
evaluateafter({@NewHireCount});
evaluateafter({@ExitDataCount});
shared numbervar x;
x := 0;
x := ({@ExitDataCount} + {@NewHireCount});
GH1b: (Suppression Function)
EvaluateAfter ({@eval_shared_var});
shared numbervar x;
if x > 0 then
false
else
true
Now if I move the x := 0 to a separate function and put into GH1a and suppress the GH1a section then all of the GH1b sections are suppressed.
It's a runtime evaluation problem. It's like it's printing the group header 1b before processing the subreport and getting the totals for the records even though I'm telling it to evaluate the suppression statement AFTER the function that totals the number of responses is run.
Please help.
If you have any questions, please let me know.
Thank you,
Matt.