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

Subreport Page Header Issue

Status
Not open for further replies.

Rooski

Technical User
Sep 28, 2004
44
US
I am using CR 10.0 that reads an Oracle database (not sure of version).

I have created a main report and unlinked subreport. Both reports list very similar data. Different conditions (individuals who have 20 hours to complete a task and individuals who have 24 hours to complete a task) result in different names being listed in each report:

Column Headers for the Main Report: The 20-Hour Report

Name Begin Date & Time Begin Date & Time +20 hours

Column Headers for the Sub Report: The 24-Hour Report

Name Begin Date & Time Begin Date & Time +24 hours

Both reports are grouped on name.

I have a page header set up in the main report with the appropriate column literals over each column of data which means it displays the +20 hours literal.

I have managed to incorporate the "fake" page header feature in the subreport so page headers print in the subreport as well. The problem is I want to substitute the +24 hour literal for the +20 hour literal in the subreport page header.

Is there anything in CR that allows one to determine when subreport time has been reached in the logic cycle or, conversely, when the end of main report time has been reached? If so, I could set up a formula based on that condition and embed it in the page header literal. Or is what I am trying to do not possible?

 
Why not post where your subreport is within the main report?

In a section prior to the subreport (or right click the section that it's in and select insert section below, then move your subreport into it), create a formula such as:

shared stringvar Newtitle:= "24 hour period"

Before or After you run the subreport (depending upon where it is), you can the reset it using:

shared stringvar Newtitle:= "20 hour period"

Now the display column will simply have:

shared stringvar Newtitle

-k
 
Sorry about not mentioning in which section of the main report the subreport is located. The subreport is in the Report Footer of the main report.

I tried doing what you suggested, but I must be missing something.

I have a formula (@Newtitle) defined with a shared variable containing the 20-hour literal. I placed that formula in the page header section of the main report (the main report is the 20-hour report). That action results in the 20-hour literal displayed in the main report and sub-report.

I then inserted a report footer section below the existing report footer section and moved the subreport into it. What I can't figure out is how to reset the shared variable to 24-hour "in" the report footer (a) that is now prior to report footer (b) that contains the subreport. Do I somehow use the section expert to do that? I didn't see an obvious way of doing that in the section expert.

Thanks, Rooski
 
Place it in the Report header of the subreport

-LW
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top