Posted 13 March 2018, 8:23 am EST
The goal is to use ActiveReports 7 to generate a web page version of the report. We currently use the PDF Export to serve up reports on the web in PDF format, but we would like to have the option to display the same reports as web pages.
I’ve used the htmlExport class to export to a file with an htm extension and that works fine for what it does, but it leaves files behind. I’d like this process to be dynamic. I see the HtmlExport class supports exporting to a memorystream. This stream seems to be a multipart/related mime type. How does one display the stream in a browser?
For example I was trying to use the WebBrowser control in a windows form but not having any luck getting it to display.
using (var memoryStream = new MemoryStream())
using (var htmlExporter = new HtmlExport())
{
htmlExporter.Export(report.Document, memoryStream);
webBrowser1.DocumentStream = memoryStream;
webBrowser1.DocumentStream.Flush();
}
Any help would be greatly appreciated.