Ver Mensaje Individual
  #5 (permalink)  
Antiguo 02/06/2006, 10:46
Guadalupe Aguayo
 
Fecha de Ingreso: junio-2006
Mensajes: 5
Antigüedad: 18 años, 10 meses
Puntos: 0
Este es el codigo que tengo...

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
reportname = "prueba.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="SmartViewerHTMLPage.asp" -->