Page Widths

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I have a report that I can't shrink to the width of 1 page. I have
tried to select everything on the right side of the page in order to
move/shorten them, but nothing gets selected, and I still can't move the
right side of the page border.

Any Ideas?

Steve
 
If you can't move the right edge of the page to the left then I expect you
have some control that is stopping it. You can click on any control on your
report and then press the tab key to iterate through each control to see the
control's right most point.
 
I have a report that I can't shrink to the width of 1 page. I have
tried to select everything on the right side of the page in order to
move/shorten them, but nothing gets selected, and I still can't move the
right side of the page border.

Any Ideas?

Steve

The usual culprit is a line (that is hidden by one of the section
dividers) extending to the right edge of the report.
 
I would have thought so, too, but if I click in the white space above
the report (where the ruler is) it would select anything that is
directly below that vertical. Nothing gets selected. No line gets
printed in that space in the report, or on the 2nd page that prints.

Weird...

Steve
 
Here is a simple function that should return the name and furtherest right
point of a control on a report that is open.
Create a new blank module and paste this code into it. Save the module as
"basRptUtilities". Open your report in design view, open the debug window
Ctrl+G, and enter:
? FindMaxRight("rptYourReport")

Function FindMaxRight(pstrRptName As String) As String
'some controls don't have these props
On Error Resume Next
Dim rpt As Report
Dim ctl As Control
Dim lngMaxRight As Long
Dim strCtlName As String
Dim lngRight As Long
Set rpt = Reports(pstrRptName)
For Each ctl In rpt.Controls
lngRight = ctl.Left + ctl.Width
If lngRight > lngMaxRight Then
strCtlName = ctl.Name
lngMaxRight = lngRight
End If
Next
Set rpt = Nothing
FindMaxRight = strCtlName & " right:" _
& lngMaxRight
End Function
 
THAT worked like a charm. It revealed a line with a height of 0, so it
was essentiallly invisible. I don't know why it wouldn't select,
however. Anyway, it's gone, and my report looks fine.

Thanks
 
Back
Top