asp_web_howto thread: How to Configure ActiveX Control(CRViewer of SeaGate Crystal Report7) with ASP
Hi,
I am trying to solve this problem for some time,but have not got any
break through,any help would be appreciated.The Problem is as described
below.
I am designing a ASP page which has to show graphs.While our
database is SQL server,we have reports developed in crystal reports.I
want
to view these crystal reports on my ASP page,through CRViewer(which i s
an
ActiveX control provided by Seagate crystal Reports ver7.)Well i am
able
to view this object on my file but i cannot view my reports through
it.My
crystal reports r running on web.I am unable to configure the
properties
of the CRViewer,please help with it.I am writing the code of the i am
using.please take ur time & any help to set properties or with a code
of
any other example would be a great help.
thanks
<HTML>
<HEAD>
<TITLE>Crystal Smart Viewer</TITLE>
</HEAD>
<BODY bgcolor=#c6c6c6 language=vbscript onload="Page_Initialize">
<OBJECT ID="CRViewer"
CLASSID="CLSID:C4847596-972C-11D0-9567-00A0C9273C2A"
WIDTH=700 HEIGHT=400
codebase="/viewer/activeXViewer/activexviewer.cab#Version=7,0,100,52">
<PARAM NAME="EnableRefreshButton" VALUE=1>
<PARAM NAME="EnableGroupTree" VALUE=0>
<PARAM NAME="DisplayGroupTree" VALUE=0>
<PARAM NAME="DisplayToolbar" VALUE=1>
<PARAM NAME="EnableNavigationControls" VALUE=0>
<PARAM NAME="EnableStopButton" VALUE=0>
<PARAM NAME="EnableCloseButton" VALUE=0>
<PARAM NAME="EnableProgressControl" VALUE=0>
<PARAM NAME="EnableSelectExpertButton" VALUE=0>
<PARAM NAME="EnablePrintButton" VALUE=0>
<PARAM NAME="EnableExportButton" VALUE=0>
<PARAM NAME="EnableDrillDown" VALUE=0>
<PARAM NAME="EnableSearchControl" VALUE=0>
<PARAM NAME="EnableAnimationControl" VALUE=1>
<PARAM NAME="EnableZoomControl" VALUE=0>
</OBJECT>
<SCRIPT LANGUAGE="VBScript">
<!--
Sub Page_Initialize
On Error Resume Next
Dim webBroker
Set webBroker = CreateObject("WebReportBroker.WebReportBroker")
if ScriptEngineMajorVersion < 2 then
window.alert "IE 3.02 users on NT4 need to get the latest
version of VBScript or install IE 4.01 SP1. IE 3.02 users on Win95 need
DCOM95 and latest version of VBScript, or install IE 4.01 SP1. These files
are available at Microsoft's web site."
CRViewer.ReportName = Location.Protocol + "//" +
Location.Host +"../project1/ssdaily_report.rpt"
else
Dim webSource
Set webSource = CreateObject
("WebReportSource.WebReportSource")
webSource.ReportSource = webBroker
webSource.URL = Location.Protocol + "//" + Location.Host
+ "../project1/ssdaily_report.rpt"
webSource.PromptOnRefresh = True
CRViewer.ReportSource = webSource
end if
CRViewer.ViewReport
End Sub
-->
</SCRIPT>
</BODY>
</HTML>
</BODY>