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!

passing parameters in Crystal for VB

Status
Not open for further replies.

moniB

Programmer
Dec 4, 2002
5
GB
I'm currently using Crystal Reports Pro (shipped with Visual Basic) and have created a report. I wanted to allow parameters to be passed to this report (e.g. if users only wish to see data in a certain date range) but can't work out how to do this.

I tried to create the report again using a stored procedure to return the data and I was asked for the input parameter values for the stored proc when creating the report but am not prompted for values when I run the report. It seesm like I have to 'hardcode' the parameter values into the report.

Can anyone tell me how to set up paramters in Crystal? Any help will be much appreciated.
Monica.
 
encontre este codigo

CR.Connect = sConn
CR.WindowTitle = "Sistema Nacional "
CR.ReportFileName = App.Path + "\" & strReporte
Select Case byIndex
Case 1
CR.StoredProcParam(0) = TxtFecha(1)
CR.StoredProcParam(1) = TxtFecha(2)
CR.StoredProcParam(2) = CboZona.ItemData(CboZona.ListIndex)
Case 2
CR.StoredProcParam(0) = TxtFecha(1)
CR.StoredProcParam(1) = TxtFecha(2)
CR.StoredProcParam(2) = CboRamo.ItemData(CboRamo.ListIndex)

End Select
CR.Destination = crptToWindow
CR.WindowMaxButton = False
CR.WindowMinButton = False
CR.Action = 1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top