|
-
May 18th, 2006, 11:02 PM
#1
Thread Starter
New Member
Crystal report to XML
Help me
How can I do (by coding) to export the layout of the report (Version 10 or 11) to XML ? Thank first
-
May 18th, 2006, 11:19 PM
#2
Addicted Member
Re: Crystal report to XML
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?
-
May 19th, 2006, 02:32 AM
#3
Thread Starter
New Member
Re: Crystal report to XML
could you show me full code and tell me which version ? thank you very much !
-
May 19th, 2006, 10:07 AM
#4
Addicted Member
Re: Crystal report to XML
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|