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

Two subreports in main rpt

Status
Not open for further replies.

S3066

Technical User
Aug 1, 2001
66
US
Hi Group,

I have a main rpt with two embedded subrpts. I'm using shared variables.

There are two group fields in the main rpt. One subrpt is placed in the main rpt's first group header; the second subrpt is placed in the main rpt's second group header.

I'm using shared variables in Crystal 8.0.

Each time I've tried to run the main rpt, no preview pages appear. The report doesn't seem to freeze or crash per se, because I can still go into the Crystal app and even see, at the bottom RH corner, "3735 of 3735," the total number of records processed in the main rpt. The main rpt just seems to hang in running mode.

Has anyone else experienced this problem? I have a feeling it's with the subrpts, but I've double- & triple-checked my shared variable references and such, and I can't find anything wrong. Any advice or insight is much appreciated!

--SL.

 
Here are some troubleshooting suggestions:

Check your subreport links and how they are used in the subreport record selection. You may not be getting any records returned.

Try saving the subreports as stand-alone .rpt files and see if they work by themselves.

What is the data basis for your main report? Maybe it doesn't return any records. In this case, your subreports will not be run because they are in the group header and there are no groups. Try moving the subreports to the report header and see what happens.
 
It sounds like the MAIN report is hanging before it even tries to run the subreports? Does it work if you delete the subreports? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Hey guys, thanks for your replies.

To answer some of the questions posed above:

(1) The main report runs fine without the subreports. And yes, there is main data in the main report.

(2) The subreports run fine in and of themselves. In fact, before trying to run the main report, I had saved each of the two subrpts as ".rpt" files.

One note I will say, though, is that the main report does take a while to run (relatively speaking), so perhaps trying to embed two subrpts in an already-complex main rpt is too much for Crystal to handle ... ? Perhaps what one Tek-Tips user said is appropriate here: in this case, maybe what I need to do is push the data over to something like MS Access instead of trying to manipulate it in Crystal.

Any thoughts? Anyways, thanks for your help thus far. -SL.
 
The subrpts are linked to the main rpt as follows (as best as I can explain in words):

The main report is grouped by a "Location" field (e.g., various locations in our company). This Location field group is what is linked to the first subrpt. This first subrpt is inserted in the main group #1 header.

I created a second group field in the main report because of the following situation:

One of our location groups has a subset of people who need to be reported out separately. How to display these people under the single, appropriate location? By creating a second group in the main rpt, I was able to Suppress when Blank, so that those subset of people appeared under the right location only.

This second group field is what is linked to the second subrpt, inserted in the main rpt group #2 header area.

I still can't figure out what's wrong with my main rpt processing. It seems to like to hang. Oh well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top