Link to home
Create AccountLog in
Avatar of pratham
pratham

asked on

Passing parameters in crystal report 8.5 via vb6

I'm working with cyrstal reports 8.5 and vb 6.  I need to be able to pass parameters from vb6 to my crystal report.  Could someone provide me with examples on how to traverse to the parameters of crystal and be able to set range, discrete, and multiple values.  Since i'm new to this, i would like to know the steps from declaration to setting up the  parameters till showing the report via vb.  I tried a few codes from the internet but i usually get the "server has not been opened yet" message
Thanks.
Avatar of crgary_tx
crgary_tx
Flag of United States of America image

Probably its same as in the standalone. But I am not sure
>Open the reports in the designer
>Go to View->Field Expolorer
>In the field explorer select the parameter you need to edit and rite click edit parameter
>In the parameter window you will be to do the things you want to do.

Gary
Avatar of pratham
pratham

ASKER

I think i didn't ask the quesiton properly.. i would like to be able to traverse through the parameters via VB... which means I need a sample vb code.  I have created my reports.  I'm having a difficult time linking the vb to crystal reports.  I will design a form that will ask for parameters and i would like to send this parameters to crystal reports to filter my output.
ASKER CERTIFIED SOLUTION
Avatar of patingsadagat
patingsadagat

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of pratham

ASKER

Thanks,
Will you be able to provide me with an example that makes use of a crystal report control?
Avatar of Mike McCracken
The code provided uses the report control.  What more do you need?

mlmcc
Avatar of pratham

ASKER

I saw an example on the web that made use of only the crystal report control component in vb.  
It didn't make use of the report viewer (no extra form that needed the report viewer).  The example was something like this:
cr.reportfilename = <filename>
cr.action = 1

where cr was the crystal report control on the form
i was thinking that parameters could be passed to this report control but I didn't see any examples of that.  The code above works great.. i just wanted to get away with the extra form and the viewer.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of pratham

ASKER

Got it.  Thanks a lot :)
Glad i could help

mlmcc