How to convert a QuickReport .QRP files into XML, HTML or Text?

6.2k Views Asked by At

I need to create a service to convert a series of QuickReport _(.QRP)_ files into something more parsable such as Text or HTML.

What is the best way of doing that?

2

There are 2 best solutions below

1
On BEST ANSWER

qrp files are definition files for the Delphi/Quick Reports engine. It is not immediately clear from the question whether you want to completely do away with the delphi/quickreports engine or just get the results in a browser. If it is the former, then you may have a complete rewrite on your hands. But if it is the latter then you probably need to adapt a delphi app to export pdf files, say.

The Delphi app approach is likely only viable if you have full control of the security of your web-server.

Re-reading the question, you specifically want to parse the reports (presumably for data extraction).

As quick reports uses a relational db as a source, the only reason I can think of doing this is because you don't have access to the Delphi source or the database. This may imply a one-off data migration away from an ex-supplier. So maybe just print to a pdf-print driver, then convert the pdfs to text and parse away.

I hope this helps.

0
On

I would recommend you to check Gnostice eDocEngine which will allow you to export .QPR to many formats including Excel. https://www.gnostice.com/nl_article.asp?id=248&t=Export_From_Quickreport_To_PDF_And_Other_Formats

eDocEngine VCL has several interesting components: TQRPQuickrep, TgtQRExportInterface and for export to Excel TgtExcelEngine. QPR-to-Excel rendering is performed with 4 lines of code (assuming the components are initialized) :

gtPDFEngine1.FileName := 'eDoc_QuickReport_Demo.pdf';
gtPDFEngine1.Preferences.ShowSetupDialog := false;
gtQRExportInterface1.Engine := gtPDFEngine1;
gtQRExportInterface1.RenderDocument('eDoc_QuickReport.QRP');

It is fairly priced and is provided with the source code. The only limitation is that it is Delphi and C++ Builder complaint, but if you feel comfortable with any of these languages you can easily create CLI utility or service and call it from your code.