Ver Mensaje Individual
  #4 (permalink)  
Antiguo 25/05/2005, 08:58
whm2005
 
Fecha de Ingreso: mayo-2005
Mensajes: 2
Antigüedad: 19 años
Puntos: 0
Necesito exportar un reporte Crystal a PDF y mi codigo es el siguiente:

Dim exp As New CrystalDecisions.Shared.DiskFileDestinationOptions
Dim dirrep As String = Server.MapPath("CrystalReport1.rpt")
Dim largorep As Integer = Len("CrystalReport1.rpt")
Dim dir As String = dirrep.Substring(0, Len(dirrep) - largorep)
'Dim STR As String = dir & Session.SessionID & ".pdf"
Dim STR As String = dir & "xx.pdf"
exp.DiskFileName = STR

report.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile
report.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
report.ExportOptions.DestinationOptions = exp
report.Export()

y al momento de tratar de ejecutar la exportacion me entrega el error:

Error en archivo C:\DOCUME~1\WHAYES\ASPNET\CONFIG~1\Temp\temp_5e4de 792-6b8d-4397-8d69-f2dde2607c95.rpt: Denegado el acceso al archivo del informe. Es posible que esté abierto en otro programa.

Necesito que si alguien me puede ayudar para saber como puedo resolverlo.

Gracias