put a break in the report based on sections

  • Thread starter Thread starter Associates
  • Start date Start date
A

Associates

Hi,

I was wondering if i could get some help with Access Report. My question is
whether there is a way of setting a page break or determine when it should
move a certain information to the next page when it is already full with
information on a page. Do we have control over that?

Currently, it just sort of pushes down to the next page as data/information
in the details section keeps growing. That is not the problem but it looked a
bit bizarre having some of the relevant information hanging on the first page
but some others on the next page.

The report itself consists of three sections. So when there are not many
data, it fits in all the sections on one page (which is what i want). The
problem arises it needs to use another new pages.

Any helps would be greatly appreciated.

Thank you in advance
 
Hi,

I was wondering if i could get some help with Access Report. My question is
whether there is a way of setting a page break or determine when it should
move a certain information to the next page when it is already full with
information on a page. Do we have control over that?

Currently, it just sort of pushes down to the next page as data/information
in the details section keeps growing. That is not the problem but it looked a
bit bizarre having some of the relevant information hanging on the first page
but some others on the next page.

The report itself consists of three sections. So when there are not many
data, it fits in all the sections on one page (which is what i want). The
problem arises it needs to use another new pages.

Any helps would be greatly appreciated.

Thank you in advance

I'm afraid I don't understand.
If you have more data than will fit on the page, what would you like
to do with it?
 
Could you clarify what you have and what you want to do? Your description
is too general for me to offer any useful suggestion. I am not certain what
criteria would be used to determine whether to insert a page break. It
almost reads to me as if you have too much data to fit on a single page, but
you want to force it to fit, anyway -- surely I have misunderstood.

Larry Linson
Microsoft Office Access MVP

Associates said:
Hi,

I was wondering if i could get some help with Access Report. My question
is
whether there is a way of setting a page break or determine when it should
move a certain information to the next page when it is already full with
information on a page. Do we have control over that?

Currently, it just sort of pushes down to the next page as
data/information
in the details section keeps growing. That is not the problem but it
looked a
bit bizarre having some of the relevant information hanging on the first
page
but some others on the next page.

The report itself consists of three sections. So when there are not many
data, it fits in all the sections on one page (which is what i want). The
problem arises it needs to use another new pages.

Any helps would be greatly appreciated.

Thank you in advance

__________ Information from ESET Smart Security, version of virus
signature database 4020 (20090420) __________

The message was checked by ESET Smart Security.

http://www.eset.com



__________ Information from ESET Smart Security, version of virus signature database 4020 (20090420) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
Associates said:
I was wondering if i could get some help with Access Report. My question is
whether there is a way of setting a page break or determine when it should
move a certain information to the next page when it is already full with
information on a page. Do we have control over that?

Currently, it just sort of pushes down to the next page as data/information
in the details section keeps growing. That is not the problem but it looked a
bit bizarre having some of the relevant information hanging on the first page
but some others on the next page.

The report itself consists of three sections. So when there are not many
data, it fits in all the sections on one page (which is what i want). The
problem arises it needs to use another new pages.


If your use of the word "section" coincides with report
sections, then try setting the section's KeepTogether to
Yes.
 
Thank you all for your replies.

Apologize for not being so clear in the way i explained my problem. I will
try to give as much information as i can.

In the report, there are "Report Header", "Page Header", "Detail", "Page
Footer" and "Report Footer".

Basically, i have my report heading placed into "Report Header". Then, i
have two sub-reports placed into "Detail". Each of these sub-reports have
their own report headings as well. That's how my report looks like at the
moment. Hope i have not yet lost any of you.

Now, because I do not know how much information there will be from the two
sub-reports. If the data that comes out from the two sub-reports is not less,
then it can all fit in on one page but if it is more, then one page of report
certainly can not contain it all. Then, some of data will be shown on the
next page of the report. I guess if i could simplify this query, it all boils
down to how i could well manage the presentation of the report
professionally.

So what I do not want to see is for example, that the heading of sub-report
2 appears on page 1 but its body content appears on the next page. Hope you
know what i am getting at so far. I guess it is to do with the "Keep
together" option thing. But i have checked that option and it is "yes" at the
moment.

Any helps would be greatly appreciated.

Thank you in advance
 
Associates said:
Apologize for not being so clear in the way i explained my problem. I will
try to give as much information as i can.

In the report, there are "Report Header", "Page Header", "Detail", "Page
Footer" and "Report Footer".

Basically, i have my report heading placed into "Report Header". Then, i
have two sub-reports placed into "Detail". Each of these sub-reports have
their own report headings as well. That's how my report looks like at the
moment. Hope i have not yet lost any of you.

Now, because I do not know how much information there will be from the two
sub-reports. If the data that comes out from the two sub-reports is not less,
then it can all fit in on one page but if it is more, then one page of report
certainly can not contain it all. Then, some of data will be shown on the
next page of the report. I guess if i could simplify this query, it all boils
down to how i could well manage the presentation of the report
professionally.

So what I do not want to see is for example, that the heading of sub-report
2 appears on page 1 but its body content appears on the next page. Hope you
know what i am getting at so far. I guess it is to do with the "Keep
together" option thing. But i have checked that option and it is "yes" at the
moment.


To use the KeepTogether property for each subreport, they
have to be in separate main report setctions. Since you are
not using grouping in the main report; this is simply a
matter of using the main report's Sorting and Grouping (View
menu) to create a group on a constant expression (e,g, =1 or
="Extra Detail") and selecting Yes for the Group Header
property in the window's lower area. Put the first
subreport in the group header section and leave the second
subreport in the detail section. Set the detail section's
KeepTogether property to Yes.
 
Thank you Marsh for your reply.

I did as you instructed but it prompted me for "Extra Section" to fill in
when running the report. What i did was I created a new group by right click
on the "Report Header" and selecting "Sorting and Grouping" option. Under
Sorting and Grouping, i put in "extra detail" to Field/Expression with the
group header = 1, group footer = 0, group on = Each value, Group interval =
1, Keep together = Whole Group. Next, i copied the first sub-report and
placed it into "extra detail" and left the second sub-report in the "detail".
I think it works already just the way i want it to but it's just that it
keeps prompting me for the value of "Extra Detail" when opening the main
report. I wonder if i missed out on anything here.

Thank you in advance
 
You need to set Sorting and Grouping to (note the = sign):
Field/Expression ="Extra Detail"
Group Header Yes
Group Footer No
Group On Each Value
Group Interval 1
Keep Together No

Then set the Detail section's KeepTogether property to Yes.
 
Thanks Marsh for your reply.

That works now :). Thank you for your assistance and patience.

However, there is still one thing that bothers me. This report will show a
summary of how much we invoice our client at the end of a month. On the main
report, this is what it looks like.

I have something like columns headings as below in the "=Extra Detail" Header.

Items Description Period Previous billed Current bill

then -> in here, i put the sub-report 1 here

followed by -> in here, i put here the sub-report 2

Then, finally followed by "Detail" section with the rest of information goes
to the main report.

The problem i am facing here is that when it is all fit on one page (all
entries from sub-report 1, sub-report 2 and the rest of information in
"Detail" section), it looks fine but when I have more than one page, I start
to lose that columns heading. Then, i thought of another way of doing this. I
tried to move the whole heading to the "Page Header". Now, this time, it
appear on every pages of the report. However, it will look a bit ugly when it
is just enough to accommodate all the entries from both sub-report 1 and
sub-report 2 but the rest of the information will need to be on the next
page. This will of course make the heading appear there on the second page,
along with the rest of information in the Detail section. This looks a bit
strange. I hope i have not yet lost you so far. My question is whether there
is a way i can control the appearance of the columns heading. Is this
possible to do?

Thank you in advance


Marshall Barton said:
You need to set Sorting and Grouping to (note the = sign):
Field/Expression ="Extra Detail"
Group Header Yes
Group Footer No
Group On Each Value
Group Interval 1
Keep Together No

Then set the Detail section's KeepTogether property to Yes.
--
Marsh
MVP [MS Access]

I did as you instructed but it prompted me for "Extra Section" to fill in
when running the report. What i did was I created a new group by right click
on the "Report Header" and selecting "Sorting and Grouping" option. Under
Sorting and Grouping, i put in "extra detail" to Field/Expression with the
group header = 1, group footer = 0, group on = Each value, Group interval =
1, Keep together = Whole Group. Next, i copied the first sub-report and
placed it into "extra detail" and left the second sub-report in the "detail".
I think it works already just the way i want it to but it's just that it
keeps prompting me for the value of "Extra Detail" when opening the main
report. I wonder if i missed out on anything here.
 
Associates said:
That works now :). Thank you for your assistance and patience.

However, there is still one thing that bothers me. This report will show a
summary of how much we invoice our client at the end of a month. On the main
report, this is what it looks like.

I have something like columns headings as below in the "=Extra Detail" Header.

Items Description Period Previous billed Current bill

then -> in here, i put the sub-report 1 here

followed by -> in here, i put here the sub-report 2

Then, finally followed by "Detail" section with the rest of information goes
to the main report.

The problem i am facing here is that when it is all fit on one page (all
entries from sub-report 1, sub-report 2 and the rest of information in
"Detail" section), it looks fine but when I have more than one page, I start
to lose that columns heading. Then, i thought of another way of doing this. I
tried to move the whole heading to the "Page Header". Now, this time, it
appear on every pages of the report. However, it will look a bit ugly when it
is just enough to accommodate all the entries from both sub-report 1 and
sub-report 2 but the rest of the information will need to be on the next
page. This will of course make the heading appear there on the second page,
along with the rest of information in the Detail section. This looks a bit
strange. I hope i have not yet lost you so far. My question is whether there
is a way i can control the appearance of the columns heading. Is this
possible to do?


To turn off (make invisible) the main report's page header
after the second subreport is finished, add a line of code
to the second subreport's report footer section's Print
event:

Parent.Section(3).Visible = False

If the second subreport does not have a report footer
section, add it (View menu) and make its Height 0
 
Back
Top