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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Draw box round variable height subreport

Status
Not open for further replies.

PeDa

Technical User
Oct 10, 2002
227
NL
Hello

I want to draw a box on my report that include some fields and a variable height subreport. How can I set the (variable) height of my box.

MyBox.Height = Me.MySubReport.Height + 1000 or
MyBox.Height = Me.MySubReport.Report.Height + 1000 in the Detail_Format event don't work (these always return a constant value)

Thanks in advance.

 
PeDa
If you want a box around the subreport only, you could set it up so that it has a border. Select the subreport control in your report Detail section, and set the Border style to Solid.

Then whatever shows in the subreport will have a box around it, and the height will vary according to the amount of data in it.

Tom
 
Consider using the Line method of the report in code within the On Print event. You can read the grown height of the subreport and then use the Line method to draw a rectangle on your report.
There are some examples of using the line method in the calendar report at
Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Tom and Duane,

Thanks.

Tom, indeed but I want to envelop more than the subreport alone.

Duane, this works fine (I had long forgotten the line method)

Best wishes,

Peter

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top