Open file in application from stream without saving to disk

Posted by nix1016 on 15-Mar-2017 00:47

I'm trying to export a crystal report to stream and opening that up directly in the corresponding application (i.e. PDF/Excel, etc) without having to save it to disk, is this possible?

E.g. this is what I have started:

DEFINE VARIABLE sourceStream As System.IO.Stream NO-UNDO.

DEFINE VARIABLE crwReport as CrystalDecisions.CrystalReports.Engine.ReportDocument NO-UNDO.

sourceStream = crwReport:ExportToStream(CrystalDecisions.Shared.ExportFormatType:PortableDocFormat).

I'm a bit stuck on how I can then open the file in sourceStream in PDF viewer without saving it to disk, if possible?

All Replies

This thread is closed