I am trying to use the Line method to draw a rectangle around the detail section of my report. The detail section contains 2 subreports, both of which CanGrow. The detail section itself also CanGrow.
I am calling the line method as follows (snippet) from the OnPrint of the Detail section:
sngTop = rpt.ScaleTop
sngLeft = rpt.ScaleLeft
sngWidth = rpt.ScaleWidth
sngHeight = rpt.ScaleHeight
lngColor = RGB(0, 0, 0)
rpt.Line (sngTop, sngLeft)-(sngWidth, sngHeight), lngColor,B
The rectangle is not growing with the section. When I put a breakpoint in the code and look at my ScaleHeight values, they never change, even when the section is growing. I've also tried reading the Detail.Height property, but it returns the same value as ScaleHeight.
Interestingly, when I try to read the value of the bottom-most control's position, the value does vary as the section grows. But, if I use that value (+the control's height) to draw my rectangle, the bottom line of the rectangle disappears as if it is somehow trying to write beyond the section.
Any ideas? thanks
I am calling the line method as follows (snippet) from the OnPrint of the Detail section:
sngTop = rpt.ScaleTop
sngLeft = rpt.ScaleLeft
sngWidth = rpt.ScaleWidth
sngHeight = rpt.ScaleHeight
lngColor = RGB(0, 0, 0)
rpt.Line (sngTop, sngLeft)-(sngWidth, sngHeight), lngColor,B
The rectangle is not growing with the section. When I put a breakpoint in the code and look at my ScaleHeight values, they never change, even when the section is growing. I've also tried reading the Detail.Height property, but it returns the same value as ScaleHeight.
Interestingly, when I try to read the value of the bottom-most control's position, the value does vary as the section grows. But, if I use that value (+the control's height) to draw my rectangle, the bottom line of the rectangle disappears as if it is somehow trying to write beyond the section.
Any ideas? thanks