Hi,
This is working fine for me.
now i want to put more than one query results on crystal report.
is it possible?because i want one result from 2 tables and one result from other 2 tables.
for example here i am giving one sql query result on crystal, same way i want
other query result on the same report.
VB Code:
Dim db_conn As New ADODB.Connection Dim rs As ADODB.Recordset Private Sub Form_Load() Dim CRReport As CRAXDRT.Report Dim CRApp As New CRAXDRT.Application 'Open the Crystal Report Set CRReport = CRApp.OpenReport("C:\Program Files\Microsoft Visual Studio\VB98\newreport\Report2.rpt") Set rs = New ADODB.Recordset db_conn.Open "Driver={Microsoft ODBC for Oracle};" & _ "Server=Test;" & _ "Uid=Scott;" & _ "Pwd=tiger" Dim sqlq As String sqlq = "Select empid from employee where empid like 'M4%'" With CRReport 'Set the Access database path .Database.Tables(1).Location = App.Path & "\MaData" rs.Open sqlq, db_conn, adOpenStatic, adLockReadOnly .Database.SetDataSource rs, 3, 1 CrystalActiveXReportViewer1.ReportSource = CRReport CrystalActiveXReportViewer1.ViewReport End With End Sub
thank you
wizkid




Reply With Quote