Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: QueryString to Dynamic Parameter Post Reply Post New Topic
Author Message
dovrlrd
Newbie
Newbie


Joined: 10 Apr 2008
Online Status: Offline
Posts: 8
Quote dovrlrd Replybullet Topic: QueryString to Dynamic Parameter
     Posted: 17 Sep 2009 at 7:41am

I can pass parameters via a querystring to a Crystal Report rather easily using ASP.

However, is there a way to use one of those passed parameters as the first Parameter of a Dynamic Cascading set of Parameters?
 
Example:
 
I have an ASP Button. It passes a parameter Company Name via a querystring entry named webCO to a report.
 
In the report this Parameter is named ?webCO.
 
Now when the report loads, I want the selection screen to come up so the user can choose the Cascading Dynamic Parameters.
Regions
  Districts
    Sales
 
But, of course, I only want the user to see the Regions in the webCO (Company), as if the webCO was actually at the top of the Cascading Parameters.
 
I get the CO to equal the webCO as a Filter.
And I can build the Cascading Parameters with its corresponding Filters.
 
But, when the User fills in the parameters, they see all the Regions regardless of whether they are in the Company Name or not.
 
Is there a way to tie them together? The end report works, but not as I imagine it should. It shows the users options that I would like filtered down by the incoming querstring Parameter. 
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 17 Sep 2009 at 9:31am
2 caveats, I don't web program, and I no longer use the CR parameter screens.
 
With that said, I would try creating a Command object in the report that would simulate the company and link it to the tables as desired. Then I would build the dynamic parameter list using the command as the top level. Last (maybe first) I would see if I could update the command object via the ASP interface.
 
If that doesn't work, another idea I have is to create a table that is ADO.Net based (Just tried and you can have multiple data sources in a report), now the tricky part, update the XML (ADO.Net) table with the company that has been chosen.  Still link the table to the top of the Dynamic Parameter list.
 
Should  work...hopefully it gives some ideas of how to proceed.
 
 
IP IP Logged
dovrlrd
Newbie
Newbie


Joined: 10 Apr 2008
Online Status: Offline
Posts: 8
Quote dovrlrd Replybullet Posted: 17 Sep 2009 at 11:23am
That was exactly the nudge I needed. Thanks.
IP IP Logged
dovrlrd
Newbie
Newbie


Joined: 10 Apr 2008
Online Status: Offline
Posts: 8
Quote dovrlrd Replybullet Posted: 17 Sep 2009 at 12:45pm
Used your suggestion, now I feed the parameter to a query that pre-prepares the data before the Crystal Report Pulls it in to use with the Cascading Dynamic Parameters.
 
Thanks, I just needed a whack on the side of the head to think outside of the Crystal report Box.
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 17 Sep 2009 at 3:03pm
glad to be able help
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