The report I have works great it just I need to know how to combine sites information using the shared variable technique or may I should set up my report differently.
I have a main report and a subreport. The main report contains the list of employees along with the sites they belong to. I have the main report grouped by site then employee. The subreport contains the # of applications submitted by each employee for the month.
Using information I found on this site. I did the following:
In the sub report which is grouped by site then employee
I placed the following formula:
whileprintingrecords;
shared numbervar applic := sum({@applic}, {table.employee});
//where {@applic} equals:
if isnull({table.applicationID}) then 0 else 1
Then I placed this on the subreport instead of the summary currently displayed. Then in the main report, create the following formulas:
//{@resetsubtot} to be placed in the Group #1 (site) header then suppressed the field to prevent the zeros from showing:
whileprintingrecords;
numbervar subtot := 0;
//{@totals} to be placed in the Group #2 (employee) footer the suppressed the section because the running total was showing for each employee:
whileprintingrecords;
shared numbervar applic;
numbervar subtot := subtot + applic;
numbervar grtot := grtot + applic;
//{@displsubtot} to be placed in the Group #1 (site) footer:
whileprintingrecords;
numbervar subtot;
//{@displgrtot}:
whileprintingrecords;
numbervar grtot;
Everything works I need to know how to combine sites information using the shared variable technique or may I should set up my report differently.
Current report
Beijing China
Xiango 0
Li 7
Paris France
Smith 1
Lee 4
Normandy France
Poe 5
Jung 8
California, USA
Opar 6
Lun 2
Desired Totals at the bottom
Sub total Europe + Asia 25
Total Asia 7
Total Europe 18
Total US 8
Total WW 33
What is the best way to accomplish this?
Thanks for the advice.
Cheers
R
I have a main report and a subreport. The main report contains the list of employees along with the sites they belong to. I have the main report grouped by site then employee. The subreport contains the # of applications submitted by each employee for the month.
Using information I found on this site. I did the following:
In the sub report which is grouped by site then employee
I placed the following formula:
whileprintingrecords;
shared numbervar applic := sum({@applic}, {table.employee});
//where {@applic} equals:
if isnull({table.applicationID}) then 0 else 1
Then I placed this on the subreport instead of the summary currently displayed. Then in the main report, create the following formulas:
//{@resetsubtot} to be placed in the Group #1 (site) header then suppressed the field to prevent the zeros from showing:
whileprintingrecords;
numbervar subtot := 0;
//{@totals} to be placed in the Group #2 (employee) footer the suppressed the section because the running total was showing for each employee:
whileprintingrecords;
shared numbervar applic;
numbervar subtot := subtot + applic;
numbervar grtot := grtot + applic;
//{@displsubtot} to be placed in the Group #1 (site) footer:
whileprintingrecords;
numbervar subtot;
//{@displgrtot}:
whileprintingrecords;
numbervar grtot;
Everything works I need to know how to combine sites information using the shared variable technique or may I should set up my report differently.
Current report
Beijing China
Xiango 0
Li 7
Paris France
Smith 1
Lee 4
Normandy France
Poe 5
Jung 8
California, USA
Opar 6
Lun 2
Desired Totals at the bottom
Sub total Europe + Asia 25
Total Asia 7
Total Europe 18
Total US 8
Total WW 33
What is the best way to accomplish this?
Thanks for the advice.
Cheers
R