Hi there..
I have a problem here while setting up a crosstab report using crystal report. I'm currently using: VB6, ADO, MSSQL 2000, Crystal Reports v8.5 with TTX file as data source. I had using this method recently (this was quote from RobDog888's post)
VB Code:
Option Explicit 'Add reference to Crystal Reports x.x ActiveX Designer RunTime Library 'Add reference to Crystal Reports Viewer Control 'Add reference to Microsoft ActiveX Data Objects 2.x Library 'oCnn = current open ADO connection object Private Sub Command1_Click() Dim oApp As CRAXDRT.Application Dim oReport As CRAXDRT.Report Dim oRs As ADODB.Recordset Dim sSQL As String sSQL = "SELECT * FROM Table1" Set oRs = New ADODB.Recordset Set oRs = oCnn.Execute(sSQL) Set oApp = New CRAXDRT.Application Set oReport = oApp.OpenReport(App.Path & "\MyReport.rpt", 1) oReport.Database.SetDataSource oRs, 3, 1 crvMyCRViewer.ReportSource = oReport crvMyCRViewer.ViewReport End Sub
Then I came into problem when trying to setup a crosstab report. How do I setup a crosstab report using method as described above? Actually I didn't want to go for too much change for my code if possible.
Is it possible using oReport.Database.SetDataSource for two or more recordset? Because as we know that we need at least 3 tables as data source to create a crosstab report, doesn't it? CMIIW
Any help would be greatly appreciated. Thank you.![]()




)
Reply With Quote