Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Quick riport question

Posted on 1998-07-06
8
Medium Priority
?
190 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 400 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

877 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