Solved

Quick riport question

Posted on 1998-07-06
8
181 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
 
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

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 The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now