Well, when you show the report in your program. Exporting to HTML is one of the options that are automatically included with the Data Report object.
If you want to export using code, below is an example from MSDN library which I think is pretty clear.
As for exporting to Excel, there is no easy way that I know of, if anyone else wants to jump in here with some advice. I'd probably create the Excel file and then export each data piece to whatever cells I needed to.
Good luck
Stacey
ExportReport Method Example
The first example uses the ExportReport method to display the Export dialog box. The second example exports the file without displaying the Export dialog box. The third example specifies an ExportFormat object to use when exporting the report.
Private Sub ExportTheReport()
DataReport1.ExportReport , , True, True
End Sub
Private Sub ExportWithoutDialog()
' Export to a file named Output.htm, overwriting if needed.
DataReport1.ExportReport rptKeyHTML, "C:\Temp\Output", True, False
End Sub
Private Sub ExportMyReport()
' Export to a file named Daily.htm using the MyReport ExportFormat.
DataReport1.ExportReport "MyReport", "C:\Temp\Daily", True, False
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.