Re: Can Grow Subreport doesn't Move a Rectangle
- From: Chuck <libbeyc@xxxxxxxxxxxxxx>
- Date: Tue, 12 Aug 2008 09:20:33 -0400
On Mon, 11 Aug 2008 15:39:01 -0700, Kari <Kari@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
Chuck,Can you put the text boxes in question in their own sub report that is placed
Thanks for your reply. Unfortunately, the text boxes I need to put a box
around, are on the main report, not the subreport (sorry for the confusion).
The text boxes in question are located below the subreport and get moved as
the subreport changes size.
I have put a new, unbound, text box on the report, and used it to make the
rectangle I need. Although this works, it strikes me as a bad idea; who
knows what kind of unexpected mischief an idle text box can get up to?
Any further ideas would be most welcome.
Kari
"Chuck" wrote:
On Mon, 11 Aug 2008 09:38:20 -0700, Kari <Kari@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:
I have a pretty straightforward report with a subreport in the detail section
set to Can Grow. When it grows it pushes the textboxes (and their labels)
below it, down accordingly. So far, so good.
The problem is that I have a rectangle around those textboxes, which doesn't
get moved. Is there a way to make the rectangle move, as well?
Poking around the boards I found a way to draw the rectangle in at the On
Print event, but that seems so much more complicated. I'm hoping someone out
there can tell me how to get the doggone rectagle to move! :-)
Thanks for all your help,
Kari
Do not drawn a rectangle around the test boxes. Instead, set the Boarder Style
of the sub report to: Solid. Set the Boarder Width to: Hairline. Set the
Boarder color to: 0. That's zero for black, not letter O. The boarder will
grow, shrink, and move as required to keep all the text boxes inside.
Chuck
under the existing sub report?
Unless you absolutely must have a rectangle around the text boxes, just draw a
horizontal line above and below the text boxes. The horizontal lines will move
as the sub report grows or shrinks. If you draw vertical lines on the sides,
(to make a rectangle) the tops of the vertical lines will also move to stay
aligned with the top horizontal line, however their length will not grow as the
'rectangle' expands vertically. If the 'rectangle' does not grow, you may be
home free.
Don P. Mellon has written code for a module that will draw a vertical line
between two variable points.
* * * * * * *
Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)
' Copyright Don P. Mellon
' Comment:
On Error GoTo ErrorHandler
Dim X1 As Single
Dim Y1 As Single
Dim X2 As Single
Dim Y2 As Single
Dim Color As Long
' Set measurement to inches, line width in pixels, black line color, and Y
values.
Me.ScaleMode = 5
Me.DrawWidth = 5
Color = RGB(0, 0, 0)
Y1 = -0.01
Y2 = 21 'actual vertical length will end at bottom of the Detail section.
'Draw line 1.
X1 = 0.1
X2 = 0.1
Me.Line (X1, Y1)-(X2, Y2), Color
'Draw line 2.
X1 = 8.1
X2 = 8.1
Me.Line (X1, Y1)-(X2, Y2), Color
ExitRoutine:
Exit Sub
ErrorHandler:
MsgBox Err.Description
Resume ExitRoutine
End Sub
* * * * * *
Chuck
.
- Follow-Ups:
- References:
- Can Grow Subreport doesn't Move a Rectangle
- From: Kari
- Re: Can Grow Subreport doesn't Move a Rectangle
- From: Chuck
- Re: Can Grow Subreport doesn't Move a Rectangle
- From: Kari
- Can Grow Subreport doesn't Move a Rectangle
- Prev by Date: Re: Ignore empty fields in Criteria append
- Next by Date: Re: Change Group Level order on Access Report from selection made on f
- Previous by thread: Re: Can Grow Subreport doesn't Move a Rectangle
- Next by thread: Re: Can Grow Subreport doesn't Move a Rectangle
- Index(es):
Relevant Pages
|