• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 822
  • Last Modified:

VB.NET, export Crystal Reports to XML using crystal reports engine .net component

is there an easy way to export to xml rather than pdf in thsi scenario?  I cannot find anything on the net that has anything on it at all.  I used to be using CRAXDRT and it had the method in the same place as the PDF export.  the .net component does not...dammit.

here is the code:

    Private Sub Export(ByVal myReport, ByVal arr)
        Dim exportOpt As New ExportOptions()
        Dim diskFile As New DiskFileDestinationOptions()

        diskFile.DiskFileName = "c:\xml\" & arr & ".pdf"
        exportOpt = myReport.ExportOptions
        With exportOpt
            .DestinationOptions = diskFile
            .ExportDestinationType = ExportDestinationType.DiskFile
            .ExportFormatType = ExportFormatType.PortableDocFormat  '<---- change to XML somehow?  new component or different component?
        End With
        myReport.Export()

    End Sub

Thanks in advance
0
cmgtech
Asked:
cmgtech
  • 3
  • 2
1 Solution
 
SjoerdVerweijCommented:
Nope, no XML.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/crystlrf/html/crlrfexportformattypeenumerationtopic.asp

What is the report based on? What XML output format do you want?
0
 
cmgtechAuthor Commented:
with the CRAXDRT, I was exporting to whatever native XML format crystal uses and then using an XSLT to transform it into something useful to myself.

Do you think there is any other way to export to something that I can get into xml format at some point using the .NET component?
0
 
SjoerdVerweijCommented:
Sure... you could export to HTML40 and pray you can hack that into something usable with XSLT...

Otherwise, you'll have to create a dataset directly from the report's base (query/stored procedure) and dump that with XmlWriter.
0
 
cmgtechAuthor Commented:
I won't be able to do the second because I do not have direct access to the server.  I am only using these crystal reports because that is all i have access to.  I am doing a select * from each table, turning them into xml and merging what I need into a nested xml document... it is a pain in the ass and not very elegant but it works... sometimes.  the CRAXDRT is cousing me some grief and I have fixed it using the .NET component to do some PDF files so I might just be up a creek.  Thanks for your help though.
0
 
cmgtechAuthor Commented:
Ill give the HTML a shot for a bit but may have to explore new avenues.  Thanks for the help.  Full points awarded for saving me more time searching for the ellusive XML export.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now