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

Show/hide at runtime a shape

edited April 2007 in General
Hello,

I have this problem (D7, RB903 code based report):

the report is a master - detail one.
I have a group and a subreport in the detail
I need to dynamically hide / show a shape in the detail
So I coded a beforeprint event to set
MyShape.Visible := true or false depending on my condition
The problem is that, one invisible, it doesn't get visible again
until the new master record arrives.
Would it be better to put the shape in a region for this purpose ?
The report is setted to double pass.

Thanks in advance for any help
Nicola

Comments

  • edited April 2007
    I've done things something similar to this and it works fine.

    Where does the shape exist? It sounds like it is on the master band. It
    should exist on the detail pipeline.

    Ed Dressel
    Team DM
  • edited April 2007
    Ed Dressel [Team DM] ha scritto:
    Yes the shape is in the detail band.

    The report structure is as follows:

    a group band

    a detail band with a child subreport inside
    the detail band has a stopposition setted because the subreport
    must use a fixed part of the page.
    The detail band is also higher of the subreport since I need (among
    other things) a box around the detail rows section.

    After *lot* of tries I think I found the problem:

    the ReprintOnSubsequentPage property
    that I setted in the group.

    I tried to put a simple plain label in the detail band, just below the
    subreport and it gets printed only in the first page of the group!
    When the detail overflows the group header band gets reprinted (ok),
    the detail data continue on the next page (ok), but my label do not
    (wrong).
    The OnPrint event of the detail band fires but it seems like controls
    aren't printed till the next master record arrives.

    Sorry I have no time to make up a demo, just looking for tips/ideas
    Thanks
    Bye

    Nicola
  • edited April 2007
    Hi Nicola,

    I'm a bit unclear about what is happening. When a detail band overflows to
    the next page, it will only print the components that cannot fit on the
    prior page. If you would like a component to print on overflow, you can set
    the ReprintOnOverflow property to True.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2007
    ReprintOnOverflow uh ? I always asked myself what was her purpose :-)
    Problem solved. I have overlooked this property ehm...
    Many thanks
    Nicola

    Nico Cizik (Digital Metaphors) ha scritto:
This discussion has been closed.