Hi,
I created a subreport that calculates a value using a formula. I then shared this value with my main report by making it a shared variable. However, the shared variable always shows as 0 in every area of the main report. It shows correctly however on the subreport.
Here are the details: the main report yields account values for 24 cost centers for each of 100 account numbers. So the report is a large grid. The subreport is a mini version of the main report in that it gives account values for 24 cost centers for one account number. Then it calculates the percentage of the total for each cost center. It is this percentage figure that is my shared variable that I want to use on the main report in formulas. There is one formula for each of the 24 cost centers and I actually will have 24 shared variables; one for each of the cost centers.
The subreport is in the group header (the group is account number) and the reports are linked by account number. I did create a shared numberVar for each of the 24 percentages from the subreport. But it always shows as zero and therefore doesnt do the calculation I need done.
Even if I show the account from the subreport on the main report, the formula STILL shows as zero. I declared the first variable on the main report like this:
whileprintingrecords;
shared numberVar A;
SUM({%A Edison AT4009}, {tblGLBLBalance.sCodeIDf_0}) +
A * {@AmtAllocbyGL}
I declared the variable in the subreport like this:
whileprintingrecords;
shared numbervar A := {@PercentEdison}
{@PercentEdison} is the formula that yields the desired percentage.
Please assist me with this annoying problem. Thanks!
I created a subreport that calculates a value using a formula. I then shared this value with my main report by making it a shared variable. However, the shared variable always shows as 0 in every area of the main report. It shows correctly however on the subreport.
Here are the details: the main report yields account values for 24 cost centers for each of 100 account numbers. So the report is a large grid. The subreport is a mini version of the main report in that it gives account values for 24 cost centers for one account number. Then it calculates the percentage of the total for each cost center. It is this percentage figure that is my shared variable that I want to use on the main report in formulas. There is one formula for each of the 24 cost centers and I actually will have 24 shared variables; one for each of the cost centers.
The subreport is in the group header (the group is account number) and the reports are linked by account number. I did create a shared numberVar for each of the 24 percentages from the subreport. But it always shows as zero and therefore doesnt do the calculation I need done.
Even if I show the account from the subreport on the main report, the formula STILL shows as zero. I declared the first variable on the main report like this:
whileprintingrecords;
shared numberVar A;
SUM({%A Edison AT4009}, {tblGLBLBalance.sCodeIDf_0}) +
A * {@AmtAllocbyGL}
I declared the variable in the subreport like this:
whileprintingrecords;
shared numbervar A := {@PercentEdison}
{@PercentEdison} is the formula that yields the desired percentage.
Please assist me with this annoying problem. Thanks!