Ver Mensaje Individual
  #3 (permalink)  
Antiguo 15/09/2008, 12:24
Avatar de Peterpay
Peterpay
Colaborador
 
Fecha de Ingreso: septiembre-2007
Ubicación: San Francisco, United States
Mensajes: 3.858
Antigüedad: 16 años, 8 meses
Puntos: 87
Respuesta: Reportes de CrystalReport

Private Sub Exportar(ByVal adjunto As String)
Dim rptDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocum ent

_sPathReporte = CType(configurationAppSettings.GetValue("PathRepor tes", GetType(System.String)), String) // esta linea es opcional pero seria bueno tener en tu app.config la ruta de los .rpt
rptDocument.Load(_sPathReporte & _Reporte & ".rpt")
rptDocument.SetDataSource(_dtTabla)
ReportViewer.ReportSource = rptDocument

Dim filedest As New CrystalDecisions.Shared.DiskFileDestinationOptions
Dim o As CrystalDecisions.Shared.ExportOptions
o = New CrystalDecisions.Shared.ExportOptions
o.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableD ocFormat
o.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.Disk File
filedest.DiskFileName = System.IO.Directory.GetCurrentDirectory() & "\" & adjunto & ".pdf"

o.ExportDestinationOptions = filedest.Clone
rptDocument.Export(o)

filedest = Nothing
o = Nothing
End Sub


solo conviertela a c# y listo
__________________
Curso WF4
http://cursos.gurudotnet.com/ DF
Aprende HTML5