Hello.
I have a created a budget report using CR 9 and this budget includes almost 100 different funds.
My report is grouped by the different funds.
I would like to create a table of contents that simply state the fund name and the page number that it starts on.
I have tried creating different arrays and sharing them with a subreport, but I cannot seem to figure it out.
I was wondering if there were an easy way to do this.
If there is no easy way, here is what I have tried so far:
In the subreport I have place the following in the details section:
This appears to be working just fine. The problem I am having is passing the pagenumber from the Main report to the subreport.
I tried the same procedure as above for the pagenumber, but the result is only the pagenumber of the subreport, not the pagenumber of the main report.
I hope all of this makes sense.
I have a created a budget report using CR 9 and this budget includes almost 100 different funds.
My report is grouped by the different funds.
I would like to create a table of contents that simply state the fund name and the page number that it starts on.
I have tried creating different arrays and sharing them with a subreport, but I cannot seem to figure it out.
I was wondering if there were an easy way to do this.
If there is no easy way, here is what I have tried so far:
Code:
In the Main Report Group Header:
whileprintingrecords;
stringvar array GroupNameArray;
numbervar groupcounter;
if not({@Fund_Names} in GroupNameArray) then
groupcounter:= groupcounter + 1;
if groupcounter <= 1000
then (redim preserve groupnamearray[groupcounter];
GroupNameArray[groupcounter] := {@Fund_Names})
In the subreport I have place the following in the details section:
Code:
whileprintingrecords;
stringvar array GroupNameArray;
Redim preserve GroupNameArray[Ubound(groupnamearray) +1];
GroupNameArray[ubound(GroupNameArray)] := {@Fund_names}
This appears to be working just fine. The problem I am having is passing the pagenumber from the Main report to the subreport.
I tried the same procedure as above for the pagenumber, but the result is only the pagenumber of the subreport, not the pagenumber of the main report.
I hope all of this makes sense.