Solved

Quick riport question

Posted on 1998-07-06
8
185 Views
Last Modified: 2010-04-04
Hi Yee,

How can I print to file with quick riport?
I mean when you call the preview method there's an oppurtuniti to save the riport. It would be better to print
to a file which I can send later to the printer.

Thanks in advance

Andras
0
Comment
Question by:bandi081497
  • 4
  • 2
  • 2
8 Comments
 
LVL 1

Accepted Solution

by:
michaue earned 200 total points
ID: 1357176
How about using the Prepare method
0
 

Author Comment

by:bandi081497
ID: 1357177
Can you tell me the way? Maybe some examples?

Thanks
Andras
0
 

Author Comment

by:bandi081497
ID: 1357178
Can you tell me the way? Maybe some examples?

Thanks
Andras
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

 
LVL 1

Expert Comment

by:michaue
ID: 1357179
Prepare will generate a report without printing it or previewing it directly.  When you are finished with the report you should manually free the qrPrinter and set the property to NIL.

Example

MyReport.Prepare;
MyReport.QRPrinter.Save('REPORT.QRP');
MyReport.QRPrinter.Free;
MyReport.QRPrinter := nil;

I've never used it myself, but I hope it works for you.. To see more help select the quick report object, press F1 and look under the prepare method...

Hope it works
0
 

Expert Comment

by:LilitaN
ID: 1357180
I have similar problem.
I Think that location of problem is in Inprise source file printer.pas, where API function StartDoc call without output file param.

procedure TPrinter.BeginDoc;
var
  CTitle: array[0..31] of Char;
  DocInfo: TDocInfo;
begin
  CheckPrinting(False);
  SetState(psHandleDC);
  Canvas.Refresh;
  TPrinterCanvas(Canvas).UpdateFont;
  FPrinting := True;
  FAborted := False;
  FPageNumber := 1;
  StrPLCopy(CTitle, Title, SizeOf(CTitle) - 1);
  FillChar(DocInfo, SizeOf(DocInfo), 0);
  with DocInfo do
  begin
    cbSize := SizeOf(DocInfo);
    lpszDocName := CTitle;
    lpszOutput := nil;// Try set OutputFileName here
  end;
  SetAbortProc(DC, AbortProc);
  StartDoc(DC, DocInfo);
  StartPage(DC);
end;

0
 

Author Comment

by:bandi081497
ID: 1357181
Can you tell me the way? Maybe some examples?

Thanks
Andras
0
 

Expert Comment

by:LilitaN
ID: 1357182
Try add global variable Outputfile. Initialize as Empty String and after printing set to Empty String.
Another solution is more compliced.

Lilita
0
 

Author Comment

by:bandi081497
ID: 1357183
Thank you for your answer. It works.
Can you tell me how can I load the files contains the report
and print them later instead of not to use the preview method
and its facility to load the previously saved riport?

Thanks in advance
Andras
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
Delphi XE10, MySQL Query 4 167
Performance of SQL statement 37 127
how to change, disabled button color FMX ? 1 40
How to save the image in the .cds File ClientDataSet? 1 22
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

820 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