-
1
- #1
I am using the following code sucessfully to print a report in an HTML document. As you might notice it is mostly copied from the Crystal Web Samlpes provided during an instal. From VB I know how to pass a parameter to a report, but how can I do that with the HTML code below?
Thanks, Brian
<html>
<head>
<title>Crystal Report Viewer</title>
</head>
<body BGCOLOR="C6C6C6" LANGUAGE="VBScript">
<p>
<object ID="CRViewer" CLASSID="CLSID:C4847596-972C-11D0-9567-00A0C9273C2A" WIDTH="100%"
HEIGHT="95%" CODEBASE="/viewer/activeXViewer/activexviewer.cab#Version=8,0,0,371">
<param name="EnableDrillDown" value="1">
<param name="EnableExportButton" value="1">
<param name="DisplayGroupTree" value="1">
<param name="EnableGroupTree" value="1">
<param name="EnableAnimationControl" value="1">
<param name="EnablePrintButton" value="1">
<param name="EnableRefreshButton" value="1">
<param name="EnableSearchControl" value="1">
<param name="EnableZoomControl" value="1">
<param name="EnableSearchExpertButton" value="0">
<param name="EnableSelectExpertButton" value="0">
</object>
</p>
<script LANGUAGE="VBScript">
<!--
Sub window_onLoad()
Page_Initialize()
End Sub
Sub Page_Initialize
On Error Resume Next
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>
</body>
</html>
Thanks, Brian
<html>
<head>
<title>Crystal Report Viewer</title>
</head>
<body BGCOLOR="C6C6C6" LANGUAGE="VBScript">
<p>
<object ID="CRViewer" CLASSID="CLSID:C4847596-972C-11D0-9567-00A0C9273C2A" WIDTH="100%"
HEIGHT="95%" CODEBASE="/viewer/activeXViewer/activexviewer.cab#Version=8,0,0,371">
<param name="EnableDrillDown" value="1">
<param name="EnableExportButton" value="1">
<param name="DisplayGroupTree" value="1">
<param name="EnableGroupTree" value="1">
<param name="EnableAnimationControl" value="1">
<param name="EnablePrintButton" value="1">
<param name="EnableRefreshButton" value="1">
<param name="EnableSearchControl" value="1">
<param name="EnableZoomControl" value="1">
<param name="EnableSearchExpertButton" value="0">
<param name="EnableSelectExpertButton" value="0">
</object>
</p>
<script LANGUAGE="VBScript">
<!--
Sub window_onLoad()
Page_Initialize()
End Sub
Sub Page_Initialize
On Error Resume Next
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>
</body>
</html>