Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Show a drop down list Post Reply Post New Topic
Author Message
snufse
Newbie
Newbie


Joined: 19 Mar 2008
Location: United States
Online Status: Offline
Posts: 36
Quote snufse Replybullet Topic: Show a drop down list
    Posted: 19 Mar 2008 at 5:58am
It there a way to show a drop down list where user can select a parameter and run a report. If so, can anyone point me in a good direction?
 
The data in the drop down list comes from a Shift table and the selected
Shift Start field will be used to retrieve sales tickets from a Sales Ticket table.
 
I was reading that a command object could do the job (connect to a data source and create a sql command). If this is correct how could I show the result in a drop down box and have user select a  line and use this as a parameter for running their report?
 
We are using CR X version 11.5.
 
Thank you,


Edited by snufse - 19 Mar 2008 at 6:32am
IP IP Logged
fusion
Groupie
Groupie


Joined: 12 Nov 2007
Location: United States
Online Status: Offline
Posts: 93
Quote fusion Replybullet Posted: 19 Mar 2008 at 9:34am
Creating Static parameter:
When you create a parameter, In the value field select the shift start field. Then click on "Actions" and select "Append All database Values".That will populate the list. When you insert that parameters in the report, you can select a value from the list.
 
Creating Dynamic Parameter:
You can create a dynamic parameter by selecting the dynamic option while creating a parameter. and select the shift start field. When you insert that parameters in the report, you can select a value from the list.
 
If you have any problems please let me know. You might be able to use command object. But I have not used that to create a parameter with dropdown list.
IP IP Logged
snufse
Newbie
Newbie


Joined: 19 Mar 2008
Location: United States
Online Status: Offline
Posts: 36
Quote snufse Replybullet Posted: 21 Mar 2008 at 5:07am
Thank you for the update.
 
I'm still having problems with getting a drop down selection to work.
 
I have tried using dynamic parameter and also command object.
 
I need to read records in a file (in this case a 'Shift Started Date/Time' field, put that in a user selectable drop down, let user select an entry in the drop down list and use this a parameter for selecting records in my report.  Here is the table:

Table Name: SalesTkt
Fields: Sales_Ticket, Shift_Started, Ticket_Date

1. select all distinct Shift_Started values from table SalesTkt:

Select distinct shift_started from salestkt order by shift_started desc

2. Put the result in a drop down. The drop down will serve as a parameter, have user select a line from the drop down

3. Use the selection (which is shift_started) as a parameter to query the SalesTkt table to get Sales_Ticket and Ticket_Date

Hope this makes sense. Thank you. 
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 21 Mar 2008 at 2:45pm
I'm not sure where you're having problems. What Fusion described to you is correct and it sounds like what you are doing is on the right path. You said you tried the dynamic parameter, which is great, but what specific part isn't working? Are you not getting the data you want, or are you not able to set the selection formula based on the dynamic parameter?
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
kkcsrao
Newbie
Newbie
Avatar

Joined: 19 Mar 2008
Location: India
Online Status: Offline
Posts: 15
Quote kkcsrao Replybullet Posted: 24 Mar 2008 at 4:02am
Hi,
I guess you have not instructed about the Select Expert which needs to be used, whenever a dynamic parameter is created.
In the Report tab,
Goto Select Expert
Pick up the column on which you have created the parameter and map it to the parameter created on that column. This will help you to display only the data of the picked value in your report.
 
I hope, I answered ur query
kc
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.016 seconds.