Report frame

  • Thread starter Thread starter Mishanya
  • Start date Start date
M

Mishanya

My report is entirely composed of some dozen subreports nested and piled one
by one in it's Detail Section with enforced Pagebreakes.
I've put a lines along the Detail Section fringes in order to create report
frames. But in Preview the lines show only in a first few pages and even so
they seem to continue only as long, as the current subreport' length.
I can't figure this behaviour.
Can someone advise on how to implement the frame lines in the report with
multiple subreports?
 
Mishanya said:
My report is entirely composed of some dozen subreports nested and piled one
by one in it's Detail Section with enforced Pagebreakes.
I've put a lines along the Detail Section fringes in order to create report
frames. But in Preview the lines show only in a first few pages and even so
they seem to continue only as long, as the current subreport' length.
I can't figure this behaviour.
Can someone advise on how to implement the frame lines in the report with
multiple subreports?


Vertical lines do not grow so they are not a solution.

If you want a rectangle around each subreport, the easiest
thing to try is to set each subreport control's (on the main
report) BorderStyle property.

If the setting the border does not do what you want, then
you can use VBA code in the main report's detail section's
Print event to draw each line. The key part of the code is
the Line method. If you need help with this, post back with
precise details about where each line is supposed to appear
in relation to each subreport.
 
Hello Marsh and thank U for reply.
I don't need to have a border around every subreport.
Each page of the main report consists of 1 to 3 subreports (I've set
pagebreaks to break between groups of theme-connected subreports).
I want to have identical rectangles on every page (including Report Header)
while Page Header is also inside the rectangle, each line is 10 mm from the
page edge. No relation to subreports needed.
 
Mishanya said:
Hello Marsh and thank U for reply.
I don't need to have a border around every subreport.
Each page of the main report consists of 1 to 3 subreports (I've set
pagebreaks to break between groups of theme-connected subreports).
I want to have identical rectangles on every page (including Report Header)
while Page Header is also inside the rectangle, each line is 10 mm from the
page edge. No relation to subreports needed.


Ahhh, that's even easier. Use the line method in the Page
event procedure. For example, this will draw a rectangle at
the page margin settings.

Me.Line (0,0)-(Me.ScaleWidth,Me.ScaleHeight), , B
 
Hi Marsh
If U don't mind:
1) How can I vary the line' color and width?
2) Is there a way not to base it on the margin settings but to set other
values? Cause your way I have to play with the margins in order to set the
borders right, but then all the report' containing is moving accordingly,
wich is not wanted?
 
That's just the syntax to separate the two coordinates.

I would normally have told you to RFM, but the A2000 through
A2003 VBA Help files made a complete mess of the Line,
Circle and PSet methods, even if they did still have valid
examples.
 
No problem, but the lines can not intrude into the margins
(i.e. all coordinates must be within the margins).

The default unit of measurement is the twip (1440 twips per
inch). This can be changed by using the ScaleMode method
(or ScaleTop, ScaleHeight, ScaleLeft and ScaleWidth
methods).

The default origin is the upper left corner of the page
space within the margins. This can be changed by using the
Scale method, but I have never felt a need to do that.

The line thickness can be set using the DrawWidth method.

Check VBA Help for all of those methods confusing details.

The color is specified in the Line method.

For example:

Me.DrawWidth = 6 'pixels
Me.Line (.25*1440,.25*1440)-Step(6.5*1440,9*1440), vbRed, B

Will draw a 6 pixel thick red rectangle 1/4 inch from the
left margin and 7 1/2 inches wide, 1/4 inch from the top
margin and 9 inches high.
 
Thanks a lot.
Completly new matter for me.
Will have to learn into Your posts and also do some googling.
Thanks again!

Marshall Barton said:
No problem, but the lines can not intrude into the margins
(i.e. all coordinates must be within the margins).

The default unit of measurement is the twip (1440 twips per
inch). This can be changed by using the ScaleMode method
(or ScaleTop, ScaleHeight, ScaleLeft and ScaleWidth
methods).

The default origin is the upper left corner of the page
space within the margins. This can be changed by using the
Scale method, but I have never felt a need to do that.

The line thickness can be set using the DrawWidth method.

Check VBA Help for all of those methods confusing details.

The color is specified in the Line method.

For example:

Me.DrawWidth = 6 'pixels
Me.Line (.25*1440,.25*1440)-Step(6.5*1440,9*1440), vbRed, B

Will draw a 6 pixel thick red rectangle 1/4 inch from the
left margin and 7 1/2 inches wide, 1/4 inch from the top
margin and 9 inches high.
--
Marsh
MVP [MS Access]

If U don't mind:
1) How can I vary the line' color and width?
2) Is there a way not to base it on the margin settings but to set other
values? Cause your way I have to play with the margins in order to set the
borders right, but then all the report' containing is moving accordingly,
wich is not wanted?
 
Hi Marshall,

I used this method to draw borders around my report and the DrawWidth really
helps on the boldness. However, in the detailed section I use one of Duane's
"forced extra lines" to fill up the form which also uses the DrawWidth for
it's own lines.

So when I increase the DrawWidth for the report borders it affects the lines
in the detailed section too. How can I separate them from each other?

They are both in the OnPage event of my form.

Marshall Barton said:
No problem, but the lines can not intrude into the margins
(i.e. all coordinates must be within the margins).

The default unit of measurement is the twip (1440 twips per
inch). This can be changed by using the ScaleMode method
(or ScaleTop, ScaleHeight, ScaleLeft and ScaleWidth
methods).

The default origin is the upper left corner of the page
space within the margins. This can be changed by using the
Scale method, but I have never felt a need to do that.

The line thickness can be set using the DrawWidth method.

Check VBA Help for all of those methods confusing details.

The color is specified in the Line method.

For example:

Me.DrawWidth = 6 'pixels
Me.Line (.25*1440,.25*1440)-Step(6.5*1440,9*1440), vbRed, B

Will draw a 6 pixel thick red rectangle 1/4 inch from the
left margin and 7 1/2 inches wide, 1/4 inch from the top
margin and 9 inches high.
--
Marsh
MVP [MS Access]

If U don't mind:
1) How can I vary the line' color and width?
2) Is there a way not to base it on the margin settings but to set other
values? Cause your way I have to play with the margins in order to set the
borders right, but then all the report' containing is moving accordingly,
wich is not wanted?
 
Robbie said:
I used this method to draw borders around my report and the DrawWidth really
helps on the boldness. However, in the detailed section I use one of Duane's
"forced extra lines" to fill up the form which also uses the DrawWidth for
it's own lines.

So when I increase the DrawWidth for the report borders it affects the lines
in the detailed section too. How can I separate them from each other?

They are both in the OnPage event of my form.

Set DrawWidth before drawing each line thickness.

Me.DrawWidth = 5
Me.Line ( . . .

Me.DrawWidth = 2
Me.Line ( . . .
 
Thank you, Marshall. It worked fine.

Marshall Barton said:
Set DrawWidth before drawing each line thickness.

Me.DrawWidth = 5
Me.Line ( . . .

Me.DrawWidth = 2
Me.Line ( . . .
 
Back
Top