Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

pplabel.caption based on Integer Value

edited October 2009 in End User
Hy..

a little question:

i have a Database-field with values 0 or 1

in the Enduser Designer, in the Detail-Band:
if the value is 0 i want to print "Foldername:"
if the value is 1 i want to print "Filename:"

i use Reportbuilder Professional Edition / Version 9.01
Database Firebird SQL 2.1 / Zeos /

thanX for helping

best reagards

Erich

Comments

  • edited October 2009
    Hi Erich,

    Inside the DetailBand.BeforePrint event, check the value of the field and
    alter the caption of the label accordingly...

    if Report.DataPipeline['myfield'] = 0 then
    Label1.Caption := 'Foldername:'
    else
    Label1.Caption := 'Filename:';

    In RAP code, you can access the datapipeline directly....

    if myDataset['myfield'] = 0 ...

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.