p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: Error in Crystal Report


Message #1 by "Sahasrabudhe, Shradha, P.." <SPS@i...> on Sat, 9 Nov 2002 10:03:16 +0530
Hello everybody,

	i am using crystal report 8.5 for my web based application.
	The report is been displayed with the help of ActiveX Smart Viewer.

	1.	The code is as follows :

	<%

		Reportname=  Request("txtreportname")
		rptnumber = Request("rptNo")


		if  reportname="" then
			    'Include Reports Home Page
		    Response.End 
		end if                                          

		If Not IsObject (session("oApp")) Then

		   Set session("oApp") 
Server.CreateObject("CrystalRuntime.Application")
		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)
			session("oRpt").MorePrintEngineErrorMessages = False
			session("oRpt").EnableParameterPrompting 
true'False
	
			session("oRpt").Save reportname
			On Error Resume Next
			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


			viewer = Request.Form("Viewer")


			%>

			<!-- #include file="SmartViewerActiveX.asp" -->
			<%
	
			%>
	2. 	The error observed is as follows :

		Crystal Reports ActiveX Designer (0x80043AC6)
		Access denied


I hope i will get a positive reply .
pls reply fast.

Thanks
Shradha



  Return to Index