automating Crystal 2008 reports with vb
I have previously used vbscript to run a crystal 9 report and output as a pdf. The vbscript used the contents of an excel spreadsheet as parameters. the following code was used to load the crystal report
Set crApp = CreateObject("CrystalRuntime.Application.9")
Set crReport = CreateObject("CrystalRuntime.Report.9")
Set crReport = crApp.OpenReport(sReportFile)
crReport.Database.Tables(1).SetLogOnInfo "", "", "USER", "PASSWORD"
'-- clear the last used parameters
following this there is a section that loops through the spreadsheet and adds each value into the parameter field P1. It then runs the report for the parameters and exports it to a pdf.
I have been trying to reproduce this function using a newly purchased copy of Crystal 2008 and Microsoft Visual Basic 2008 Express Edition however cannot even figure out how to initiate the crystal 2008 runtime.
I have read multiple pages suggesting that this needs to be done differently due to changes in the way cr2008 works but cannot find a solution.
can someone please help point me in the right direction....