Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

resize verticle line in report based on detail height

Status
Not open for further replies.

mrsbean

Technical User
Jul 14, 2004
203
US
I have a report with many subreports. I want to resize a couple of verticle lines depending upon the final height of the detail section in the report. This will help to separate columns in the report.

I have been looking for a method to change the height of my line to match the height of the detail at format in the report. Anyone. Thanks in advance.

MrsBean
 
I think this is perhaps better posted in the reports forum ([ignore]forum703[/ignore])

I think you'll need to remove the lines, and use the line method of the report object. Since you say the line should fit with the height of the detail section, I figure you have one (or more?) controls with the can grow property set to yes.

I think one trick is to use the the coordinates from that control to make this work.

[tt] dim x1 as single
dim y1 as single
dim x2 as single
dim y2 as single

x1 = me!txtBox.Left - 50 ' 50 twips to the left of the
' control. You probably want to play a little with this
' to find the exact position of where you wish to place
' the line. Use for instance msgbox me!txtControl.Left
' to find the where the box starts, then add/subtract a
' a little to make the line appear between controls
y1 = 0 ' using top of the section
x2 = x1 ' this isn't a box, so use the same x position
y2 = me!txtBox.height ' picking up the height of the box

me.line (x1, y1) - (x2, y2)[/tt]

Try using this in the on print event of the detail section.

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top