OK, here is the deal:
I want to call a crystal report (version 8.5) from an ASP page. Sounds simple? No, it's not.
I have searched Crystal's web site ( They do not make it clear.
I have searched all of the Tek-Tips forums/FAQs regarding Crystal and the web. I see a lot of questions out there about asking how to call Crystal Reports from the web, but most of them do not have a response (I am hoping someone will respond to my post). The ones that do have a response suggest downloading the samples from Cyrstal's web site (aspxmps85.exe).
I tried their examples, but I know there has to be a way to call a Crystal Report without having to incorporate 10 pages of ASP.
Here is the code I am trying to use (I took this code right from the FAQ "How to open crystal reports from ASP":
<html>
<head>
<SCRIPT LANGUAGE="VBScript">
Sub Window_Onload
Dim webBroker
Set webBroker = CreateObject"WebReportBroker.WebReportBroker"
if err.number <> 0 then
window.alert "The Seagate Software ActiveX Viewer is unable to create it's resource objects. To rectify this problem, please install Internet Explorer 4.0 or install DCOM for Windows 95 and the latest Microsoft Scripting Engine. These files are available at Microsoft's web site."
CRViewer.ReportName = " else
Dim webSource0
Set webSource0 = CreateObject("WebReportSource.WebReportSource"
webSource0.ReportSource = webBroker
webSource0.URL = " webSource0.PromptOnRefresh = True
CRViewer.ReportSource = webSource0
end if
CRViewer.ViewReport
End Sub
</SCRIPT>
<title>Test</title>
</head>
<body bgcolor="C6C6C6" topmargin="0" leftmargin="0">
<OBJECT ID="CRViewer"
CLASSID="CLSID:C4847596-972C-11D0-9567-00A0C9273C2A"
WIDTH=100% HEIGHT=99%
CODEBASE="/viewer/activeXViewer/activexviewer.cab#Version=8,5,0,217">
<PARAM NAME="EnableRefreshButton" VALUE=1>
<PARAM NAME="EnableGroupTree" VALUE=0>
<PARAM NAME="DisplayGroupTree" VALUE=0>
<PARAM NAME="EnablePrintButton" VALUE=1>
<PARAM NAME="EnableExportButton" VALUE=0>
<PARAM NAME="EnableDrillDown" VALUE=1>
<PARAM NAME="EnableSearchControl" VALUE=1>
<PARAM NAME="EnableAnimationControl" VALUE=1>
<PARAM NAME="EnableZoomControl" VALUE=1>
</OBJECT>
</body>
</html>
The Crystal Viewer displays, but a message box says, "Connection to Report Server Failed."
I have tried appending a username and password to the URL, but that does not work either.
What does the "WebReportBroker" mean?
Why can't I call the report like I call the report in VB?
I have tried using this code too:
Dim crxApplication
Dim crxReport
Set crxApplication = Server.CreateObject("CrystalRuntime.Application"
Set crxReport = crxApplication.OpenReport("C:\Inetpub\crxReport.Database.Tables(1).SetLogOnInfo "dsn_provider"
Again, this code does not work for me.
If anyone has a very simple way to call a Crystal Report in ASP, please respond with code examples.
Please do not respond with "Check out the samples from Cyrstal's web site (aspxmps85.exe)."
I want simplified code without having to call multiple ASP pages.
I want to call a crystal report (version 8.5) from an ASP page. Sounds simple? No, it's not.
I have searched Crystal's web site ( They do not make it clear.
I have searched all of the Tek-Tips forums/FAQs regarding Crystal and the web. I see a lot of questions out there about asking how to call Crystal Reports from the web, but most of them do not have a response (I am hoping someone will respond to my post). The ones that do have a response suggest downloading the samples from Cyrstal's web site (aspxmps85.exe).
I tried their examples, but I know there has to be a way to call a Crystal Report without having to incorporate 10 pages of ASP.
Here is the code I am trying to use (I took this code right from the FAQ "How to open crystal reports from ASP":
<html>
<head>
<SCRIPT LANGUAGE="VBScript">
Sub Window_Onload
Dim webBroker
Set webBroker = CreateObject"WebReportBroker.WebReportBroker"
if err.number <> 0 then
window.alert "The Seagate Software ActiveX Viewer is unable to create it's resource objects. To rectify this problem, please install Internet Explorer 4.0 or install DCOM for Windows 95 and the latest Microsoft Scripting Engine. These files are available at Microsoft's web site."
CRViewer.ReportName = " else
Dim webSource0
Set webSource0 = CreateObject("WebReportSource.WebReportSource"
webSource0.ReportSource = webBroker
webSource0.URL = " webSource0.PromptOnRefresh = True
CRViewer.ReportSource = webSource0
end if
CRViewer.ViewReport
End Sub
</SCRIPT>
<title>Test</title>
</head>
<body bgcolor="C6C6C6" topmargin="0" leftmargin="0">
<OBJECT ID="CRViewer"
CLASSID="CLSID:C4847596-972C-11D0-9567-00A0C9273C2A"
WIDTH=100% HEIGHT=99%
CODEBASE="/viewer/activeXViewer/activexviewer.cab#Version=8,5,0,217">
<PARAM NAME="EnableRefreshButton" VALUE=1>
<PARAM NAME="EnableGroupTree" VALUE=0>
<PARAM NAME="DisplayGroupTree" VALUE=0>
<PARAM NAME="EnablePrintButton" VALUE=1>
<PARAM NAME="EnableExportButton" VALUE=0>
<PARAM NAME="EnableDrillDown" VALUE=1>
<PARAM NAME="EnableSearchControl" VALUE=1>
<PARAM NAME="EnableAnimationControl" VALUE=1>
<PARAM NAME="EnableZoomControl" VALUE=1>
</OBJECT>
</body>
</html>
The Crystal Viewer displays, but a message box says, "Connection to Report Server Failed."
I have tried appending a username and password to the URL, but that does not work either.
What does the "WebReportBroker" mean?
Why can't I call the report like I call the report in VB?
I have tried using this code too:
Dim crxApplication
Dim crxReport
Set crxApplication = Server.CreateObject("CrystalRuntime.Application"
Set crxReport = crxApplication.OpenReport("C:\Inetpub\crxReport.Database.Tables(1).SetLogOnInfo "dsn_provider"
Again, this code does not work for me.
If anyone has a very simple way to call a Crystal Report in ASP, please respond with code examples.
Please do not respond with "Check out the samples from Cyrstal's web site (aspxmps85.exe)."
I want simplified code without having to call multiple ASP pages.