Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Cascading parameters with Post Reply Post New Topic
Author Message
Erinmichelle
Newbie
Newbie
Avatar

Joined: 06 Nov 2009
Location: United States
Online Status: Offline
Posts: 24
Quote Erinmichelle Replybullet Topic: Cascading parameters with
     Posted: 25 Mar 2010 at 10:17am
I am trying to build a parameter based on two fields in my report but having a difficult time. What i want to do is have a parameter that says "Choose Generic Name or Trade Name."  Then depending on which the user chooses, then it would go to either a list of drug names in the generic form or a list of drug names in the trade form (both of those are fields in the report).  I'm not sure if this is even possible but any insight would be very helpful! Thanks!
Thanks!

Erin
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 26 Mar 2010 at 2:05am
This is possible if you have a field in your db that designates whether the drug is generic or trade. If so, create a dynamic string parameter where the {table.generic/trade} is the first value and the {table.drugname} is the second value.
|< /\ '][' ( )
IP IP Logged
Erinmichelle
Newbie
Newbie
Avatar

Joined: 06 Nov 2009
Location: United States
Online Status: Offline
Posts: 24
Quote Erinmichelle Replybullet Posted: 26 Mar 2010 at 9:07am
Well, it isn't a field.... does that make it impossible without creating a new field?
Thanks!

Erin
IP IP Logged
DBlank
Moderator
Moderator


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

How (in the table) do you determine if it is generic or trade?

IP IP Logged
Erinmichelle
Newbie
Newbie
Avatar

Joined: 06 Nov 2009
Location: United States
Online Status: Offline
Posts: 24
Quote Erinmichelle Replybullet Posted: 26 Mar 2010 at 10:01am

For each drug there is a generic name field and a trade name field.  So for the report we only want to call one of them, depending on which the user chooses, and then from there choose the specific drug(s) to run the report for.

Thanks!

Erin
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Mar 2010 at 10:23am
Interesting...
I think you will have to use the table twice and union the two tables togther. In table 1 create a field called TYPE and insert the text 'Generic" and then rename your column that holds the generic name to 'MedicationName' then in version 2 of the table create a a field called TYPE and insert the text 'Trade Name' and then rename the column with the trade names to 'MedicationName'.
When you union these together you will have 1 field (TYPE) as your primary cascading param and another field (MEDICATIONNAME) for your secondary param.
 
There may be an easier way that I am not seeing but it is an idea anyway.
IP IP Logged
Erinmichelle
Newbie
Newbie
Avatar

Joined: 06 Nov 2009
Location: United States
Online Status: Offline
Posts: 24
Quote Erinmichelle Replybullet Posted: 26 Mar 2010 at 10:26am
Thank you! That sounds like a good idea!
Thanks!

Erin
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