Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Cascading Parameters with a Formula Post Reply Post New Topic
Author Message
chris
Newbie
Newbie


Joined: 02 Apr 2008
Location: United Kingdom
Online Status: Offline
Posts: 35
Quote chris Replybullet Topic: Cascading Parameters with a Formula
     Posted: 12 Mar 2010 at 7:50am
Hi all,
 
I have a table of data that contains team names. Unfortunately, the management level above teams is not recorded on the database and therefore I have to use a formula to work this out. This formula is called Districts.
 
For info, each of the 12 district has 3 teams.
 
What I would like is to have static cascading parameters on my report that first ask for the district (the formula) and then gives the choice of the 3 teams for the chosen district.
 
Any ideas how this could be done ??
 
Many thanks
 
Chris 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 12 Mar 2010 at 7:58am

You need 'district' to be in the source data to accomplish this. You can try adding it formaulatically via a view or stored proc or a crystal command.

You cannot use a crystal formula as a source for a dynamic parameter. 
IP IP Logged
chris
Newbie
Newbie


Joined: 02 Apr 2008
Location: United Kingdom
Online Status: Offline
Posts: 35
Quote chris Replybullet Posted: 16 Mar 2010 at 3:18am
Thanks for the reply,
 
I've now setup a table which holds the following: 
team id, team name, district name, area name.
 
When creating my report I link from the main dataset to this new table using the team ID field.
 
I have been able to create the cascading parameters and they work as expected.
 
The only issue I have now is how do I give the user the option of choosing ALL instead of picking a team, district, area from the list. I have seen that the asterix can be used as can the word ALL but I would like to keep the parameter as a drop down list rather than a box where they can type in.
 
Any help greatly appreciated.
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Mar 2010 at 4:15am
INsert an 'All' record into your source data.
I Usually use '...All' as the '...' makes it the first record.
In your select statement you use an OR statment for it.
({?Param}='...All' or (?Param}={table.field})


Edited by DBlank - 16 Mar 2010 at 4:23am
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