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

Reusing subreports, changing a parm value each time 1

Status
Not open for further replies.

ChristianWhite

Programmer
Jun 14, 2004
41
US
I'm designing a report for a publisher, with a summary of five publisher subreports at the end.

A publisher may have an unspecified number of journals; each journal occupies a detail line comprising 25 journal subreports.

The main report should print a detail for a journal such as Popular Mechanics with its 25 subreports, then Time with its subreports,
then Newsweek with its 25 subreports--then a five-subreport summary for the publisher.

After printing Popular Mechanic's detail line, then, the report should print Time's detail line with the same 25 reports.
I'm wondering, though: Can I reuse subreports in the same main report--changing subreport parameter values each time a subreport is called? "Popular Mechanics" the first time, and "Time" the second--or will Crystal prohibit it?






Here's a graphical presentation of the layout:




PUBLISHER ABC REPORT
(main report uses a stored procedure which returns data like this:
PUBLISHER ABC Popular Mechnanics
PUBLISHER ABC Time
PUBLISHER ABC Newsweek
--etc. This stored procedure should prompt with the correct journal name for creating each detail line,
in which the journal subreports reside)



JOURNAL: Popular Mechanics
--------------------------------------------------------------
Detail:
POPULAR MECHANICS SUBREPORT 1
POPULAR MECHANICS SUBREPORT 2
POPULAR MECHANICS SUBREPORT 3

(etc for POPULAR MECHANICS)
--------------------------------------------------------------

JOURNAL: Time
--------------------------------------------------------------
Detail:
TIME SUBREPORT 1
TIME SUBREPORT 2
TIME SUBREPORT 3

(etc for TIME)
--------------------------------------------------------------

SUMMARY
PUBLISHER ABC
PUBLISHER ABC SUBREPORT SUM1
PUBLISHER ABC SUBREPORT SUM2

(etc for Publisher ABC's summary)
 
Sounds like you want to group on the publisher, and then group by the jornal. Palce the intial subreports in the group b headr, and the summaries in group b footers.

When demonstrating example data, try to use:

Publisher Journal
Pub ABC Time
Pub ABC Sports Illustrated

Which demonstrates column/field names, rather than just referencing data and assuming that others will know what you've elected to call it.

A greta way to convey requirements is to demonstrate data as it is returned to Crystal (show the fields), and then demonstrate what you expect the output to be based on that data.

It is generally useful to share the database and connectivity as well.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top