Set m_Report = Nothing Set m_Report = m_Application.NewReport With m_Report.Database ' Add a datasource to the report. The wizard will include any data ' source that has been added to the report
Set Connection = New Connection Set m_Table = Nothing Set m_Table = CreateObject("adodb.recordset") Connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source= " & App.Path & "\insight.mdb;Mode=Read" Connection.Open m_Table.Open "select * from tableset", Connection, adOpenDynamic, adLockPessimistic, adCmdText While Not m_Table.EOF .AddOLEDBSource Connection, m_Table.Fields(1).Value m_Table.MoveNext Wend End With Set m_Wizard = New CRStandardWizard Set m_Wizard.CrystalReport = m_Report m_Wizard.DisplayReportWizard CRDesigner.ReportObject = m_Report Connection.Close
Dim m_Application as CRADDXT.Application Dim m_Report as CRADDXT.Report
Set m_Report = m_Application.NewReport
With m_Report.Database
' Add a datasource to the report. The wizard will include any data
' source that has been added to the report
Set Connection = New Connection
Set m_Table = Nothing
Set m_Table = CreateObject("adodb.recordset")
Connection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source= " & App.Path & "\insight.mdb;Mode=Read"
Connection.Open
m_Table.Open "select * from tableset", Connection, adOpenDynamic, adLockPessimistic, adCmdText While Not m_Table.EOF
.AddOLEDBSource Connection, m_Table.Fields(1).Value
m_Table.MoveNext
Wend
End With
Set m_Wizard = New CRStandardWizard
Set m_Wizard.CrystalReport = m_Report
m_Wizard.DisplayReportWizard
CRDesigner.ReportObject = m_Report
Connection.Close
Dim m_Report as CRADDXT.Report