|
 |
asp_discuss thread: How to Configure ActiveX Control(CRViewer of SeaGate Crystal Report7) with ASP
Message #1 by "Sukhoi" <sukhi_soodan@y...> on Mon, 24 Sep 2001 14:21:58
|
|
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>
Message #2 by "Hema R." <hema.r@s...> on Tue, 25 Sep 2001 16:38:57 +0530
|
|
Hi,
try the following...Replace only the following piece of code as follows..
strHref=window.location.href
strval=split(strHref,"/",-1,1)
strWebPath=strval(2)& "/" & strval(3) & "/ssdaily_report.asp"
CRViewer.ReportName = location.protocol + "//" + strWebPath
the same applies to webSource.URL also
Get back if u face any problems
reggards
Hema
> -----Original Message-----
> From: Sukhoi [SMTP:sukhi_soodan@y...]
> Sent: 24 September Monday 2001 07:52 PM
> To: asp_discuss
> Subject: [asp_discuss] 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>
Message #3 by "Sukhoi" <sukhi_soodan@y...> on Tue, 25 Sep 2001 15:22:20
|
|
Hi hemma,
Thanks for ur suggestion.But i am unable to figure out which portion
of my code should i replace,to try ur given code.Please guide me to the
following.
regards
sukhi
Message #4 by Bala Ramachandran <bala_isme@y...> on Tue, 25 Sep 2001 18:46:36 -0700 (PDT)
|
|
Hi..
I downloaded the web report samples from
seagates, which uses RDC + ASP to produce reports. But
i dont understand the samples. All the samples given
uses Access database, and i dont understand it. They
read the datas using sql statement and then they
export the result to some .ttf file. This ttf file is
the data source to crystal report. I am confused.. I
am using Sql server as database. Any one who have done
the report in ASP+RDC+Sql Server, pls send me some
sample report.Hope, Hema u may help..
Thanx.
Bala.
--- "Hema R." <hema.r@s...> wrote:
> Hi,
>
> try the following...Replace only the following piece
> of code as follows..
> strHref=window.location.href
> strval=split(strHref,"/",-1,1)
>
> strWebPath=strval(2)& "/" & strval(3) &
> "/ssdaily_report.asp"
>
> CRViewer.ReportName = location.protocol + "//" +
> strWebPath
>
> the same applies to webSource.URL also
>
> Get back if u face any problems
>
> reggards
> Hema
>
>
Message #5 by "Sukhoi" <sukhi_soodan@y...> on Thu, 27 Sep 2001 16:06:19
|
|
Hi Hema,
I tried ur code.But when i run,it gives the following error
"Fail To Set Current Directory"
I have written the modified code in which i have added ur code.Please
check out the given code below.For ur information the name of the ASP page
is " SSDailyg22.asp " while the name of the Report file
is "SSDaily_report.rpt "& they r both stored in c:/sukhi/project1
directory.
regards
sukhi
..................................
<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
strHref=window.location.href
strval=split(strHref,"/",-1,1)
strWebPath=strval(2)& "/" & strval(3)
& "../sukhi/project1/ssdaily_graph.rpt"
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 + "//" + strWebPath
else
Dim webSource
Set webSource = CreateObject
("WebReportSource.WebReportSource")
webSource.ReportSource = webBroker
webSource.URL = Location.Protocol + "//" + strWebPath
webSource.PromptOnRefresh = True
CRViewer.ReportSource = webSource
end if
CRViewer.ViewReport
End Sub
-->
</SCRIPT>
</BODY>
</HTML>
Message #6 by "Sukhoi" <sukhi_soodan@y...> on Thu, 27 Sep 2001 16:14:38
|
|
HIMA, UR JUST GREATTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT &&&&&
GINIUSSSSSSSSSSSSSSSSSSSSSSSSS. Many many thanks for ur help.I can view the
report. its working. Again my thanks from heart,god bless u.
regards
sukhi
tthe final code is as such
...................................................
<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
strHref=window.location.href
strval=split(strHref,"/",-1,1)
strWebPath=strval(2)& "/" & strval(3)
& "/ssdaily_graph.rpt"
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 + "//" + strWebPath
else
Dim webSource
Set webSource = CreateObject
("WebReportSource.WebReportSource")
webSource.ReportSource = webBroker
webSource.URL = Location.Protocol + "//" + strWebPath
webSource.PromptOnRefresh = True
CRViewer.ReportSource = webSource
end if
CRViewer.ViewReport
End Sub
-->
</SCRIPT>
</BODY>
</HTML>
|
|
 |