dynamically adjusting fields!
hi,
i am creating a report in which i have a set of dbtext
fields like ...
dbtext1
dbtext2
dbtext3
dbtext4
.......and so on
i would like to know if it is possible to generate a
report like
dbtext1
dbtext3
dbtext4
...and so on
i.e shifting the dbtext3, dbtext4 and others when the
the dbtext2 field is empty
kedar
i am creating a report in which i have a set of dbtext
fields like ...
dbtext1
dbtext2
dbtext3
dbtext4
.......and so on
i would like to know if it is possible to generate a
report like
dbtext1
dbtext3
dbtext4
...and so on
i.e shifting the dbtext3, dbtext4 and others when the
the dbtext2 field is empty
kedar
This discussion has been closed.
Comments
I asked the same question on the forum.
Here are the question and the answer regarding that topic.
Question:
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.
Can something like this be accomplished in RB?
Answer (by Jim Bennett):
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.
Also I would also like to add that working with Regions is very well
described in the ReportBuilder Developer guide.
Best Regards,
Moisey Blehman.