Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Function/ variable in Report Label caption? 1

Status
Not open for further replies.

foxrainer

Programmer
Jan 10, 2002
270
0
0
US
having a label in a report detail band, is it possible to have the label caption change according to the value of a field?

In the table, I have a text field called 'am'

In the report, I have a label with the following entered into the caption choice:

=IIF(isEmpty(am), " ", [am])

However, the caption in the running report will show the caption literally, as above.

Any suggestions?
 
You could put this iif in your underlying query:
In query designer, add a field, e.g. myAM:
Code:
myAM:IIF(isEmpty(am), " ", [am])

On your report, create a text box and set its control source to "myAM".

If you prefer the looks of a label, you can also set the display effect of the textbox to "flat".

Cheers,
MakeItSo

Andreas Galambos
EDP / Technical Support Specialist
(andreas.galambos@bowneglobal.de)
HP:
 
Andreas,

vielen dank fuer deine zurueckschrift/ antwort - Ich werde das heute versuchen!

Rainer (originally from Stuttgart, now living in upstate NY, USA)

Nice Web Site -

Actually, my mother and grandmother are from Kaiserslautern!
 
Ha! It's a small world...
smilie_flags_kl.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top