At 11:48 AM 1/4/2013, [email protected] wrote:

RBASE 9.5 (32)
is it possible to capture the value of a DB Label(1) (in a Report in detail band) and
based on the value captured define a property
as PROPERTY <component_id> VISIBLE OFF (or anything else) for another DB Label(2) ? I need to consider the DB Label(2) for the sum in a DBCalc in the band of break footer
but in particular occasion, depending on DB Label(1), not to print DB Label(2)


Daniele,

The best approach to accomplish such task is to define a variable as expression, and then use the resulting value to manipulate the PROPERTY of already placed DB Labels
on any band.

Here's a very simple approach to accomplish your task ...

01. Define a variable(s) as expression to capture the value, such as:

    v1 = (ColumnA) -- also used as DB Label (1)
    v2 = (ColumnB) -- also used as DB Lable (2)

While defining these variables, make sure to select the appropriate band and
    the correct data type.

02. Assign the Component IDs for both DB Labels, such as DBLabelA and DBLabel2B

03. Define a conditional "Before Generate Custom EEP" for appropriate band, as
    following:

    -- A few examples to help understand the technique ...

    -- Example 01
    IF v1 = value AND v2 = value THEN
       PROPERTY DBLabelA VISIBLE 'TRUE'
       PROPERTY DBLabelB VISIBLE 'FALSE'
    ELSE
       PROPERTY DBLabelA VISIBLE 'TRUE'
       PROPERTY DBLabelB VISIBLE 'TRUE'
    ENDIF
    RETURN

    -- Example 02
    IF v1 > value THEN
       PROPERTY DBLabelA VISIBLE 'TRUE'
       PROPERTY DBLabelB VISIBLE 'FALSE'
    ELSE
       PROPERTY DBLabelA VISIBLE 'TRUE'
       PROPERTY DBLabelB VISIBLE 'TRUE'
    ENDIF
    RETURN

    -- Example 03
    IF v2 > .v1 THEN
       PROPERTY DBLabelA VISIBLE 'TRUE'
       PROPERTY DBLabelB VISIBLE 'FALSE'
    ELSE
       PROPERTY DBLabelA VISIBLE 'TRUE'
       PROPERTY DBLabelB VISIBLE 'TRUE'
    ENDIF
    RETURN

Without knowing all details on you end, hope that provides you with some ideas
and techniques to accomplish the task at hand.

For a sample application to demonstrate the use of such technique, you may
take a look at the 2012-2013 Super Advanced Training (SAT) Sample Applications.

Database: RBU_SAT
Report: ConditionalFormatting

Very Best R:egards,

Razzak

www.rbase.com
www.facebook.com/rbase

Reply via email to