Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Subreport in crystal reports v9 hangs...

Posted on 2010-08-18
10
Medium Priority
?
401 Views
Last Modified: 2012-06-27
Hi, I have a CR9 report with 2 Sql 2005 procs (1 in main, other in a subreport); main passes 2 values to sub. when running frm CR main report gets generated, but to get results from subreport - you have to click on next arrow for sub to run and outputs results. How can I have whole report generated w/o clicking on next page again ? So main report runs - stop - click on next button - sub runs - whole rpt is geneated...
0
Comment
Question by:ivan_belal
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 11

Expert Comment

by:tickett
ID: 33474321
This doesn't sound like normal behaviour. Could you provide some screen shots?
0
 
LVL 16

Expert Comment

by:13598
ID: 33475095
A couple of things to check for is:
-Make sure your parameter in the main report links to the proc's @parameter in the sub, not the ?PM-parameter.
- Try using Database/Verify OnEveryPrint in your subreport.
 
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 33482205
Do you wait for the report to generate?

Is this in the designer?

Crystal does render the report one page at a time and if you click to the next page before the page has generated it can seem like the report is waiting for the next page click.

mlmcc
0
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

 

Author Comment

by:ivan_belal
ID: 33485097
Yes from designer I am running. Lower left shows Accessing database - main report gets generated - but sub report does not - you have to click on next page for Accessing database to come on again - and sub report is generated. From main report - parameters linked to sub are not using ?PM. Any troubleshooting steps ? thanks,
0
 
LVL 16

Expert Comment

by:13598
ID: 33485177
Well the timing would be an issue. Which section is your subreport placed in? If it is in a section before any record has actually been read it would explain why it will be blank or if the field you have it linked to is blank on the first pass.
Also make sure that you did not select the On Demand Subreport flag for your subreport or it will behave like you describe.
0
 

Author Comment

by:ivan_belal
ID: 33485207
Main report uses a Sql 2005 proc with 2 parameters using detail section. Subs are on main report footers (a,b,c sections) 2 parameters are linked to each of those subs - subs also using SPs - On demand is not checked...
0
 
LVL 16

Accepted Solution

by:
13598 earned 2000 total points
ID: 33485239
Insert another detail (or group if you have groups I am not sure you do or don't) section and move the subreport to it so we can see if the issue is the section it is in.
0
 

Author Comment

by:ivan_belal
ID: 33485270
Sounds like you perhaps on the right track. It could be timing issue. Let me try and get back, thanks.
0
 
LVL 16

Expert Comment

by:13598
ID: 33485552
If the subreport works on the Page Footer you could add another page footer section to contain the subreport but making the section suppress if not OnLastRecord.
OR you could also try leaving the subreport on the report footer but creating two formulas in your main report. The formulas will have the parm value, for example:
Formula1      content would be     @Parm1
Formula2 content would be @Parm2
and then link the subreport to Formula1 and Formula2.
 
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 33490420
Does the subreport show on the second page?

Crystal sometimes does wait for the next page to be clicked before it renders the second page of the report.

What happens if you click to go to the last page?

mlmcc
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Screencast - Getting to Know the Pipeline

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question