Hello All i am using Bisness object Crystal Report XI version and installed it on my server.
I have checked to installed as server. I am using the following code to connect and display the Report file i have created with store procedure in Sql Server 2005.
The code is as below::::
_______________ _______________ _______________ __________
1. SimplePreviewRe port.asp
[code=asp]
<%@ LANGUAGE="VBSCR IPT" %>
<%
reportname = "SimplePreviewR eport.rpt"
%>
<!-- #include file="AlwaysReq uiredSteps.asp" -->
<!-- #include file="MoreRequi redSteps.asp" -->
<!-- #include file="SmartView erActiveX.asp" -->
[/code]
2. AlwaysRequiredS teps.asp
[code=asp]
<%
If Not IsObject (session("oApp" )) Then
Set session("oApp") = Server.CreateOb ject("CrystalRu ntime.Applicati on.11")
End If
Path = Request.ServerV ariables("PATH_ TRANSLATED")
While (Right(Path, 1) <> "\" And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path, iLen)
Wend
If IsObject(sessio n("oRpt")) then
Set session("oRpt") = nothing
End if
On error resume next
Set session("oRpt") = session("oApp") .OpenReport(pat h & reportname, 1)
If Err.Number <> 0 Then
Response.Write "Error Occurred creating Report Object: " & Err.Description
Set Session("oRpt") = nothing
Set Session("oApp") = nothing
Session.Abandon
Response.End
End If
session("oRpt") .MorePrintEngin eErrorMessages = False
session("oRpt") .EnableParamete rPrompting = False
'session("oRpt" ).DiscardSavedD ata
%>
[/code]
3. MoreRequiredSte ps.asp
[code=asp]
<%
session("oRpt") .ReadRecords
If Err.Number <> 0 Then
Response.Write "Error Occurred Reading Records: " & Err.Description
Set Session("oRpt") = nothing
Set Session("oApp") = nothing
Session.Abandon
Response.End
Else
If IsObject(sessio n("oPageEngine" )) Then
set session("oPageE ngine") = nothing
End If
set session("oPageE ngine") = session("oRpt") .PageEngine
End If
%>[/code]
4. SmartViewerActi veX.asp
[code=asp]
<HTML>
<HEAD>
<TITLE>Crysta l Reports ActiveX Viewer</TITLE>
</HEAD>
<BODY BGCOLOR=C6C6C6 ONUNLOAD="CallD estroy();" leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>
<OBJECT ID="CRViewer"
CLASSID="CLSID: 6F0892F7-0D44-41C3-BF07-7599873FAA04"
WIDTH=50% HEIGHT=50%
CODEBASE="../viewer/ActiveXViewer.c ab#Version=11,5 ,0,261" VIEWASTEXT>
<PARAM NAME="EnableRef reshButton" VALUE=1>
<PARAM NAME="EnableGro upTree" VALUE=1>
<PARAM NAME="DisplayGr oupTree" VALUE=1>
<PARAM NAME="EnablePri ntButton" VALUE=1>
<PARAM NAME="EnableExp ortButton" VALUE=1>
<PARAM NAME="EnableDri llDown" VALUE=1>
<PARAM NAME="EnableSea rchControl" VALUE=1>
<PARAM NAME="EnableAni mationControl" VALUE=1>
<PARAM NAME="EnableZoo mControl" VALUE=1>
</OBJECT>
<SCRIPT LANGUAGE="VBScr ipt">
<!--
Sub Window_Onload
On Error Resume Next
Dim webBroker
Set webBroker = CreateObject("C rystalReports11 5.WebReportBrok er.1")
if ScriptEngineMaj orVersion < 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."
else
Dim webSource
Set webSource = CreateObject("C rystalReports11 5.WebReportSour ce.1")
webSource.Repor tSource = webBroker
webSource.URL = "RDCrptserver11 5.asp"
webSource.Promp tOnRefresh = True
CRViewer.Report Source = webSource
end if
CRViewer.ViewRe port
End Sub
-->
</SCRIPT>
<script language="javas cript">
function CallDestroy()
{
window.open("Cl eanup.asp");
}
</script>
</BODY>
</HTML>
[/code]
_______________ _______________ _______________ ___________
This code throws the following error:
Server object error 'ASP 0177 : 8007007e'
Server.CreateOb ject Failed
/Reports/AlwaysRequiredS teps.asp, line 3
8007007e
............... .........
actually i have download this code from some where in the net to display the report file via custom ASP 3. but i have tried of my best for last 2 months and i am failed to display the report in my asp page.
So, if some one please help me in this regards I will be always remember him in my prayers.
thanks in advance.
I have checked to installed as server. I am using the following code to connect and display the Report file i have created with store procedure in Sql Server 2005.
The code is as below::::
_______________ _______________ _______________ __________
1. SimplePreviewRe port.asp
[code=asp]
<%@ LANGUAGE="VBSCR IPT" %>
<%
reportname = "SimplePreviewR eport.rpt"
%>
<!-- #include file="AlwaysReq uiredSteps.asp" -->
<!-- #include file="MoreRequi redSteps.asp" -->
<!-- #include file="SmartView erActiveX.asp" -->
[/code]
2. AlwaysRequiredS teps.asp
[code=asp]
<%
If Not IsObject (session("oApp" )) Then
Set session("oApp") = Server.CreateOb ject("CrystalRu ntime.Applicati on.11")
End If
Path = Request.ServerV ariables("PATH_ TRANSLATED")
While (Right(Path, 1) <> "\" And Len(Path) <> 0)
iLen = Len(Path) - 1
Path = Left(Path, iLen)
Wend
If IsObject(sessio n("oRpt")) then
Set session("oRpt") = nothing
End if
On error resume next
Set session("oRpt") = session("oApp") .OpenReport(pat h & reportname, 1)
If Err.Number <> 0 Then
Response.Write "Error Occurred creating Report Object: " & Err.Description
Set Session("oRpt") = nothing
Set Session("oApp") = nothing
Session.Abandon
Response.End
End If
session("oRpt") .MorePrintEngin eErrorMessages = False
session("oRpt") .EnableParamete rPrompting = False
'session("oRpt" ).DiscardSavedD ata
%>
[/code]
3. MoreRequiredSte ps.asp
[code=asp]
<%
session("oRpt") .ReadRecords
If Err.Number <> 0 Then
Response.Write "Error Occurred Reading Records: " & Err.Description
Set Session("oRpt") = nothing
Set Session("oApp") = nothing
Session.Abandon
Response.End
Else
If IsObject(sessio n("oPageEngine" )) Then
set session("oPageE ngine") = nothing
End If
set session("oPageE ngine") = session("oRpt") .PageEngine
End If
%>[/code]
4. SmartViewerActi veX.asp
[code=asp]
<HTML>
<HEAD>
<TITLE>Crysta l Reports ActiveX Viewer</TITLE>
</HEAD>
<BODY BGCOLOR=C6C6C6 ONUNLOAD="CallD estroy();" leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>
<OBJECT ID="CRViewer"
CLASSID="CLSID: 6F0892F7-0D44-41C3-BF07-7599873FAA04"
WIDTH=50% HEIGHT=50%
CODEBASE="../viewer/ActiveXViewer.c ab#Version=11,5 ,0,261" VIEWASTEXT>
<PARAM NAME="EnableRef reshButton" VALUE=1>
<PARAM NAME="EnableGro upTree" VALUE=1>
<PARAM NAME="DisplayGr oupTree" VALUE=1>
<PARAM NAME="EnablePri ntButton" VALUE=1>
<PARAM NAME="EnableExp ortButton" VALUE=1>
<PARAM NAME="EnableDri llDown" VALUE=1>
<PARAM NAME="EnableSea rchControl" VALUE=1>
<PARAM NAME="EnableAni mationControl" VALUE=1>
<PARAM NAME="EnableZoo mControl" VALUE=1>
</OBJECT>
<SCRIPT LANGUAGE="VBScr ipt">
<!--
Sub Window_Onload
On Error Resume Next
Dim webBroker
Set webBroker = CreateObject("C rystalReports11 5.WebReportBrok er.1")
if ScriptEngineMaj orVersion < 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."
else
Dim webSource
Set webSource = CreateObject("C rystalReports11 5.WebReportSour ce.1")
webSource.Repor tSource = webBroker
webSource.URL = "RDCrptserver11 5.asp"
webSource.Promp tOnRefresh = True
CRViewer.Report Source = webSource
end if
CRViewer.ViewRe port
End Sub
-->
</SCRIPT>
<script language="javas cript">
function CallDestroy()
{
window.open("Cl eanup.asp");
}
</script>
</BODY>
</HTML>
[/code]
_______________ _______________ _______________ ___________
This code throws the following error:
Server object error 'ASP 0177 : 8007007e'
Server.CreateOb ject Failed
/Reports/AlwaysRequiredS teps.asp, line 3
8007007e
............... .........
actually i have download this code from some where in the net to display the report file via custom ASP 3. but i have tried of my best for last 2 months and i am failed to display the report in my asp page.
So, if some one please help me in this regards I will be always remember him in my prayers.
thanks in advance.
Comment