Avatar of rhopping
rhopping
 asked on

JSCRIPT error on Windows Server 2003, making call to craxdrt.dll

The Jscript code listed below comes from an asp script I am trying to run on Windows Server 2003.  I receive the following error in my browser (Mozilla):

Microsoft JScript runtime  error '800a01fb'
An exception occurred
/qa/test.asp, line 30

Line 30 is "crReport.Export(false);".

This same code works fine on Windows 2000 Server.  Thanks for any assistance you can provide.


<%
var crApp = Server.CreateObject("CrystalRuntime.Application");
var crReport = crApp.OpenReport("d:/qa/test.rpt", 1);
crReport.EnableParameterPrompting = false;
crReport.MorePrintEngineErrorMessages = false;

if (crReport.Database.Tables.Count > 0) {
     var crDBTable = crReport.Database.Tables.Item(1);
     crDBTable.SetLogOnInfo(
          /*ODBC Name*/ "Test",
          /*DatabaseName*/ "",
          /*UserID*/ "admin",
          /*Password*/ "");
}

var exportOptions = crReport.ExportOptions;
exportOptions.HTMLFileName = "d:/qa/test.html";
exportOptions.FormatType = 25;    
exportOptions.DestinationType = 1;

crReport.Export(false);
%>
Crystal Reports

Avatar of undefined
Last Comment
modulo

8/22/2022 - Mon
Mike McCracken

Which line is getting the error?

mlmcc
rhopping

ASKER
Sorry about that, the error occurs on the line:

crReport.Export(false);
Mike McCracken

Without CR here what are
FormatType 25
DestinationType 1

It almost sounds like you have incompatible options or are missing a dll.

mlmcc
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
rhopping

ASKER
FormatType 25 sets the HTML format to version 3.2 Extended
DestinationType 1 sets the export to Disk File

We have checked all of the dlls that are installed related to Crystal, they all match with what we have on a Windows 2000 Server installation that works fine.  Also, craxdrt.dll has been properly registered.
Mike McCracken

Was JScript changed any in server 2003?

mlmcc
rhopping

ASKER
I found that by creating a COM+ component for craxdrt.dll the issue was resolved.  Thanks anyway!
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
nutan123

Hi,

I am facing the same problem. Can you please explain to me how do you cerated COM+ component for craxdrt.dll and also what security access did you give to which user.

Thanks,
Nutan
rhopping

ASKER
1. Open Start|Programs|Administrative Tools|Components Services
2. Open the folders to Components Services\Computers\My Computer\COM+
Applications
3. Right click COM+ Applications and choose New|Application on the menu
4. Click Next, then Create an empty application
5. Give it a name and choose Server Application, then click Next
6. Choose This User and put in local administrator and password, then click
next, then Finish
7. Select the new COM+ Application and open it to show its Components
folder
8. Right click on the Components Folder and choose New|Component
9. Click Next, then the Install new component(s) button
10. Browse to and select the c\winnt\system32\craxdrt.dll file, click Open
11. Click Next, then Finish.
12.  On Windows Server 2003 machines, you will also need to edit the Properties of the new
COM+ application.  Go to the Security tab and uncheck "Enforce access checks for this application"
13. That should fix it, but may require a reboot to take effect

ASKER CERTIFIED SOLUTION
modulo

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.