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

How to show dynamic footer info depend on a set of subreports?

Status
Not open for further replies.

wfuyanli

Programmer
Jun 24, 2006
11
US
Thanks in advance.

My main report includes a few subreports(each subreport is in a different section), I need to show different foot information depending on which subreport is current.

For example, if the current subreport is "Income", it can be a few pages long, then I need to show "Income" in the footer for all those pages. If the next 10 pages are "Expense", then footer has to show "Expense". And I don't know how many pages before the reported is printed.
Can somebody show me how to do this? Thanks again.

wfuyanli
 
Shared varibles handle this.

Test by placing this formula in the main reports' report header:

whileprintingrecords;
shared stringvar Foot:= "Main"

Place this in the Main report Page Footer:

whileprintingrecords;
shared stringvar Foot

Place this formula in the 1st subreport:

whileprintingrecords;
shared stringvar Foot:= "1st sub"

Right click the section that the 1st subreport exists and select insert section below and place this in the new section:

whileprintingrecords;
shared stringvar Foot:= "Main2"

Suppress that new section.

This should handle the proof of concept, the point is you need to use the same variable throughout and change the value, and then reset it if you're going back to displaying the main report rows between the subreports.

-k
 
You are the best Vampire Ever! I still have something need you clear up for me. thanks.

Shared varibles handle this.

Test by placing this formula in the main reports' report header:

whileprintingrecords;
shared stringvar Foot:= "Main"

Place this (new formula?) in the Main report Page Footer:

whileprintingrecords;
shared stringvar Foot

Place this formula in the 1st subreport:

whileprintingrecords;
shared stringvar Foot:= "1st sub"

Right click the section that the 1st subreport exists and select insert section below and place this (new formular Again?) in the new section:

whileprintingrecords;
shared stringvar Foot:= "Main2"

Suppress that new section.

This should handle the proof of concept, the point is you need to use the same variable throughout and change the value, and then reset it if you're going back to displaying the main report rows between the subreports.

-k
 
Is the question what does new formula means?

It means that you've created a new formula.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top