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!

Subreports Not Running

Status
Not open for further replies.

TEM3

Technical User
Dec 6, 2004
324
US
Using Crytal Reports 8.5 and Oracle 9i tables.....

I have a report that tracks three activities (or sets of stats). A main reports that tracks assignments received. A subreport that tracks assignments completed. Another subreport that list assignments pending. Problem is that if there are no new assignments on a particular day (no records in the first main report), the subreports do not run, so I get a totally blank report. How can I force the subreports to run when there are no records in the main report?
 
What you need to do is have a section that appears when the report runs and finds no records.

Have a section that says something like "*** No Records Found ***". Right-click on the section and choose Section Expert. Choose the formula icon (x+2 and a pencil) for suppression. Enter a formula; e.g.
Code:
not isnull({your.field})

This could be in the main report, the subreport or both.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
I tried your suggestion in every variation I could come up with with no sucess. I did have another thought as I struggled with the same problem in a similar report:

In this report I have a name/person grouping (as group section 1). I have a crosstab to count completed assignments in footer 1a. A subreport to count reviewed assignments in footer 1b. A subreport to count approved assignments in footer 1c. It all works as long as the person has done all three in the measured period of time. No activity in #1 and you get nothing. No activity in #2 and you do not get #3 (assuming there is activity in #3).

I was thinking maybe it is more to do with passing the person's name code to the subreport?? If no records are found in the first query, then perhaps nothing (no name code) would be passed to the next subreport?

If that might be the problem, how can I force the name code into the next subreport even when no records are found in the previous?
 
You might be better off using a table that includes all names as your main report, and then use a subreport also for the completed assignments piece. Make sure you have no criteria on the main report that exclude any names.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top