Ver Mensaje Individual
  #40 (permalink)  
Antiguo 05/05/2006, 18:44
Megami
 
Fecha de Ingreso: mayo-2006
Mensajes: 6
Antigüedad: 18 años
Puntos: 0
Hola soy nueva en el foro, me gusta la forma en que explican la forma de utilizar Crystal Report, y bueno necesito su ayuda, segui los pasos de richardinj para visualizar el reporte y lo hace bien cuando no manejo parametros, al intentar usarlos me marco en un principio que se habia caducado la sesion, despues q se necesitaba un objeto de sesion y por ultimo seguiendo algo del codigo de ejemplos CR me aparece Acceso denegado en la linea donde abre el reporte, el codigo esta asi:
<%
reportname = "Report2.rpt"

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

Set session("oRpt") = session("oApp").OpenReport(Path & reportname, 1)

session("oRpt").MorePrintEngineErrorMessages = False
session("oRpt").EnableParameterPrompting = False

session("oRpt").DiscardSavedData

set session("ParamCollection") = Session("oRpt").Parameterfields
set Param1 = session("ParamCollection").Item(1)
ParamValue = Request.Form("ParamValue")
Call Param1.SetCurrentValue (CStr(ParamValue), 12)

On Error Resume Next
session("oRpt").ReadRecords
If Err.Number <> 0 Then
Response.Write "An Error has occured on the server in attempting to access the data source"
Else

If IsObject(session("oPageEngine")) Then
set session("oPageEngine") = nothing
End If
set session("oPageEngine") = session("oRpt").PageEngine
End If


%>
<!-- #include file="SmartViewerActiveX.asp" -->

Espero puedan ayudarme es urgente, cuando pongo <!-- #include file="AlwaysRequiredSteps.asp" --> me dice acceso denegado, y si tengo todos los archivos en la misma carpeta. otra pregunta segun lei manda los parametros de acuerdo al orden en q estan en el reporte, o sea ai esta bien q los cree en el diseñador de informe?, y se inicia la sesion desde el formulario en q mando la variable?
Muchas gracias y esta muy bien el foro espero aprender bien CR y aportar Gracias