Solved

QUICK POINTS- QUICK REPORTS QUESTION

Posted on 1998-02-10
2
138 Views
Last Modified: 2010-04-04

I want to print out 6 edit boxes that are not DB-Edit boxes. How do I print in a report what is exactly in the edit boxes?
0
Comment
Question by:aj85
2 Comments
 
LVL 1

Accepted Solution

by:
millerw earned 50 total points
ID: 1358910
Here is some example code that I have used in my reports:

//Make query point to correct dir
qryInitial.DatabaseName := DataBase;
//Open the query for the report
qryInitial.Open;
//Sents the QuickReport Labels' text to what I want
qrlStrategyCenter.Caption := NameNum;
qrlYear.Caption := Year;
DateTime := Now;
qrlDate.Caption := FormatDateTime ('d mmm yyyy', DateTime);
qrlTime.Caption := FormatDateTime ('h:nn:ss AM/PM', DateTime);
//Calls my custom preview form to run on this report
frmReportPreview.PreviewReport (rptInitial);
//Close up the query
qryInitial.Close;

As you can see, all you need is to put some TQRLabel components on your report and just set their text to what you want.  Do this BEFORE you print or preview, not during or your centering options, etc will not be in effect and the text will be off a little to one side or the other.

NOTE:  qry=TQuery, qrl=TQRLabel, frm=TForm, DateTime is a local TDateTime var

Hope that helps,
Scott
0
 

Author Comment

by:aj85
ID: 1358911

Thanks a lot scott, this answers my question.

Tony
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

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

Suggested Solutions

Title # Comments Views Activity
Mydac connection data base issue 3 166
Delphi Form ownership 4 110
Controlled Assessment GCSE - desperate help needed 4 101
creating threads in delphi 1 130
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…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

807 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