Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO and Crystal Report Parameters

Status
Not open for further replies.

WebGuyToo

Programmer
Aug 18, 2004
124
US

Hi all,

I'm trying to set my ado recordset to some parameters I created on my crystal report in VB6. Here is my syntax:

This works...
rptData.ParameterFields(1).AddCurrentValue 'CStr(mrsDataSet.Fields("DrugName").Value)

the DrugName parameter field on the report has Allow Multiple Values selected and Discrete or Range value checked

with the Discrete or Range Value checked it will not show any data in my rpt. However, if I use only Discrete I see data in my rpt.

the problem is Discrete will only allow diferent values. Once it sees a value that was already used it blows up.

Does anyone know what kind of object I can put on my Cystal Report that will allow the same values that I can use with my recordset?

Any help would be very appreciated.
Thanks,
WebGuyToo


 
You might have to incorporate some checking of the added values before adding them, or change your recordset's query to only get Distinct DrugNames. There is a NumberOfCurrentValues property of the ParameterField object. Before adding a value, you might have to loop through the current values to see if the one you're about to add already exists.

-dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top