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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Repeat Report footer on multiple pages

Status
Not open for further replies.

dev1212

Programmer
May 11, 2010
117
US
Hi,

I want to repeat report footer section in multiple pages.

I have a report that has a group on field {ACNT.ACCNT_NMBR} and showing the details of that account and also summary of all accounts. The requirement was to have the details of account and also summary of all accounts without using subreports.

So i created a report with group on ACCNT_NMBR(for details) and created a cross tab(for summaries) and used it in report footer.

The report now has details as well as summaries.

The column headings for details and cross tab are not identical.

So i created column headings in page header section for detail report and column headings in report footer
section for cross tab.

I ran into issues because the headers in report footer is not repeating on every page as required.

Its like below.

Report Header
Page Header - Column headings for Details
Group Header - ({ACNT.ACCNT_NMBR})
Details
Group Footer
Report Footer A - Column headings for crosstab
Report Footer B - Cross Tab
Page Footer


Please let me know the solution if any.

Thanks
 
Add the crosstab column headings in a Page Header_b section. Then create these formulas:

//{@true} to be placed in the report header section:
whileprintingrecords;
booleanvar flag := true;

//{@false} to be placed in the report footer section:
whileprintingrecords;
booleanvar flag := false;

Then in the section expert->page header_b->suppress->x+2, enter:

whileprintingrecords;
booleanvar flag;
flag = true;// note no colon

This assumes you have the report footer section formatted to new page before.

-LB
 
Hi lbass,

Thanks for your reply.. The solution works perfectly when it is exported to pdf.
But not for excel.

Unfortunately the client will export the report to both excel and pdf.
And in excel the page header will be exported once per report.

Any idea how to make it work for both the formats.
 
You didn't mention exporting originally.

Can you explain why the headings that are generated in the crosstab don't work for you? What is the column field? How do you want the instances of that field displayed?

-LB
 
i've two rows and three summaries in cross tab, i guess it is not possible to have 'labels' for 2 rows, we can have labels for summaries. And when exported to excel the fields are getting exported with no uniformity. Fields were scattered all over the excel. So i had to have labels in report footerA section and cross tab in report footerB section
 
Page headers are the only section that will repeat on report footer pages, so you really are stuck with that method unless you can make the crosstab labels work for you. You can add row labels by creating formulas like this:

whilereadingrecords;
"Account Numbers"

You would add them as the first row fields in the crosstab and then in the customize style tab, you would suppress the subtotals created for these "rows." These will get displayed as outer columns to the left of the "real" columns. I often rotate the text 90 degrees and narrow the column. However, I can't vouch for exporting. I don't think crosstabs export well to Excel, but then I don't ordinarily export either.

When I just tried exporting a crosstab, there was an option to repeat page headers on each page. Why not use that setting?

-LB
 
Well.. i tried that but as you said its not getting exported that well with excel. I'll try to do it one more time.
Thanks for your input lbass.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top