Data Connectivity
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Data Connectivity
Message Icon Topic: Dynamic Parameters Post Reply Post New Topic
Author Message
andorfuhrer
Newbie
Newbie
Avatar

Joined: 20 Apr 2011
Location: United States
Online Status: Offline
Posts: 4
Quote andorfuhrer Replybullet Topic: Dynamic Parameters
    Posted: 02 Aug 2012 at 1:13am
Hi

My database contains a table that has multiple tables within itself. For example, this table is called MedLists. Medlists contains doctor names, facilities and insurance carriers. Medlists contains categories that allow you to specify what record type you want (If you want doctor name, you filter for a category of DOCTORNAME).

How do I create a dynamic Parameter that will just prompt users for the values of Doctor Names?? Currently, the parameter is listing ALL the values in Medlists, (facilities and insurnaces) not just doctor names.


THANK YOU IN ADVANCED!!!
AF
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 02 Aug 2012 at 8:38am
I would add a select filter to the table to filter it by category = "DOCTORNAME" (hardcoded).  If that doesn't work, there may be a way to do this using a command.
 
-Dell
IP IP Logged
andorfuhrer
Newbie
Newbie
Avatar

Joined: 20 Apr 2011
Location: United States
Online Status: Offline
Posts: 4
Quote andorfuhrer Replybullet Posted: 02 Aug 2012 at 11:19am
Thanks!
I never dealt with Commands but Im giving it a whirl -
I created this command:

SELECT description
FROM Medlists
Where tablename = 'Specialty'

I am getting this error message when I try and run the report:
FAILED TO RETRIEVE DATA FROM THE DB
DATABASE CONNECTION ERROR: IF TABLES ARE ALREADY LINKED THEN THE JOIN TYPE CANNOT CHANGE

Do I have to take this command and link it back to Medlists?
Can I also just do a parameter within the command that will prompt the user to pick the 'description' from the command. Obviously I would have to say desctiption= {?Parameter}...


Thanks again! sooo helpful!!!! :)
AF
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 03 Aug 2012 at 7:17am
I'm not sure what that error means....  You may have to look at your existing links
 
I would use this command for the dynamic parameter only - don't link it to anything and don't use its fields in the report except for in the parameter.  That way it would not be included in the SQL that the report runs and instead will only run for the parameter values.
 
Yes, you can add parameters to the command.  You have to create them IN THE COMMAND EDITOR, not in the report (commands require some additional internal properties in the parameter that are not set up when creating them in the report.)  If the parameter is a string value, you'll have to put single-quotes around it when you put it in the query.  It will look something like this:
 
description = '{?Parameter}'
 
-Dell
 
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.035 seconds.