Help me
How can I do (by coding) to export the layout of the report (Version 10 or 11) to XML ? Thank first
Printable View
Help me
How can I do (by coding) to export the layout of the report (Version 10 or 11) to XML ? Thank first
VB Code:
report.ExportOptions.FormatType=CRExportFormatType.crEFTXML
This will get the results of the report and export to XML.
Are you actually looking to export the format of the report?
:duck:
could you show me full code and tell me which version ? thank you very much !
Here is my code for VB.NET 2003 to Crystal 9.
But my code for VB.NET 2005 to Crystal 10 is exactly the same.
I have never exported to XML before - but play with the three '*' lines.
And be sure to add the proper crystal references in your solution explorer. My current project has CRAXDRT (Crystal Reports Active X component).
VB Code:
Dim application As New CRAXDRT.Application Dim report As CRAXDRT.Report report = application.OpenReport("s:\programs\reports\events.rpt", 1) report.RecordSelectionFormula = "{command.locationid} = " & locid 'If you need to pass any parameters. Can also use "report.GroupSelectionFormula" report.ExportOptions.FormatType = CRAXDRT.CRExportFormatType.crEFTPortableDocFormat '* report.ExportOptions.DestinationType = CRAXDRT.CRExportDestinationType.crEDTApplication '* report.ExportOptions.ApplicationFileName = "S:\programs\reports\pdf\events.pdf" '* report.Export(False) report = Nothing application = Nothing