I've been reading thread149-1001035 because it sounds very similar to my issue but I must have something wrong because I'm getting a zero in the main report.
I have a main report of employees tasks. It is grouped on their last name, then the task description. It is based on a stored procedure that shows totals for tasks open, in progress and completed for whatever dates the user picks.
Then I have a subreport based on a stored procedure that pulls all open tasks and tasks in progress with no date restraint. It is in GF1a of the main report.
I linked them by last name.
In the subreport detail section I placed this formula:
//TotalCountShared
whileprintingrecords;
shared numbervar TotalCount:=Sum({@TotalOpen})
(Here's the TotalOpen formula
If {aa_dch_TaskListAllOpen;1.status} = '1'
or
{aa_dch_TaskListAllOpen;1.status} = '3'
Then 1
Else 0
//3 is in progress
//1 is not started
Then in the main report GF1B I have a formula:
//SumTotalOpenShared
whileprintingrecords;
shared numbervar TotalCount;
numbervar SumTotalCount:=SumTotalCount + TotalCount;
Then in the main report footer I have formula:
//DisplayTotalOpenShared
whileprintingrecords;
shared numbervar SumTotalCount;
Then, just in case there's a null, in the GF2b I put this formula: (I've tried it with and without this formula)
//ResetTotalcountShared
whileprintingrecords;
shared numbervar TotalCount:=0;
I did a grand total in my subreport but it doesn't display once I insert it into the main report. So I thought I would need to do these formulas to pass the value to the main report. All I'm getting is a zero.
Can anyone see where I've gone wrong?
Thank you -
I have a main report of employees tasks. It is grouped on their last name, then the task description. It is based on a stored procedure that shows totals for tasks open, in progress and completed for whatever dates the user picks.
Then I have a subreport based on a stored procedure that pulls all open tasks and tasks in progress with no date restraint. It is in GF1a of the main report.
I linked them by last name.
In the subreport detail section I placed this formula:
//TotalCountShared
whileprintingrecords;
shared numbervar TotalCount:=Sum({@TotalOpen})
(Here's the TotalOpen formula
If {aa_dch_TaskListAllOpen;1.status} = '1'
or
{aa_dch_TaskListAllOpen;1.status} = '3'
Then 1
Else 0
//3 is in progress
//1 is not started
Then in the main report GF1B I have a formula:
//SumTotalOpenShared
whileprintingrecords;
shared numbervar TotalCount;
numbervar SumTotalCount:=SumTotalCount + TotalCount;
Then in the main report footer I have formula:
//DisplayTotalOpenShared
whileprintingrecords;
shared numbervar SumTotalCount;
Then, just in case there's a null, in the GF2b I put this formula: (I've tried it with and without this formula)
//ResetTotalcountShared
whileprintingrecords;
shared numbervar TotalCount:=0;
I did a grand total in my subreport but it doesn't display once I insert it into the main report. So I thought I would need to do these formulas to pass the value to the main report. All I'm getting is a zero.
Can anyone see where I've gone wrong?
Thank you -