Comment exporter un rapport crystal vers de différents formats

Contenu du snippet

Plusieurs applications utilisent Crystal Reports comme engin pour produire des états. Voici comment exporter depuis Visual FoxPro avec Crystal Reports vers des différents formats.

Source / Exemple :


oCRYSTAL = CREATEOBJECT('CrystalRuntime.Application')
oReport = oCRYSTAL.OpenReport('C:\employee.RPT')
oExport = oReport.ExportOptions()
oExport.DestinationType = 1 && To file
oExport.FormatType = 27 && Excel format
oExport.DiskFileName = "C:\employee.XLS" && Name of the file
oReport.Export(.F.) && Export without prompting

For the FormatType :

&&oExport.FormatType = 1 && Crystal Report

&&oExport.FormatType = 2 && Data Interchange

&&oExport.FormatType = 3 && Record Style

&&oExport.FormatType = 5 && Comma seperated values 

&&oExport.FormatType = 6 && Tab seperated values

&&oExport.FormatType = 7 && Character seperated values 

&&oExport.FormatType = 8 && Text

&&oExport.FormatType = 9 && Tab seperated text 

&&oExport.FormatType = 10 && Paginated Text

&&oExport.FormatType = 11 && Lotus 123WKS 

&&oExport.FormatType = 12 && Lotus 123WK1

&&oExport.FormatType = 13 && Lotus 123WK3 

&&oExport.FormatType = 14 && Word for Windows

&&oExport.FormatType = 21 && Excel 5.0

&&oExport.FormatType = 22 && Excel 5.0 tabular

&&oExport.FormatType = 23 && ODBC

&&oExport.FormatType = 24 && HTML32 standard

&&oExport.FormatType = 25 && Explorer32 Extend

&&oExport.FormatType = 27 && Excel 7.0

&&oExport.FormatType = 28 && Excel 7.0 tabular

&&oExport.FormatType = 29 && Excel 8.0

&&oExport.FormatType = 30 && Excel 8.0 tabular

&&oExport.FormatType = 31 && Portable Document format (PDF)

&&oExport.FormatType = 32 && HTML40

&&oExport.FormatType = 33 && Crystal Report 7.0

&&oExport.FormatType = 34 && Report definition 

&&oExport.FormatType = 35 && Exact Rich Text

&&oExport.FormatType = 36 && XML

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.