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

Disappearing Sub-Reports at Run-time

Status
Not open for further replies.

marabou

IS-IT--Management
Jan 12, 2001
86
GB
I have a very weird problem.
I have two sub-reports in my report, both of which are very similar, onw works fine but for some reason one of the subreports sometimes doesn't display within the main report. However I can drill-down to the information, so it isn't as if the information isn't being selected from the database.
I am completely at a loss as to why this is happening and would appreciate any help anyone could give me.

Thanks in advance.
 
Is it on the second page?
It won't run until you get to the page.

If this isn't it, give a more detailed description. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
No, it isn't on the second page, there is only one page to the report.

I am changing groups at runtime based on whether a field value is null. I have two subreports which are displaying the same thing, one for each of the groups, which are connected using the same parameters. (The reason for this is I have had to duplicate one of the tables to get the right information). However, concerning the subreport which isn't displaying properly; it isn't as if it is not displaying anything at all, rather that indiscriminitely it is not displaying the info on the main report and the info only appears at drill-down level.

Hope that is enough info.

Thanks in advance.
 
I have linked both subreports to the main report. For some of the records it does display the data on the main report and for others it doesn't, although the data is there at drill down. The other subreport works fine which is pretty much a mirror image. It has completely stumped me.
 
What section are the subreports in?
What exactly is different between these two subreports. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Each supbreport are in groups of customerID's, if a customer is an agent (dependent on another table) then the agent group is displayed and the subreport is sometimes displayed with it, depending on whether it works or not. If a customer is a direct customer, that subreport is displayed in another group of customerID's. Which actual group is displayed gets sorted at runtime, depending on whether an agent or a direct customer purchased the product.

The grouping works fine as the other information which is within that group, but not within the subreport is being displayed, and what I can't understand is why would the info be there at drill-down, but not on the main-report. It's not as if it is never there, only when it now and again, there are no formulas or anything that should be affecting the data, which is why I am stuck. There is also no pattern to the details which aren't displaying themselves on the subreport.

Hope that's clearer.
Thanks in advance.
 
The drill down has nothing to do with your subreport. Drill down shows the hidden details of the main report. The subreport calls its own data from the database, it does not get its data from the main report's drill down.

If the subreport isn't printing, then it isn't getting data. So to help you troubleshoot:

What is the link field between the main report and the subreport?
What is the selection formula of the subreport (paste it here). Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Hi Marabou,

I know it's been a few days, but I just subscribed. I found this question helpful. I'm going through the exact same thing. I inherited a report from someone else.

I had to modify the database references, etc. of the report. I started with the subreports first, leaving the main report. I was able to see all of the subreport data on the main page prior to modifying the main page. After modifying the main page, my subreport data seems to have "disappeared", but if I clicked on the individual tabs of the subreports, the data's there just fine.

The workaround for me was this:
You might want to backup your original report first before testing this out. :)

- From the main report, right click on the subreport and save it to a directory.
- Delete the subreport from the main report.
- Do Insert / Subreport / Choose a Report / <enter the saved subreport>. (Don't check the &quot;On-demand&quot; box unless you want a link.)

At that point the report will probably ask you to refresh data, etc. When I refreshed, the data re-appeared.

I think what the guy was saying before was right about ensuring the link from the main report to the subreports, but if you change anything in the report, you'll have to re-link.

I'm not an expert by any means. This is my 2nd week ever touching Crystal Reports, but I hope this helps you.

scripter73

 
I solved the problem by redoing the subreport. I found that for the subreport, I had chosen the wrong table as my main table (all though I didn't know that at the time).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top