alistairpaul
Programmer
Here's what I need to do. I have an ODBC driver that can only be accessed by the Crystal Reports engine. It's proprietary, and written that way for a specific reason. If I want to get any data out programmatically, I have to basically use VB to access CRAXDRT.Application, load a report, and export it. This works flawlessly in VB. I tried to port it over to VBScript/ASP, and I get an error trying to create the object. Is this a limitation??
Code below:
<%
Const crEFTText = 8
Const crEDTDiskFile = 1
Set CrxApp = Server.CreateObject("CRAXDRT.Application"
Set CrxRpt = CrxApp.OpenReport(Server.MapPath("SinglePM.rpt")
CrxRpt.Database.Tables(1).SetLogOnInfo "sc_report_odbc", "SERVERNAME.PORT", "userid", "password"
CrxRpt.ParameterFields(1).ClearCurrentValueAndRange
CrxRpt.ParameterFields(1).AddCurrentValue ("PM30712"
CrxRpt.ReadRecords
CrxRpt.ExportOptions.DestinationType = crEDTDiskFile
CrxRpt.ExportOptions.FormatType = crEFTRichText
CrxRpt.ExportOptions.DiskFileName = getExportRptName
CrxRpt.Export False
%>
This works great in VB, but in ASP, I get the following error:
Server object, ASP 0177 (0x800401F3) Invalid ProgID.
And in VBScript, I get this message:
ActiveX component can't create object: 'CRAXDRT.Application'
Any thoughts?!
Code below:
<%
Const crEFTText = 8
Const crEDTDiskFile = 1
Set CrxApp = Server.CreateObject("CRAXDRT.Application"
Set CrxRpt = CrxApp.OpenReport(Server.MapPath("SinglePM.rpt")
CrxRpt.Database.Tables(1).SetLogOnInfo "sc_report_odbc", "SERVERNAME.PORT", "userid", "password"
CrxRpt.ParameterFields(1).ClearCurrentValueAndRange
CrxRpt.ParameterFields(1).AddCurrentValue ("PM30712"
CrxRpt.ReadRecords
CrxRpt.ExportOptions.DestinationType = crEDTDiskFile
CrxRpt.ExportOptions.FormatType = crEFTRichText
CrxRpt.ExportOptions.DiskFileName = getExportRptName
CrxRpt.Export False
%>
This works great in VB, but in ASP, I get the following error:
Server object, ASP 0177 (0x800401F3) Invalid ProgID.
And in VBScript, I get this message:
ActiveX component can't create object: 'CRAXDRT.Application'
Any thoughts?!