Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Repeat Group Footer on each page

Status
Not open for further replies.

lana123

Programmer
Aug 20, 2003
79
US
Hi,
I’m using CR IX and Oracle 9i.
I have a subreport that contains notes grouped by note name and the date written on. At the end of the report I have an Index list – it contains note’s category, date written on, and a page where every note's prints out.
For my Index list I created output - string arrays: note category array + date array +page array. It works fine and I put the formula into subreport’s footer.

My problem is that this array prints out on several pages but “Index” word(simple Text Box with the name)doesn’t move to the next page(and I want it be above the rest of Index list).

I tried to create fake Page Header/Footer for subreport and place one Index box into GF – a; another Index box into GF- b, @indexPrinter(with the string array) into GF- c and conditionally suppress one box for one footer page, another box – for the rest of Index list on the next page but I didn’t have any positive results.
Please help
Thank you everybody in advance
Lana
 
Unfortunately, while you can create dummy page headers for subreports using grouping, the same technique does NOT work for footers. The group footer will not print until the actual end of the group. Here is one possible option (I have not tested this, so I don't know for sure whether it will work:

1. Create a shared boolean variable used in three formulas - I'll call these {@SetPageStart}, {@SetPageEnd}, and {@SetPageValue}.

{@SetPageStart}
Shared BooleanVar nextPage = false;

{@SetPageStart}
Shared BooleanVar nextPage = true;

{@SetPageValue}
Shared BooleanVar nextPage;
nextPage

2. Put {@SetPageStart} in the Group Header that you are using for your Page Header.
3. Create a running total in the subreport that will count the number of records - I'll call this {#RecCount}. Have it reset by formula:

{@SetPageValue}

Note that you don't need to add "= True" to this - the value is already True of False!
4. Assuming that visually there will only be one row per index entry (i.e., there are no entries where "Can Grow" will create a second line for an item), determine how many rows will fit on a page.
5. Assuming your data is in details sections, create a second section that is formatted for your page footer. In the Section Expert, turn on New Page After and set the Suppression formula to something like:

{#RecCount} < x

where "x" is the number of records that will fit on a page.

-Dell

DecisionFirst Technologies - Six-time SAP BusinessObjects Solution Partner of the Year
 
Hi,hillfy
Thank you very much for the respond - I tried several times with the different variations your solutions but unfortunately it doesn't work.
I would like to specify some things with you:
1.{@SetPageStart}
Shared BooleanVar nextPage = false;

{@SetPageStart}
Shared BooleanVar nextPage = true; <- why does one formula has the opposite values - I decided you meant @SetPageEnd for the second one?
2.I cannot reset the running total by formula {@SetPageValue} because it doesn't shown in Available list Fields set.
3.My array for Index list contents cannot be in Details - it's in group footer because the string arrays(which is in formula
@IndexPrint:
//this function prints the arrays built throughout the creation of the report
WhilePrintingRecords;
local NumberVar i;
local NumberVar vPage;

shared StringVar Array catArry;
shared NumberVar Array pageArry;
shared StringVar Array dateArry;
StringVar Array Output;

Redim preserve Output[UBound(catArry)+1];
FOR i := 1 to UBound(pageArry) do (

vPage := pageArry;
Output := catArry + dateArry + Left(CStr(ToText(pageArry + 2,0)),200);
);

Join(Output,Chr(13))
) reads all the notes' titles from Details section and assings the page for every new note title. My problem that I cannot show any title(I need "Index" at the start of a new page)when the string array I listed above moves to the next page.

Thank you very much for your help,
Lana
 
You have to use a counting method as Hilfy suggests. Her formulas were missing the colon to set the true/false values (should have been := ). But if you want the index to start right after the detail section of the sub, it means you would have to count the lines on the page in the main report, pass that number to the sub, and then suppress a detail_a section (where you have added a text box containing "Index") when except when the value is some multiple of the line number+1 (to move it to the next page), e.g., using a formula like this:

shared numbervar lineno;
lineno<>45

If you could have more than two pages of indices, you would then have to adjust this formula to allow for the additional detail_a on each subsequent page.

-LB
 
Hi,lbass and thank you very much for the answer.
You and hilfy send me very interesting solution but unfortunately - it's not really matching to the problem I have...

1.I don't need to count the lines in the main report(plus it represents main data report and 6 subreports.The report with what I have problem - the last one.)
2.My Index lines always start the new page in the report but the list is very long and the lines move to the next page.The column looks unprofessional without "Index" word on top so I need this list would break down and this "Index" word appears on the top of the next page.
Example how it looks:
Index
Category1 page 3
Category2 page 4
Category3 page 4
....................
Next page starts as(without "Index" on top - THIS is my problem)
Category8 page 7
Category9 page 10
....................
3.All data is in the group footer of subreport.
4.All my Categories & pages are shown through Output array(CategoryArray+PageArray)

So, I may be I had to count number of Category lines on GroupFooter?
I placed {@SetPageStart} in GroupHeader,what do I have to do with {@SetPageEnd}? Unfortunately, I still cannot see {@SetPageValue} when I edit the running total...
May be I have to add anything else?

Thank you very much for help,
Lana

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top