Home End User

Move all objects to the next object visible object

edited June 2003 in End User
Hi,
My client wants to be able to select several objects in Designer,select
destination (probably with some button) and after that in the end of the
report all selected visible objects must move to the next visible object or
the end of page in the indicated direction.
For example if by some condition label in the middle of the report became
invisible, everything under it must shift upwards and take up the space of
the invisible label. Thus we are getting rid of blank spaces in the middle
of the report if by some condition components become invisible.
I would like to ask if that is possible in RB. And also how much time
approximately that would take to implement.

Thanks,
MB

Comments

  • edited June 2003
    Do you mean create a selection in the design tab, then go to the preview tab
    and drop the components? If you want to implement this, you probably want to
    modify the source to our designer and it would not be easy because RB works
    with the reporting equation and each tab in the designer is designed to work
    as part of an equation Data + Calculations + Layout = Output. I don't
    understand the purpose of what you are trying to accomplish exactly, so I
    can't guess how long it would take you to code this. It may be as easy as
    using subreports and moving a subreport around in the bands to display the
    selected componets or something like that. Can you provide more detail to
    the goal of this operation?


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited June 2003
    No, it is not quite the thing that I meant.
    I ment the following:
    This is primarily aimed for the purpose of aligning report components so
    that there would not be any blank spaces left.
    Let us say I have three labels arranged vertically. Then in rap code on some
    condition middle label becomes invisible. Then for the report to look good
    (without blank space in the middle of the report) the program (in runtime
    after report generation) would need to shift the bottom label upwards, so
    that it would moved to the place right under the upmost label. Now there are
    only 2 labels 1'st one and the 3'rd on right under the 1'st.

    On some other report builder it is solved by selecting objects to be aligned
    to the next visible target (including spacing between them) and the
    direction they must be aligned to. After report generates all objects are
    shifted according to the indicated properties until any of the selected
    objects comes within indicated range to any visible object.

    Can something like this be accomplished in RB?

    Thank you
    MB.

    P.S. No I don't try to paste components in the Preview tab. All assignment
    must be done in Design tab.

    In the Design Tab user must be able to select some components

  • edited June 2003
    Regions are useful in this case. Regions can contain other components, much
    like you would use a TPanel in a delphi form. So, the Region can Stretch and
    ShiftRelativeTo (only to other stretchables, namely regions in this case).
    What I woudl do is create a region for each label to be parented by. Then
    set Region2 to shift relative to Region1, and Region3 to shift relative to
    Region2. This way the labels will automatically shift, and you can place
    lots of controls in each region which is the usual thing to do to have a
    line of fields optionally displayed for each record when there are multiple
    rows for each record.

    Region1 - Label1
    |
    Region2 - Label2
    |
    Region3 - Label3

    On a related note, see the main reports demo #33 for an address squeeze
    demo.

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited June 2003
    Thank you very much. This solves the problem perfectly.

This discussion has been closed.