Re: Can Grow Subreport doesn't Move a Rectangle



On Mon, 11 Aug 2008 15:39:01 -0700, Kari <Kari@xxxxxxxxxxxxxxxxxxxxxxxxx>
wrote:

Chuck,

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

Can you put the text boxes in question in their own sub report that is placed
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
.



Relevant Pages

  • Re: Can Grow Subreport doesnt Move a Rectangle
    ... around, are on the main report, not the subreport. ... The text boxes in question are located below the subreport and get moved as ... The problem is that I have a rectangle around those textboxes, ... Poking around the boards I found a way to draw the rectangle in at the On ...
    (microsoft.public.access.reports)
  • Re: Can Grow Subreport doesnt Move a Rectangle
    ... around, are on the main report, not the subreport. ... The text boxes in question are located below the subreport and get moved as ... The problem is that I have a rectangle around those textboxes, ...
    (microsoft.public.access.reports)
  • Re: Can Grow Subreport doesnt Move a Rectangle
    ... around, are on the main report, not the subreport. ... The text boxes in question are located below the subreport and get moved as ... Put a rectangle around ...
    (microsoft.public.access.reports)
  • Re: sub report text field not visible in main report
    ... On Nov 30, 10:42 am, Duane Hookom ... five text boxes but basically it's this. ... report is used as a sub report on another report. ...
    (microsoft.public.access.reports)
  • Re: Report/Sub Report Issue
    ... I had moved the text boxes of the 1st report into the page header in order to force them to appear on each page. ... I would like for the sub report to display it's records on the right half of the page. ...
    (microsoft.public.access.reports)