Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: combo box Post Reply Post New Topic
Author Message
Tanya51
Newbie
Newbie
Avatar

Joined: 19 Jul 2007
Online Status: Offline
Posts: 4
Quote Tanya51 Replybullet Topic: combo box
    Posted: 17 Aug 2007 at 7:28am
 I have a combo box populated from a dataset in my program.  When a user selects an item from the combo box, I need for that item to be displayed on my report.  Can anyone tell me how to do this?  All and any help is greatly appreicated.  Thank you
 
Tanya
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 17 Aug 2007 at 3:37pm

1.  Create a parameter in your report that will hold the value from the combo box.

1 a. If users will not always select a value, create a formula in your report that looks somewhat like this:
   {?param} = 'All' or
   {table.field} = {?param}
 
2.  Open the Select Expert.  If you setup a formula in 1a, select that formula and select "Is True" from the drop-down list.  If you didn't, select the field that you want to filter on, "Equal to", and select the parameter from the top of the value drop-down list.
 
3.  In your code you will have to set the value of the parameter.  This is different depending on whether you're using the Report Document object model or the Crystal Viewer object model.  See the examples here:
 
 
Report Document: 
 
Be sure to set the default 'All' value if your users can run without selecting a value.
 
-Dell
 
IP IP Logged
Tanya51
Newbie
Newbie
Avatar

Joined: 19 Jul 2007
Online Status: Offline
Posts: 4
Quote Tanya51 Replybullet Posted: 23 Aug 2007 at 12:46pm
  I tried using the examples you supplied, however I was unable to make it work, so I removed the combo box, supplied the necessary parameter through the report itself and that works fine.  Thanks for the assist.
 
Tanya
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.031 seconds.