Link to home
Start Free TrialLog in
Avatar of cmgtech
cmgtech

asked on

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
Avatar of SjoerdVerweij
SjoerdVerweij

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?
Avatar of cmgtech

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of SjoerdVerweij
SjoerdVerweij

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cmgtech

ASKER

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.
Avatar of cmgtech

ASKER

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.