Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Help:Parameters repeating while refresh? Post Reply Post New Topic
Author Message
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Topic: Help:Parameters repeating while refresh?
     Posted: 20 Oct 2009 at 2:47pm
Hello Folks,
                   I have Main report which has like 3 subreports inside in it. Main report doesnt have any parameter.Now Each subreport has a parameter called "Frequency" inside in it which is dynamically coming from the stored procedure.
Now my problem is when am refreshing the Main report i can see The Frequency Parameter repated 3 times for each Sub report.
 
How do i link the subreports from the main report so that i should only see the "Frequency" parameter once.
 
I did like this and am not sure whether  its correct or not
 
i created a new parameter in the main report say "Frequency" and Right click the subreport and went to the "change subreport linking "and inside in it select  the "Frequency" from the left side and at the bottom u will have "subreport parameter field to Use"
 
This is the part am confused, shall i use the following one
 
"?Pm-Frequency" or the "FREQUENCY" param which is already present.
 
 
Please advice.
 
Thanks
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 21 Oct 2009 at 6:48am
probably the param, at worst, try them both, one should work correctly and one shouldn't (it's been a while, so I am not positive). As you are aware, you just want to link your user entered parameter to the stored procs parameter.
 
I don't like subreports, if I can avoid them.  In this case, since are already using a stored proc, you might be able to remove the subreports. 
 
Why I don't like them.  For your example, if there are 100 records in your main report, you are calling the database 301 times. 
 
How to get around subreports...what are subreports, just more data linked to the 'main' record. So to get around the need of a subreport...or at least the stored proc to get the data for the subreport, make a stored proc that includes all the data that you need for all of the subreports.  Displaying the data, is usually just a matter of grouping/additional details sections...and at the very worse, you can still use your subreports, just use the same datasource that you are have and link on the fields.  This is what I do when I have to use a subreport...Since Crystal already has the data, there is not another 'hit' to the database (I use disconnected recordsets, so there is not a possibility of another hit)
 
 
 
IP IP Logged
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