Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 29th, 2008, 11:53 AM
Authorized User
 
Join Date: Dec 2005
Location: Mingora, NWFP, Pakistan.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to shahhussain Send a message via Yahoo to shahhussain
Default Crystal Report XI Buseness Object error

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. SimplePreviewReport.asp

<%@ LANGUAGE="VBSCRIPT" %>

<%
reportname = "SimplePreviewReport.rpt"
%>





2. AlwaysRequiredSteps.asp

<%
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
%>

3. MoreRequiredSteps.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(session("oPageEngine")) Then
      set session("oPageEngine") = nothing
  End If
  set session("oPageEngine") = session("oRpt").PageEngine
End If
%>

4. SmartViewerActiveX.asp

<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.


Shahhussain
__________________
Shahhussain




Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Report XI and Visual Basic 6 surendran VB How-To 0 November 14th, 2007 01:38 AM
Crystal Report XI NeedHelp Pro VB 6 0 September 21st, 2007 01:35 AM
Crystal Report XI urpalshu Crystal Reports 1 April 25th, 2007 09:15 AM
Crystal Report Server XI shamee_banu Crystal Reports 0 April 11th, 2007 02:16 AM
Crystal Report XI resource objects sthuyle Classic ASP Professional 0 April 21st, 2006 08:51 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.