Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

QReport - Beginner's question

Posted on 1998-10-24
2
Medium Priority
?
257 Views
Last Modified: 2010-04-06
When printing in QReports I want to make a field appear in normal text, underlined or bold depending on the value of another field in the table (not printed out in the report).

Anyone give me any pointers please.
0
Comment
Question by:DougBennett
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
gaona earned 100 total points
ID: 1344185
Dear Doug  
 
The one that you want to do, is to change the source to be printed of a certain field of a table, when other field any has a certain value.  
If it goes only this, it is easy. You should make the following:  
1 - it tests the value of the field that will determine the type of the source used in the impression.  
2 - of acôrdo with the found value, the source of the variable of the field to be printed, it will assume the following wanted value.  
Use the following code in its program:  
 
VarFonte -> Variable to be tested to determine the impression source.  
VarPrint -> Variable to be printed.  
 
if VarFonte=1 Then  
  VarPrint.Font.Style := [] {normal Impression}  
else if VarFonte=1 Then  
  VarPrint.Font.Style:=[fsBold] {Impression in Bold}  
else if VarFonte=2Then  
  VarPrint.Font.Style:=[fsUnderline]; {Impression Underline}  
   
I believe that this solves its problem.  
 
Regards  
 
Gaona

PS. - Sorry if my english is bad.
0
 

Expert Comment

by:elkiors
ID: 1344186
You need to have a look at the BeforePrint event for the band that contains the control you wish to change and add something like this to it.

if table1.fieldbyname('A String Field').Value='Male' then
begin
  qrlabelSex.Font.Style:=[fsBold,dsUnderline];
end
else
begin
  qrlabelSex.Font.Style:=[fsNormal];
end;
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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

721 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