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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Parameters to a Web Report 1

Status
Not open for further replies.

bkrause

MIS
Jul 10, 2001
1
US
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=&quot;C6C6C6&quot; LANGUAGE=&quot;VBScript&quot;>

<p>
<object ID=&quot;CRViewer&quot; CLASSID=&quot;CLSID:C4847596-972C-11D0-9567-00A0C9273C2A&quot; WIDTH=&quot;100%&quot;
HEIGHT=&quot;95%&quot; CODEBASE=&quot;/viewer/activeXViewer/activexviewer.cab#Version=8,0,0,371&quot;>
<param name=&quot;EnableDrillDown&quot; value=&quot;1&quot;>
<param name=&quot;EnableExportButton&quot; value=&quot;1&quot;>
<param name=&quot;DisplayGroupTree&quot; value=&quot;1&quot;>
<param name=&quot;EnableGroupTree&quot; value=&quot;1&quot;>
<param name=&quot;EnableAnimationControl&quot; value=&quot;1&quot;>
<param name=&quot;EnablePrintButton&quot; value=&quot;1&quot;>
<param name=&quot;EnableRefreshButton&quot; value=&quot;1&quot;>
<param name=&quot;EnableSearchControl&quot; value=&quot;1&quot;>
<param name=&quot;EnableZoomControl&quot; value=&quot;1&quot;>
<param name=&quot;EnableSearchExpertButton&quot; value=&quot;0&quot;>
<param name=&quot;EnableSelectExpertButton&quot; value=&quot;0&quot;>
</object>
</p>
<script LANGUAGE=&quot;VBScript&quot;>
<!--

Sub window_onLoad()
Page_Initialize()
End Sub

Sub Page_Initialize
On Error Resume Next
Dim webBroker
Set webBroker = CreateObject(&quot;WebReportBroker.WebReportBroker&quot;)
if err.number <> 0 then
window.alert &quot;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.&quot;
CRViewer.ReportName = &quot; else
Dim webSource0
Set webSource0 = CreateObject(&quot;WebReportSource.WebReportSource&quot;)
webSource0.ReportSource = webBroker
webSource0.URL = &quot; webSource0.PromptOnRefresh = True

CRViewer.ReportSource = webSource0
end if
CRViewer.ViewReport
End Sub

-->
</script>

</body>
</html>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top