Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/07/2013, 08:30
Avatar de DanX03
DanX03
 
Fecha de Ingreso: septiembre-2007
Ubicación: México D.F.
Mensajes: 148
Antigüedad: 17 años, 6 meses
Puntos: 3
Error al exportar datos de un datagrid a un pdf

Hola que tal, tengo el siguiente problema, tengo una pagina en asp.net la cual realizaba la exportación de un datagrid a un archivo en pdf sin problemas, el problema radica en que a partir de que le agregue un update panel y un update progress a la pagina me genera un error en tiempo de ejecución de JScript, el cual es el siguiente:


Y este es el codigo utilizado para hacer la expotación:

Código ASP:
Ver original
  1. Protected Sub btnPrint_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnPrint.Click
  2.  
  3.         Dim pdfPath As String
  4.         pdfPath = Server.MapPath("~/") + "Reportes\Imprime.pdf"
  5.         crp.ExportToDisk(ExportFormatType.PortableDocFormat, pdfPath)
  6.  
  7.         If strTipoReporte = "Id" Then
  8.             crp.PrintOptions.PaperSource = CrystalDecisions.Shared.PaperSize.PaperLetter
  9.         End If
  10.  
  11.         Response.ClearContent()
  12.         Response.ClearHeaders()
  13.         Response.ContentType = "application/pdf"
  14.         Response.WriteFile(pdfPath)
  15.         Response.Flush()
  16.         Response.Close()
  17.         System.IO.File.Delete(pdfPath)
  18.     End Sub

¿En donde esta el error?