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. SimplePreviewReport.asp
Expand|Select|Wrap|Line Numbers
- <%@ LANGUAGE="VBSCRIPT" %>
- <%
- reportname = "SimplePreviewReport.rpt"
- %>
- <!-- #include file="AlwaysRequiredSteps.asp" -->
- <!-- #include file="MoreRequiredSteps.asp" -->
- <!-- #include file="SmartViewerActiveX.asp" -->
Expand|Select|Wrap|Line Numbers
- <%
- If Not IsObject (session("oApp")) Then
- Set session("oApp") = Server.CreateObject("CrystalRuntime.Application.11")
- End If
- Path = Request.ServerVariables("PATH_TRANSLATED")
- While (Right(Path, 1) <> "\" And Len(Path) <> 0)
- iLen = Len(Path) - 1
- Path = Left(Path, iLen)
- Wend
- If IsObject(session("oRpt")) then
- Set session("oRpt") = nothing
- End if
- On error resume next
- Set session("oRpt") = session("oApp").OpenReport(path & 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").MorePrintEngineErrorMessages = False
- session("oRpt").EnableParameterPrompting = False
- 'session("oRpt").DiscardSavedData
- %>
Expand|Select|Wrap|Line Numbers
- <%
- 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(session("oPageEngine")) Then
- set session("oPageEngine") = nothing
- End If
- set session("oPageEngine") = session("oRpt").PageEngine
- End If
- %>
Expand|Select|Wrap|Line Numbers
- <HTML>
- <HEAD>
- <TITLE>Crystal Reports ActiveX Viewer</TITLE>
- </HEAD>
- <BODY BGCOLOR=C6C6C6 ONUNLOAD="CallDestroy();" 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.cab#Version=11,5,0,261" VIEWASTEXT>
- <PARAM NAME="EnableRefreshButton" VALUE=1>
- <PARAM NAME="EnableGroupTree" VALUE=1>
- <PARAM NAME="DisplayGroupTree" VALUE=1>
- <PARAM NAME="EnablePrintButton" VALUE=1>
- <PARAM NAME="EnableExportButton" VALUE=1>
- <PARAM NAME="EnableDrillDown" VALUE=1>
- <PARAM NAME="EnableSearchControl" VALUE=1>
- <PARAM NAME="EnableAnimationControl" VALUE=1>
- <PARAM NAME="EnableZoomControl" VALUE=1>
- </OBJECT>
- <SCRIPT LANGUAGE="VBScript">
- <!--
- Sub Window_Onload
- On Error Resume Next
- Dim webBroker
- Set webBroker = CreateObject("CrystalReports115.WebReportBroker.1")
- 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."
- else
- Dim webSource
- Set webSource = CreateObject("CrystalReports115.WebReportSource.1")
- webSource.ReportSource = webBroker
- webSource.URL = "RDCrptserver115.asp"
- webSource.PromptOnRefresh = True
- CRViewer.ReportSource = webSource
- end if
- CRViewer.ViewReport
- End Sub
- -->
- </SCRIPT>
- <script language="javascript">
- function CallDestroy()
- {
- window.open("Cleanup.asp");
- }
- </script>
- </BODY>
- </HTML>
This code throws the following error:
Server object error 'ASP 0177 : 8007007e'
Server.CreateObject Failed
/Reports/AlwaysRequiredSteps.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.