
01/04/2014, 00:48
|
| | Fecha de Ingreso: noviembre-2002 Ubicación: DF
Mensajes: 1.056
Antigüedad: 22 años, 2 meses Puntos: 37 | |
Respuesta: Crystal Reports vs VB.Net 2003 Dim CrExportOptions As ExportOptions
Dim CrDiskFileDestinationOptions As New DiskFileDestinationOptions()
Dim CrFormatTypeOptions As New PdfRtfWordFormatOptions()
CrDiskFileDestinationOptions.DiskFileName = Me.rutaPDF_output '& nombrePDF ' "C:\ODBCAPL\CRYSTAL\crystalExport.pdf" ' O .DOC DE WORD
' crReport.SaveAs("C:\ODBCAPL\CRYSTAL\" & FACHDCTV & "-" & FACHDOCV & ".RPT", cr80FileFormat)
' Propiedades para exportar a PDF
' rptdoc.SummaryInfo.ReportSubject = Cfd_fecha
rptdoc.SummaryInfo.ReportTitle = Cfd_fecha '"Factura Electronica DEGASA generado a las " & Now
'rptdoc.SummaryInfo.KeywordsInReport = Cfd_fecha ' util para archivar por anio
' rptdoc.SummaryInfo.ReportAuthor = "HOLA " & Cfd_fecha & "-"
'¿MyReport.ReportOptions.EnableSaveDataWithReport = True
'rptdoc.ReportOptions.EnableSaveSummariesWithRepor t = True
CrExportOptions = rptdoc.ExportOptions
' Esto pudiera estar parametrizado para permitir otras respuestas
With CrExportOptions
.ExportDestinationType = ExportDestinationType.DiskFile
' PDF o RPT
If Me.exportarAWord Then
.ExportFormatType = ExportFormatType.WordForWindows
Else
.ExportFormatType = ExportFormatType.PortableDocFormat ' pdf OK default
End If
'If Form1.RadioButton7.Checked Then ' WORD
' .ExportFormatType = ExportFormatType.WordForWindows
'Else
' .ExportFormatType = ExportFormatType.PortableDocFormat ' pdf OK default
'End If
'If Form1.RadioButton1.Checked Then
' .ExportFormatType = ExportFormatType.PortableDocFormat ' pdf OK default
'ElseIf Form1.RadioButton2.Checked Then
' .ExportFormatType = ExportFormatType.Excel
'ElseIf Form1.RadioButton3.Checked Then
' .ExportFormatType = ExportFormatType.CrystalReport ' RPT no refresco datos
' '.EnableSaveDataWithReport = True
' ' rptdoc..HasSavedData = True
' rptdoc.ReportOptions.EnableSaveDataWithReport = True
'ElseIf Form1.RadioButton4.Checked Then
' .ExportFormatType = ExportFormatType.ExcelWorkbook ' no aplica
'ElseIf Form1.RadioButton5.Checked Then ' no aplica
' .ExportFormatType = ExportFormatType.HTML40
'ElseIf Form1.RadioButton6.Checked Then ' no aplica
' .ExportFormatType = ExportFormatType.EditableRTF
'ElseIf Form1.RadioButton7.Checked Then ' OK word
' .ExportFormatType = ExportFormatType.WordForWindows
'End If
.DestinationOptions = CrDiskFileDestinationOptions
.FormatOptions = CrFormatTypeOptions
End With
rptdoc.Export() |