Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Passing parameters to subreport problem Post Reply Post New Topic
Author Message
msubash26
Newbie
Newbie
Avatar

Joined: 01 Nov 2010
Location: Singapore
Online Status: Offline
Posts: 1
Quote msubash26 Replybullet Topic: Passing parameters to subreport problem
    Posted: 01 Nov 2010 at 11:18pm
Hi All,

I'm trying to pass a parameter to subreport and embed it in teh main report. When the main report query returns value (from 3 tables on Join) the sub report as well return values.
But if the main report doesn't return ant value based on the param passed my sub report as well not executing. I tried to remove the dynamic content in the subreprot and tried with static content alone.
It seems the sub report is not at all being generated if the main report returns 0 values.
Can you please help me out to decouple the binding between the main and sub reports? I wanted the sub report to be generated irrespective of parent report.

Thanks a lot.

Regards
Subash
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 03 Nov 2010 at 3:35am
you need to remove / change the parameter in the subreport that is limiting the information returned...at least that is my first thought.  You probably have to move the subreport to another section...No detail main, no reason to call the subreport.
 
I don't use subreports very often as they are not the most effective method.  Every subreport generates another hit to the database, which can cause a report to run slower.  I get all the data I need in a stored proc and generate the report off of that...only 1 hit to the database.
 
For me, using the method as described, if there is no detail line, there is no subreport, which means that the data might need to be displayed in another section, or that the subreport will be repeated for multiple detail lines as the conditions haven't changed, so the same report is generated.
 
HTH
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.