By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,086 Members | 1,875 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,086 IT Pros & Developers. It's quick & easy.

Crystal Report XI Business Object error

P: 2
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
Expand|Select|Wrap|Line Numbers
  1. <%@ LANGUAGE="VBSCRIPT" %>
  2.  
  3. <%
  4. reportname = "SimplePreviewReport.rpt"
  5. %>
  6.  
  7. <!-- #include file="AlwaysRequiredSteps.asp" -->                       
  8. <!-- #include file="MoreRequiredSteps.asp" -->
  9. <!-- #include file="SmartViewerActiveX.asp" -->    
  10.  
2. AlwaysRequiredSteps.asp
Expand|Select|Wrap|Line Numbers
  1. <%                                                                    
  2. If Not IsObject (session("oApp")) Then                              
  3.   Set session("oApp") = Server.CreateObject("CrystalRuntime.Application.11")
  4. End If                                                               
  5.  
  6. Path = Request.ServerVariables("PATH_TRANSLATED")                     
  7. While (Right(Path, 1) <> "\" And Len(Path) <> 0)                      
  8. iLen = Len(Path) - 1                                                  
  9. Path = Left(Path, iLen)                                               
  10. Wend                                                                  
  11.  
  12. If IsObject(session("oRpt")) then
  13.     Set session("oRpt") = nothing
  14. End if
  15.  
  16. On error resume next
  17.  
  18. Set session("oRpt") = session("oApp").OpenReport(path & reportname, 1)
  19.  
  20. If Err.Number <> 0 Then
  21.   Response.Write "Error Occurred creating Report Object: " & Err.Description
  22.   Set Session("oRpt") = nothing
  23.   Set Session("oApp") = nothing
  24.   Session.Abandon
  25.   Response.End
  26. End If
  27.  
  28. session("oRpt").MorePrintEngineErrorMessages = False
  29. session("oRpt").EnableParameterPrompting = False
  30. 'session("oRpt").DiscardSavedData
  31. %>
  32.  
3. MoreRequiredSteps.asp
Expand|Select|Wrap|Line Numbers
  1. <%
  2. session("oRpt").ReadRecords
  3.  
  4. If Err.Number <> 0 Then                                               
  5.   Response.Write "Error Occurred Reading Records: " & Err.Description
  6.   Set Session("oRpt") = nothing
  7.   Set Session("oApp") = nothing
  8.   Session.Abandon
  9.   Response.End
  10. Else
  11.   If IsObject(session("oPageEngine")) Then                              
  12.       set session("oPageEngine") = nothing
  13.   End If
  14.   set session("oPageEngine") = session("oRpt").PageEngine
  15. End If
  16. %>
4. SmartViewerActiveX.asp
Expand|Select|Wrap|Line Numbers
  1. <HTML>
  2. <HEAD>
  3. <TITLE>Crystal Reports ActiveX Viewer</TITLE>
  4. </HEAD>
  5. <BODY BGCOLOR=C6C6C6 ONUNLOAD="CallDestroy();" leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>
  6. <OBJECT ID="CRViewer"
  7.     CLASSID="CLSID:6F0892F7-0D44-41C3-BF07-7599873FAA04"
  8.     WIDTH=50% HEIGHT=50%
  9.     CODEBASE="../viewer/ActiveXViewer.cab#Version=11,5,0,261" VIEWASTEXT>
  10. <PARAM NAME="EnableRefreshButton" VALUE=1>
  11. <PARAM NAME="EnableGroupTree" VALUE=1>
  12. <PARAM NAME="DisplayGroupTree" VALUE=1>
  13. <PARAM NAME="EnablePrintButton" VALUE=1>
  14. <PARAM NAME="EnableExportButton" VALUE=1>
  15. <PARAM NAME="EnableDrillDown" VALUE=1>
  16. <PARAM NAME="EnableSearchControl" VALUE=1>
  17. <PARAM NAME="EnableAnimationControl" VALUE=1>
  18. <PARAM NAME="EnableZoomControl" VALUE=1>
  19. </OBJECT>
  20.  
  21. <SCRIPT LANGUAGE="VBScript">
  22. <!--
  23. Sub Window_Onload
  24.     On Error Resume Next
  25.     Dim webBroker
  26.     Set webBroker = CreateObject("CrystalReports115.WebReportBroker.1")
  27.     if ScriptEngineMajorVersion < 2 then
  28.         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."
  29.     else
  30.         Dim webSource
  31.         Set webSource = CreateObject("CrystalReports115.WebReportSource.1")
  32.         webSource.ReportSource = webBroker
  33.         webSource.URL = "RDCrptserver115.asp"
  34.         webSource.PromptOnRefresh = True
  35.         CRViewer.ReportSource = webSource
  36.     end if
  37.     CRViewer.ViewReport
  38. End Sub
  39. -->
  40. </SCRIPT>
  41.  
  42. <script language="javascript">
  43. function CallDestroy()
  44. {
  45.     window.open("Cleanup.asp");
  46. }
  47. </script>
  48.  
  49. </BODY>
  50. </HTML>
  51.  
__________________________________________________ ______
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.
Sep 29 '08 #1
Share this Question
Share on Google+
2 Replies


jhardman
Expert 2.5K+
P: 3,405
check the documentation from where you downloaded this code - there should be something steering you toward something you need to install or register.

Jared
Oct 2 '08 #2

P: 2
where did u get the software crystal report business object, i want to buy,borrow or steell..can u tel me ..
Oct 5 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.