REports and sub-reports in Crystal Reports

REports and sub-reports in Crystal Reports

Post by Michel Vanderbek » Tue, 15 Jun 1999 04:00:00


In my project, I have a table with persons and a table with telephone
numbers.  The one or several records in the telephone table (depending on
the case) are linked to the persons table.  All that works fine in VB5.
In the Crystal report, I want to display the information of each person on
several lines an next to it the line or lines with the according telephone
In Access reports, I can do this by putting a sub-report in a report.
Is this also possible in Crystal Reports

Greetings from Brugge (Bruges - Belgium),



1. Crystal Reports/SQL 2000 - Reporting from a Stored Procedure with multiple selects (for a sub-report)

I'm having a few problems, that I'm hoping someone can help out with (I
apologize for the cross-posting, but I wasn't exactly sure which newgroup
this should go into).

I've got a VB 6 application to which I'm adding a new report, for which I'm
going to use Crystal 8.

The report itself is actually a report with a sub-report. To generate the
data, I created a stored procedure (that takes a single optional parameter)
that would tabulate the data as needed, and then would return two separate
SELECT statements, the first for the main report, the second for the

So my problem is on several fronts:

1) How do I set up the VB code and/or the Crystal RPT file to use a Stored
Procedure as the source, including the logic for either not passing a
parameter (as a default), or for passing data that the user had selected
(coming from another form in VB)?
2) How do I set up the RPT file to differentiate between the two SELECT
statements coming from the Stored Proc?

Note: Originally my plan was to have a stored procedure (called by VB) that
would create a table of the data, and then have two views that the RPT would
reference. This way I could create the data based on whether (or not) the
user needed to have it send a parameter. Unfortunately, the reason I had to
abandon this logic, is if two users tried to access the same report at the
same time (especially if the two users passed different parameters to the
stored procedure), there would  be a conflict, since the table is a regular
table. I couldn't use a temp (#) table, as I don't believe it'd be able to
find the table going between the stored procedure that created/populated it,
and the VIEW that Crystal would call.

Any ideas?


2. crossplatform update

3. Crystal Reports - Main/Sub Reports

4. Urgent Need - Sybase DBA

5. Question: Outer Joins in MS SQL-Server when using Sub-Reports of Crystal Reports

6. Ade'le from Verilog?

7. Delphi 2.0 and Crystal Reports Version 5 (Regarding Sub-reports)

8. Swiss Sybase User Group meeting

9. How can I extract sub-total from a sub-report into the main report

10. Reports, reports, reports, reports.....REPORTS!

11. Announcement: Easily integrate Crystal Reports with Remedy with UFLTimeZone for Crystal Reports

12. Editing Crystal reports without Crystal Reports