I hope somebody can help me with this.
I have a main report with 2 subreports that have been working fine requesting info for only 1 fiscal pd. Now they want a range so I changed the selection formula to the following:
(tonumber({OESHDT.YR})=tonumber({?FiscalYear}) or tonumber({OESHDT.YR})={@LastFiscalYear}) and
{OESHDT.PERIOD}=tonumber({?begFiscalPeriod}) and {OESHDT.PERIOD}=tonumber({?endFiscalPeriod}) and
{OESHDT.SALESPER} in {?SalesRepFrom} to {?SalesRepTo}
and reset the links to the subreports.
I then changed the shared variable declarations in the subreports, here is the the declaration from one of the subreports:
WhilePrintingRecords;
Shared numberVar array currtotal ;
currtotal[1]:=currtotal[1]+{@SaleQty};
currtotal[2]:=currtotal[2]+{@SalesAMT};
currtotal[3]:=currtotal[3]+{@SalesRet};
Shared numberVar array currrep;
currrep[1]:=currrep[1]+{@SaleQty};
currrep[2]:=currrep[2]+{@SalesAMT};
currrep[3]:=currrep[3]+{@SalesRet};
Here is an example of the formulas for the SalesAmt:
IF ISNULL(Sum ({OESHDT.FAMTSALES})) THEN 0
ELSE Sum ({OESHDT.FAMTSALES})
And the Shared Variable declaration in the main report where I am tryin to print the results:
WhilePrintingRecords;
Shared numberVar array currrep ;
Shared numberVar array lastrep ;
totext(currrep[2],2)+chr(10)+totext(lastrep[2],2)
The report works fine if I choose a single fiscal period for example 01 to 01, but if I choose multiple it doesn't bring up any data. It makes me think it has something to do with the running total funciion but it looks correct to me. Anybody have any ideas?
Thank you much in advance.
Mfroggie
Mfroggie
I have a main report with 2 subreports that have been working fine requesting info for only 1 fiscal pd. Now they want a range so I changed the selection formula to the following:
(tonumber({OESHDT.YR})=tonumber({?FiscalYear}) or tonumber({OESHDT.YR})={@LastFiscalYear}) and
{OESHDT.PERIOD}=tonumber({?begFiscalPeriod}) and {OESHDT.PERIOD}=tonumber({?endFiscalPeriod}) and
{OESHDT.SALESPER} in {?SalesRepFrom} to {?SalesRepTo}
and reset the links to the subreports.
I then changed the shared variable declarations in the subreports, here is the the declaration from one of the subreports:
WhilePrintingRecords;
Shared numberVar array currtotal ;
currtotal[1]:=currtotal[1]+{@SaleQty};
currtotal[2]:=currtotal[2]+{@SalesAMT};
currtotal[3]:=currtotal[3]+{@SalesRet};
Shared numberVar array currrep;
currrep[1]:=currrep[1]+{@SaleQty};
currrep[2]:=currrep[2]+{@SalesAMT};
currrep[3]:=currrep[3]+{@SalesRet};
Here is an example of the formulas for the SalesAmt:
IF ISNULL(Sum ({OESHDT.FAMTSALES})) THEN 0
ELSE Sum ({OESHDT.FAMTSALES})
And the Shared Variable declaration in the main report where I am tryin to print the results:
WhilePrintingRecords;
Shared numberVar array currrep ;
Shared numberVar array lastrep ;
totext(currrep[2],2)+chr(10)+totext(lastrep[2],2)
The report works fine if I choose a single fiscal period for example 01 to 01, but if I choose multiple it doesn't bring up any data. It makes me think it has something to do with the running total funciion but it looks correct to me. Anybody have any ideas?
Thank you much in advance.
Mfroggie
Mfroggie