4

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?

Hasta Dhana
  • 4,699
  • 7
  • 17
  • 26
John Doherty
  • 3,669
  • 36
  • 38
  • I would ideally like to use an existing battle tested lib or cli but am unable to find anything – John Doherty Sep 06 '19 at 00:52
  • What does a quick report file look like? Never heard of it. Can you link to an example file. – IanT8 Sep 09 '19 at 05:48
  • The software **CounterPoint SQL** from [Radiant Systems](https://en.wikipedia.org/wiki/Radiant_Systems) enables you to export QuickReport files to formats like HTML and many more, as you can see [in this YouTube video](https://www.youtube.com/watch?v=IBOxKLl2rQI). Unfortunately, the company does not exist anymore and I currently cannot find any download link or website to purchase... – SparkFountain Sep 09 '19 at 10:26

2 Answers2

2

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.

Chris Reynolds
  • 5,453
  • 1
  • 15
  • 12
  • Thanks Chris, we did not have access to the original source only an exported .qrp file - we had to do what you suggest, print to PDF and then parse the text from the PDF. Messy but it worked. – John Doherty Sep 17 '19 at 01:31
1

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.

SiR
  • 177
  • 6