Resizing a vertical line in the detail section

  • Thread starter Thread starter Dave C
  • Start date Start date
D

Dave C

I have a report that I want to have a vetical line go from top-to-bottom of
the page.

I'm having problems with getting this to work with controls that have
CanGrow set to true in the detail section. I need to get the line to resize
to the new height of the detail section.

I've tried the code:

me.resizeline1.height = me.height

When I put it in the detail_onprint method, I get an error:

Run-time error '2191': You can't set the Height property in print preview
or after printing has started.

If I put it in the detail_onformat method I don't get an error, but the size
of the line never changes.

Can anyone please help me figure this out? Thanks!
 
Just noticed I posted the names of the functions wrong. It's detail_format
and detail_print. They're correct in the database, I just copied them wrong
 
Consider using a little code in the On Page event of your report. The code
might look like:
Me.Line (0,0)-(0,14400)
Me.Line (Me.Width,0)-(Me.Width,14400)
 
Thanks! That did the trick.

I actually left the original lines on the report and used them as a
reference to draw the new ones.

me.line (me.resizeline1.left,0)-(me.resizeline1.left,14400)

Dave
 
Back
Top