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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass multiple value params to CR8.5 from VB6

Status
Not open for further replies.

CraigBest

Programmer
Aug 1, 2001
545
US
looking for some advice...

I've been using parameters for a few years now passing data to reports from VB. I've got the process for passing single values down pretty well. I don't use the prompting Crystal offers, I collect the values myself programmatically and pass them in using the ParameterFields collection.

But now I need to pass a parameter to a report that contains two or more values in the same parameter. I've tried a few different things but so far nothing has worked. I have defined the parameters in the report as Allow Multiple Values / Discrete Values. My problem is formatting the syntax on the VB side so the crystal side 'gets it'.

If someone could provide the way to pass several string values, I'd be much obliged.

Thanks

Craig in NJ
 
Assuming you're using the RDC, you just need to issue the addcurrentvalue method once for each value for the parameter. If you've been using setcurrentvalue, replace it with addcurrentvalue. Judith Ullman
Metro New York Crystal Decisions Training and Consulting Partner
 
Hi,

If you need ranged value, you can try two parameters in Crystal Report and in VB pass one value for each parameter.

If you need multi / discrete, please make RecordSelectionFormual yourself in your VB program. No parameter is required. For example, the record selection formula would look like :
{Table.Field} in ['Value1' to 'Value2', 'Value3', 'Value4', 'Value5']

Hope this can help!

Kanb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top