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

SuppressRepeatedValues

edited April 2002 in General
Hi there,

I'm probably missing something, but is there anyway to check whether or not
the ppDBText component has been supressed? I want to add the unique results
to a memo field, but i don't know how to check to see if it was suppressed
or not. DBText15 is set to SuppressRepeatedValues, and I tried each of the
following:

if

DBText15.Text <> ''
DBText15.visible = True
Length(DBText15.text) <> 0

then
memo.lines.add(DBText15.text);

None work. The value gets added multiple times. I'm sure there is another
way to do this, but i have one dataset to work with and many master-detail
relationships and i think this would be the easiest for me.

Any help would be appreciated.

Leah

Comments

  • edited April 2002
    There is nothing to check since it is handled in internally in the report
    engine.

    Did any of the techniques that were offered to you from your last post help?

    ---
    The SuppressRepeatedValues works by not creating a draw command for that
    detail band.

    One approach that comes to mind is to compare the current datapipeline value
    with the previous datapipeline value. Use a TppVariable which is invisible
    to store the value. In its OnCalc event handler, compare the value in it to
    the value for hte current record int he datapipeline. Then set the value of
    the variable to the current datapipeline value. Then add the value to the
    list if it is the same. This should work best because the OnCalc of the
    variable is controllable to fire only once per datapiepline traversal. You
    can set the visibility of the variable to false. It will still calculate
    even though it is not visible. Make sure to also set hte variable's
    datatype to the data type for your field coming from the datapipeline


    Cheers,

    Jim Bennett
    Digital Metaphors

    ---
    An alternative might be to store the values in a tStringList with Duplicates
    set to dupIgnore. Then assign the string list to the memo. This doesn't
    exactly replicate SuppressRepeatedValues since the property only compares
    against the immediately previous value, but it is very simple to code :).

    ------------------------------------
    Bruce Roberts
    Roberts Browne Limited
    RBAddOn Components for Report Builder
    http://www.bancoems.com/rbaddon.htm


    ---

    Hi Leah,

    I would simply scan the memo's lines for the existing of that text.
    or use an additional query to retrieve the distinct values.

    regards,
    Chris Ueberall;

    ---

    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.