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!

subreport locations

Status
Not open for further replies.

deetee2k

Programmer
Nov 25, 2000
90
0
0
IE
Hi,
Is it possible to place a subreport in the report footer? I find that a subreport will only work when placed in a group or the details section.
Thx
D. "I want to play..."
(Guess the episode!)
 
an unlinked subreport can be put in a report footer...certainly Jim

JimBroadbent@Hotmail.com
 
Apologies, didn't make myself clear...

I have a linked subreport placed in the report footer using the parameter field from the main report. All I want to do (to start with at least) is reproduce the data from the main report in the subreport, however every time I prompt for new parameter values my main report is populated correctly but the subreport comes out with no records!

Perhaps you know of a workaround to this? I was thinking of placing the subreport in the group footer and conditionally supressing it so it printed only once at the end??

Ta,
D. "I want to play..."
(Guess the episode!)
 
I don't really understand what it is you are doing with the subreport....is it a summary of values created in the main report??

if so...why don't you just collect the data you need and save it to variables while in the main report then using formulas just display the results in the report footer.

I don't think you need a subreport Jim

JimBroadbent@Hotmail.com
 
Something to test your subreport with.. Save the subreport by itself outside the main report and try running it and see if it populates. It could be the linking you are using and the first place I'd check is your record selection criteria within the subreport.
-Bruce Seagate Certified RCAD Specialist.
-Bruce Thuel-Chassaigne
roadkill150@hotmail.com
 
Ta Bruce,

The subreport populates fine with the {?pm-...} default parameter and the parameter selection box informs me the main and subreport views will be refreshed. The parameter is a date range and I have to change the subreport's parameter format from a single date/time to a date range to match the main parameter field (thought it may have to do with inconsistent datatypes).

However my main question is, do subreports work in a report footer? Or does the location of it matter? All the examples I have seen place the subreport in the detail or group footer section.

Thx

D. "I want to play..."
(Guess the episode!)
 
location matters if the subreport is linked to data returned by the query generated by the Crystal Report itself...if the subreport is independant of the data returned, you can place it anywhere...the page footer or report footer if you want Jim

JimBroadbent@Hotmail.com
 
If the subreport is coming back with no data and your only condition is the parameter from the main report, you may not be passing the condition for some reason. Try creating a shared variable in the header of the main report that accepts the value of the parameter. Then pull the subreport on the condition of the shared variable rather than the parameter.
 
MJSQA suggests a shared variable solution.

But you can't use a shared variable in record selection formulas.

Check your record selection formula - the Select expert sometimes gets a bit confused here, so go direct to the formula.

I've had no problems with subreports in a report footer. Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top