Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CRAXDRT and ASP - Is this possible?

Status
Not open for further replies.

alistairpaul

Programmer
Apr 11, 2001
100
US
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(&quot;CRAXDRT.Application&quot;)
Set CrxRpt = CrxApp.OpenReport(Server.MapPath(&quot;SinglePM.rpt&quot;))

CrxRpt.Database.Tables(1).SetLogOnInfo &quot;sc_report_odbc&quot;, &quot;SERVERNAME.PORT&quot;, &quot;userid&quot;, &quot;password&quot;

CrxRpt.ParameterFields(1).ClearCurrentValueAndRange
CrxRpt.ParameterFields(1).AddCurrentValue (&quot;PM30712&quot;)
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?!
 
set crystal=server.CreateObject&quot;crystalruntime.application&quot;)
 
Download aspxmps85.exe or aspxmps80.exe from the Crystal Decisions web site. It has a set of examples using craxdrt.dll with ASP, and code you can (and should) borrow for creating the report pages. Judith

Judith Ullman
Director of Training and Consulting
Innovative Information Resources
Phone/fax: 212-904-0707

Innovative is the Metro New York Crystal Decisions Partner,
specializing in training and consulting in Crystal Reports and report distribution products, along with Oracle training and Data Junct
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top