I have a VB application that uses the Crystal Automation Server to view reports. The reports have all been created based on MS Access 2000 databases, but I now wish to use them on MS SQL Server 2000 databases. The application will support both Access and SQL Server, so I need to make the changes in code.
The objects I am using are:
Dim crApp As CRPEAuto.Application
Dim crRpt As CRPEAuto.Report
Dim DBName As CRPEAuto.Database
Dim DbTables As CRPEAuto.DatabaseTables
Dim DbTable As CRPEAuto.DatabaseTable
Dim crSub As CRPEAuto.Report
Dim SubName As CRPEAuto.Database
Dim SubTables As CRPEAuto.DatabaseTables
Dim SubTable As CRPEAuto.DatabaseTable
Dim crSections As CRPEAuto.Sections
Dim crSection As CRPEAuto.section
Dim crSubreportObj As CRPEAuto.SubreportObject
Dim crReportObjects As CRPEAuto.ReportObjects
Dim ReportObject As Object
Dim DbFields As CRPEAuto.DatabaseFieldDefinitions
Dim DbField As CRPEAuto.DatabaseFieldDefinition
Dim DbSortFields As CRPEAuto.SortFields
Dim DbSortField As CRPEAuto.SortField
I have everything working with Access(sub-reports, setting selectionformulas, using sorts, ...), but I can't even view the report with SQL Server. The error I am getting is: '20533 - Unable to open database'. I think my problem is in 'DbTable.SetLogOnInfo'. I have also experimented with 'crApp.LogOnServer' -- no luck. I want to use a Trusted_Connection (no UserID and password).
Has anyone done this before? I think I just need the basics of connecting a report to a SQL Server Database in Visual Basic code, keeping in mind that the report was originally defined with an Access database and that I am using a "Trusted Connection".
Thanks.
The objects I am using are:
Dim crApp As CRPEAuto.Application
Dim crRpt As CRPEAuto.Report
Dim DBName As CRPEAuto.Database
Dim DbTables As CRPEAuto.DatabaseTables
Dim DbTable As CRPEAuto.DatabaseTable
Dim crSub As CRPEAuto.Report
Dim SubName As CRPEAuto.Database
Dim SubTables As CRPEAuto.DatabaseTables
Dim SubTable As CRPEAuto.DatabaseTable
Dim crSections As CRPEAuto.Sections
Dim crSection As CRPEAuto.section
Dim crSubreportObj As CRPEAuto.SubreportObject
Dim crReportObjects As CRPEAuto.ReportObjects
Dim ReportObject As Object
Dim DbFields As CRPEAuto.DatabaseFieldDefinitions
Dim DbField As CRPEAuto.DatabaseFieldDefinition
Dim DbSortFields As CRPEAuto.SortFields
Dim DbSortField As CRPEAuto.SortField
I have everything working with Access(sub-reports, setting selectionformulas, using sorts, ...), but I can't even view the report with SQL Server. The error I am getting is: '20533 - Unable to open database'. I think my problem is in 'DbTable.SetLogOnInfo'. I have also experimented with 'crApp.LogOnServer' -- no luck. I want to use a Trusted_Connection (no UserID and password).
Has anyone done this before? I think I just need the basics of connecting a report to a SQL Server Database in Visual Basic code, keeping in mind that the report was originally defined with an Access database and that I am using a "Trusted Connection".
Thanks.