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
Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
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:
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.
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