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

Suppress Repeated Variable

edited January 2003 in General
Hello,

I need to have a Variable or Label in the detail section display text based
on a data field value.

Is it possible to suppress repeated values in the way that a DBText may be
set to SuppressRepeatedValues?

Thank you,
Mike Malinowski

Comments

  • edited January 2003
    It is a little bit of code, but you can implement this operation on any
    component in RB when you have a dbText that is suppressing repeated values.
    In this example, a shape in the detail band is hidden along with the dbText.

    http://www.digital-metaphors.com/tips/SuppressRepeatedShapeWithDBText.zip


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited January 2003
    Hello Jim,

    Thank you for the reply and the suggestion.

    I tried the code in my report. Unfortunately, in my case the DBText object
    that lbPrintIt is based on must not be visible in my report. When I run it
    with the visible property of the DBText object set to False, the conditional
    label appears twice before becoming not visible. Could you suggest a way to
    implement your method but still have the DBText object not appear in the
    report?

    Basically, the DBText object would display a meaningless code, whereas the
    label would display a meaningful description.

    I hope I've described this to you so that it makes sense.

  • edited January 2003
    Jim,

    By setting the Width of the DBText object to zero, I was able to use your
    code and not have the datafield appear on the report.

    Just a note, I am using RB 6.03. So I can't comment on later versions. But
    if the SuppressRepeatedValues could be implemented for at least ppVariable,
    it would be great. Incidentally, I guess when I used Crystal Reports I took
    stuff like this for granted. You could create a formula field, and just set
    its SuppressRepeated flag to True.

    Thanks,
    Mike


  • edited January 2003
    > But if the SuppressRepeatedValues could


    Thanks for the suggestion!


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited January 2003

This discussion has been closed.