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

Crystal report Viewer and VB, help please

Status
Not open for further replies.

papaboy2

MIS
Jan 28, 2003
52
PH
i have a vb application and crystal report viewer control and i want to know how can i pass a parameter to the report i called from options the user chose in the application. my code is below. help please thanks you very much

//declarations
Dim lApplication As CRAXDRT.Application
Dim lReport As CRAXDRT.Report1

//this is somehere in the form like click event
Set lApplication = New CRAXDDRT.Application
Set lReport = lApplication.OpenReport"c:\gltesting\samply.rptgary\IED.rpt", 1)
CRViewer1.ReportSource = lReport
CRViewer1.ViewReport


 
strenterdate = txtyy + "," + txtmm + "," + txtdd

'Format Date before sending as parameter value
strenterdate = Format(strenterdate, "yyyy,mm,dd")

'Supply "Txtdate" to parameter field
Crptscpaivr.ParameterFields(0) = "DateTimeRange;Date(" & strenterdate & ");True
 
thanks very much guys!, i appreciate ur help, next time :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top