O'Reilly logo

Crystal Reports® 2008 For Dummies® by Allen G. Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 11. Creating Reports within a Report

In This Chapter

  • Combining unrelated reports, using subreports

  • Linking a subreport to the data in a primary report

  • Using subreports with unlinkable data

  • Creating an on-demand subreport

  • Passing data between reports and subreports

  • Troubleshooting problems with subreports

In other chapters, you see how to build reports based on the data contained in several related tables in a database. This is wonderful, but sometimes you want to build a report that displays data from two or more sources that are unrelated or related only indirectly. Crystal Reports meets that need by enabling you to embed one report in another: a subreport. Subreports allow you to take data from diverse sources and present it on one or a small number of pages, for ease of comprehension.

Combining Unrelated Reports

A standard report created by Crystal Reports can't display data from two tables that are not linked, but a subreport can. You use subreports when you have data tables that are unrelated or have an indirect relationship. With a subreport, information that doesn't need to be directly related to information in the primary report can be presented in a compact and convenient form.

The easiest kind of primary report/subreport combination to produce is one in which the two reports are unrelated but are of interest to the reader. Because the primary report and the subreport aren't directly related, you don't need to worry about linking them. Aside from the details of building the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required