PageHeader unstable position

M

Mishanya

What may be resposible for PageHeader (I have a simple pagenumber control)
make a leap of a few mm right and upwards betwen its placement in the 1st
page and all the rest of the pages?
 
M

Marshall Barton

Mishanya said:
What may be resposible for PageHeader (I have a simple pagenumber control)
make a leap of a few mm right and upwards betwen its placement in the 1st
page and all the rest of the pages?

The page header comes after the report header. That should
not affect the right/left position unless you are doing
something really strange, but a blank non-zero height report
header will affect the page header's vertical position on
the first page.
 
M

Mishanya

Marsh Hi again!
I do have report header wich is not blank - it has company name and some
info, then pagebreak.
The page autonumber control starts from the PageHeader.
This is it.
Nevertheless, in the 2nd page (3d overall incl ReportHeader) it leaps some
half-inch to the right and some 30 mm up.

Btw, I got it done with the report frame width and color - thanks a lot.
 
M

Marshall Barton

Mishanya said:
I do have report header wich is not blank - it has company name and some
info, then pagebreak.
The page autonumber control starts from the PageHeader.
This is it.
Nevertheless, in the 2nd page (3d overall incl ReportHeader) it leaps some
half-inch to the right and some 30 mm up.


I have never seen anything like that unless I used some code
to change the text box's Left and Top properties. Search
for any code that references the text box.

If you think the entire page header is moving, set the
section's BackColor to red so you can see exactly where the
section is on the page.

Also, double check that you really are using the main
report's Page Header section and not some other mechanism
(e.g. a subreport group header with RepeatSection) that
simulates a page header.
 
M

Mishanya

Hi Marsh!
Great idea with coloring the whole header section. You were right - the
whole section moves. In the 1st (2nd overall) page it is centered between the
frame side borders (wich lie on the margins thanks to your code) and some 0.5
cm below the top frame line.
But from the 2nd page and forth it ajusts exactly to the lines - right and
upwards. It also does not fit the page width (the width between the margins)
- it's narrower.
I 've lowed the pagebreake in the Report Header down to the section margin -
it solved the problem with the Page Header section leaping up - now it sits
exactly on the margin
What's to be done with leaping rightward?
 
M

Marshall Barton

Mishanya said:
Great idea with coloring the whole header section. You were right - the
whole section moves. In the 1st (2nd overall) page it is centered between the
frame side borders (wich lie on the margins thanks to your code) and some 0.5
cm below the top frame line.
But from the 2nd page and forth it ajusts exactly to the lines - right and
upwards. It also does not fit the page width (the width between the margins)
- it's narrower.
I 've lowed the pagebreake in the Report Header down to the section margin -
it solved the problem with the Page Header section leaping up - now it sits
exactly on the margin
What's to be done with leaping rightward?


I can not believe that the page header section is not
aligned to both the right and left margins on every page.
There must be something else involved.

Try setting the BackColor of each page header label and text
box to a different color to see if something is masking the
left side of the section.

I am really grasping at straws here, but maybe there's
something odd in the page header Border properties???
 
M

Mishanya

May be this could be a case:
I nested all the subreports in ClientHeader Section (I remember doing so,
cause when I tried to nest them in the report Detail Section or in the
ClientDetail section, I got blank pages for every client for every report
page instead of 1 page only for the selected client).
And since ClientHeader Section is used for this propose, I use report
PageHeader section for the page-numbers.
 
M

Mishanya

Well, I've tried everything - nothing seems to be wrong with PageHeader -
still it would not align with the report margins.
What is "page header Border properties"?
 
M

Marshall Barton

Mishanya said:
May be this could be a case:
I nested all the subreports in ClientHeader Section (I remember doing so,
cause when I tried to nest them in the report Detail Section or in the
ClientDetail section, I got blank pages for every client for every report
page instead of 1 page only for the selected client).
And since ClientHeader Section is used for this propose, I use report
PageHeader section for the page-numbers.


I don't see how any of that can afffect the page header.

Getting a lot of pages with the subreports in the main
report's detail section is almost always a problem with the
main report's record source table/query, not a problem with
the placement of the controls. I suspect that the main
report's record source is not filtered to just the desired
client.
 
M

Mishanya

I've just found out, that not only the PageHeader section is not aligned to
the margins, but the rectangle that I drow with Line Method is also
distributed unevenly:
Left and upper lines apparently have width as defined by Me.DrawWidth = 6,
but right and lower ones seem much slimer (and unless the report view is
scaled as 100%, they are not seen at all).
Kill me!
 
M

Marshall Barton

Mishanya said:
I've just found out, that not only the PageHeader section is not aligned to
the margins, but the rectangle that I drow with Line Method is also
distributed unevenly:
Left and upper lines apparently have width as defined by Me.DrawWidth = 6,
but right and lower ones seem much slimer (and unless the report view is
scaled as 100%, they are not seen at all).


This rectangle issue may not be a specific problem, but a
consequence of where a line is positioned in relation to the
coordinates used to specify the line's end points. For
instance, and I am pretty sure this is the case, if the
line's thickness is added to the right or below the
coordinates, then the part you are not seeing is just being
cropped at the right and bottom margins. You can easily
test this by subtracting a fudge factor from the second set
of coordinates:

Me.Line (0,0)-(Me.ScaleWidth-20,Me.ScaleHeight-20), vbRed, B

20 is probably not optimal, but I'm guessing it would be
safe with a DrawWidth of 6 for most monitors and
resolutions.
 
M

Marshall Barton

Mishanya said:
Well, I've tried everything - nothing seems to be wrong with PageHeader -
still it would not align with the report margins.
What is "page header Border properties"?


There are no Border properties for a section. I was
thinking of a different scenario where a text box was used
to achieve an effect.

Are you certain that the page header contains just the one
text box with the page number and there are no other
controls, not even a label, to get in the way?
 
M

Mishanya

OK
I used your previous tip and played with it a bit.
Now I have:

Me.DrawWidth = 6
Me.Line (0.1 * 1440, 0.1 * 1440)-Step(7.5 * 1440, 11 * 1440), 128, B

with margins page setup as 7 for every margin - and the framelines issue
seems to be solved - it is distributed perfectly well.

Still, PageHeader and Detail sections in the 1st page lay one behind another
(I've checked it with colors) though not ajusted to the page-width (there are
white margins from both sides between the sections and the framelines), but
in the 2nd page the Header aligns to the frame (rightwards) while the Detail
section is still positioned in the center between the framelines.

Seems that I'll have to live with it.

Thanks a lot for Your patience!
 
M

Mishanya

Interesting
I've changed the report property Page Header to "Not with Rpt Hdr" - and now
the paging started only from Page 3 sayng it is page 3.
Then I've shortened the Report Header section - and this is it - now the
paging started from page 2 and no leaps!
I've even put the report property Page Header back to "All pages" - still
the paging starts from the 2nd (after the report header) page showing "2".
Well, the problem was with Report Header hight wich was longer then the page
hight.
I'm glad to get it done, although all the relationships between the report
sections is now complete mistery for me (what prevails on what).

Marsh - thanks a lot! As we say in Russian - SPASIBO !
 
M

Marshall Barton

Mishanya said:
Interesting
I've changed the report property Page Header to "Not with Rpt Hdr" - and now
the paging started only from Page 3 sayng it is page 3.
Then I've shortened the Report Header section - and this is it - now the
paging started from page 2 and no leaps!
I've even put the report property Page Header back to "All pages" - still
the paging starts from the 2nd (after the report header) page showing "2".
Well, the problem was with Report Header hight wich was longer then the page
hight.
I'm glad to get it done, although all the relationships between the report
sections is now complete mistery for me (what prevails on what).

Marsh - thanks a lot! As we say in Russian - SPASIBO !

Glad to hear it is resolved.

So, it was the Report Header causing all the strange
effects. I still don't see how that can cause a left/right
shift, but if it's ok now, it's all good.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top