Solved

QReports ...

Posted on 1998-11-08
3
325 Views
Last Modified: 2010-04-04
I want to print the contents of a table in Qreports, however I want to print certain record fields as "blank" depending on the value of other fields in the same record.

Anyone tell me (perhaps in general terms) how I might go about this.

Thanks.
0
Comment
Question by:cavalry
3 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1346151
hi cavalry,

use the event onprint of the field you want to manipulate. Maybe you must use a QRLabel-Component to do this.

meikl
0
 
LVL 1

Expert Comment

by:Greedy
ID: 1346152
In the BeforePrint Event of your Detail band put somthing like this.

if MyTable.FieldByName('MyConditionField').As(some var type) = SomeValue then
  QRLabel1.Caption := 'Blank'
else
  QRLabel.Caption := MyTable.FieldByName('MyDataField').AsString


0
 

Accepted Solution

by:
glabax earned 10 total points
ID: 1346153
You can put the field in the white color

if condition then
  name_object.font.color:=clWhite
else
  name_object.font.color:=clBlack;

in the beforePrint event of your detail band.

Of course if you use a color printer with black paper, it doesn't work !!
0

Featured Post

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
Delphi Spellcheck in Webbrowser 1 45
Delphi XE10 Round Image 2 186
Delphi problems to abort a printjob 9 34
migrate this code to work on android 1 27
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…

763 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