?
Solved

qrdesign delphi 5 pdf

Posted on 2014-03-28
5
Medium Priority
?
491 Views
Last Modified: 2014-11-27
I have an old program in delphi 5. The reports are made with qrdesign and although I can preview them and then manually save them as a pdf, I would like to have a code that directly creates a pdf file from the report without making the user have to type anything at all.
0
Comment
Question by:ggfso
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 39962016
Are you wanting to programmatically control qrdesign or write your own PDF creation routine?

mlmcc
0
 

Author Comment

by:ggfso
ID: 39962588
At the moment I am clicking a button which which calls ReportDesignerDialog1.printreport(ExtractFilePath(ParamStr(0))+'form1.QR2'); This gives me a preview of the form1.qr2, I can manually save that preview as a pdf or print it to a virtual pdf printer.

What I would like is that button to create and save the pdf file without asking me anything at all. I would give it the path and the file name as parameters and the pdf file would be saved in the given folder with the given name.
0
 
LVL 9

Accepted Solution

by:
rinfo earned 2000 total points
ID: 39963390
Dont just call ReportDesigerDialog.
All report designer have a method to print it directly with out preview.
This is an example by quickreport to export report to pdf  and excel.
You can surely use this
procedure TForm9.Button3Click(Sender: TObject);
begin
  // Export report to a PDF document
  gtPDFEngine1.FileName := 'eDoc_Quickreport_Demo.pdf';
  gtPDFEngine1.Preferences.ShowSetupDialog := false;
  gtQRExportInterface1.Engine := gtPDFEngine1;
  gtQRExportInterface1.RenderDocument(QRPQuickrep1, false);

  // Export report to a Excel workbook
  gtExcelEngine1.FileName := 'eDoc_Quickreport_Demo.xls';
  gtExcelEngine1.Preferences.ShowSetupDialog := false;
  gtQRExportInterface2.Engine := gtExcelEngine1;
  gtQRExportInterface2.RenderDocument(QRPQuickrep1, false);
end;

Open in new window

0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
If you're a modern-day technology professional, you may be wondering if certifications are really necessary. They are. Here's why.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question