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!

What are the advantages of sub-reports ? 1

Status
Not open for further replies.

CaptainD

Programmer
Joined
Jul 13, 1999
Messages
644
Location
US
Crystal reports XI

I'm learning crystal reports and understand and have created a couple of sub reports so I know how to use them.

The report I'm working on now uses the same data, it just views it in different ways.

One section counts the number of records by category, another shows dollar values, another shows totals and precents by another category.

Since I'm using the same "block" of data, am I better off using group headers and footers to show the different sections or would it be benificial to use sub-reports?

Seams to me that since I'm using the same "block" of data, sub-reports would create extra overhead to the report since each sub-report would pull in the same data. Or am I missing something?

Just trying to figure out when to use sub-reports and when not to.
 
You might be able to use multiple crosstabs instead of subreports. Crosstabs process more quickly. Try placing them in report footer sections if you are looking for report totals by various categories.

-LB
 
I'm planning on using 5 crosstabs for the report with some portions of the report only needing simple formulas which would go in groups Headers or Footers depending on the design (Still working on that).

My question is when and when not to use sub-reports.

The only time I see and advantage to them is when you are using different datasets.

 
Hi,
If the data in a report depends on data returned by another query ( report) then subreports may be the only way to coordinate the information.

They are inefficient sometimes and have to be inserted in the correct section, but sometimes, they are what is needed.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
If I understand you corectly, When the query from say the main reports is used to generate (query) the data for the sub-report.

I'll look into it further,

Thanks

 
As lbass says, you can use crosstabs to show the same data in several different ways. But sometimes you'd want to use the extras that grouping has and crosstabs do not. Selected detail records, for instance. Or tests based on the maximum value in a group.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Hi,
yes..You can ( and should, if using subreports) link a field in the main report to a field in the sub so that the data returned in the sub is based ( at least in part) on the value of that field in the main. It acts like a record selection formula ( although the sub can have additional criteria added as well)



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top