Report Formatting - Vertical lines

S

sudhakara.t.p.

Hi,
I have some fields in the detail section which can grow in
height. Now, when these fields grow in height, even, the
column separator vertical lines needs to grow. But it is
not happening.

Can anyone help me on this.

Thanks & Regards
Sudhakara.T.P.
 
M

Marshall Barton

sudhakara.t.p. said:
I have some fields in the detail section which can grow in
height. Now, when these fields grow in height, even, the
column separator vertical lines needs to grow. But it is
not happening.

You'll have to use code in the detail section's Print event
to draw the lines. See the report object's Line method in
Help for details, but it will probably look like:

Me.Line (textbox1.Left,0) - Step(0,20000)
and
Me.Line (textbox2.Left+textbox2.Width,0) - Step(0,20000)

You might prefer to download Stephen Lebans' PrintLines db
at www.lebans.com which takes care of the subtle issues in
this area.
 
S

Sudhakara.T.P.

Hi Marshal,
Thanks for your reply and info and it worked great. Well,
what I was looking at was something like settings that
will do that because we are giving the option for the user
to design his own based on the fields that we have in an
table. Now, how do I go about this. Because, if he opens
the report in design mode, I am showing him the customized
toolbar which has the box and the line control, that he
can use to design.
Can you please guide me how do I go about this.

Thanks & Regards
Sudhakara.T.P.
 
M

Marshall Barton

Sudhakara.T.P. said:
Thanks for your reply and info and it worked great. Well,
what I was looking at was something like settings that
will do that because we are giving the option for the user
to design his own based on the fields that we have in an
table. Now, how do I go about this. Because, if he opens
the report in design mode, I am showing him the customized
toolbar which has the box and the line control, that he
can use to design.

Sorry, but you have a couple of serious roadblocks in your
way. First, as I implied before, the Line control can not
do this, period. You can only change the Height property in
the Format event, but the final height of a CanGrow
control/section is not available until the Print event.

The second problem with your idea is that you should never
make design changes to forms/reports while your application
is running in a user's environment. You are the only one
that can make design changes prior to distributing your app
to your users. There are many very good reasons for this
"rule", extreme bloating, incresed likelyhood of corruption,
and inability to distribute your app in the recommended MDE
file format being some of the most obvious.

To give users this kind of capability, you need to develop
an interface for them to specify what they want and then use
code in the report that implements their choices. For
example, if you have a form where they can specify which
controls they want the lines for, then your code can
conditionally execute the Line methods in the specified
places.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top