Draw rectangle based on subreport

Q

Question Boy

I am trying to create a rectangle around a certain area in a report that is
variable/dynamic based on a subreport and for some reason cannot get the
proper height of the subreport to pass to the function drawing the rectangle.


Using the Detail_Print event I have

Dim iheight As Long
If Me.rpt_tbl_dtFabP.Report.Height > Me.rpt_tbl_dtApproP.Report.Height
Then
iheight = 900 + Me.rpt_tbl_dtFabP.Report.Height
Else
iheight = 900 + Me.rpt_tbl_dtApproP.Report.Height
End If

should this not work? how can I determine the height of the subreport,
record by record?

QB
 
D

Duane Hookom

I doubt you want to refer to the ".Report." since you are only concerned
about the grown height of the control and not anything about the object in
the control.

I would try
Dim iheight As Long
If Me.rpt_tbl_dtFabP.Height > Me.rpt_tbl_dtApproP.Height Then
iheight = 900 + Me.rpt_tbl_dtFabP.Height
Else
iheight = 900 + Me.rpt_tbl_dtApproP.Height
End If
 

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