• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 447
  • Last Modified:

Sub Reports Keep together property

I have 4 sub reports in the report footer of another report. They are not linked by any data but need to be viewed together.

I have fiddled with all aspects of the keep together, group, with first detail etc, but all seem to be ignored because they are all in the footer of another report. How do I stop a report in this situation from having the header for any of the 4 reports at the base of a page and all the detail on the following page?

I am trying to avoid page breaks after each report.

Regrettably, the reports are very involved so I cannot post a sample DB
0
DatabaseDek
Asked:
DatabaseDek
  • 4
  • 3
1 Solution
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
If I'm understanding correctly, you would create a dummy group in the sub report (say on the expression =1), and place the sub-reports headings in that groups header.

Screenshot
Jim.
0
 
DatabaseDekAuthor Commented:
Hi

All reports work fine on there own. But when a subreport follows another in a main report's report footer they don't. Presumably because access 2002 does not know how to sort them.

Here are some screen grabs that show the problem graphically. You can see from "Capture" that the headings look OK until you see that in "Capture2" (2nd page of same report) that the last report on page one runs over into page 2. "Capture3" shows report structure in design view
Capture.PNG
Capture2.PNG
Capture3.PNG
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
<<I have fiddled with all aspects of the keep together, group, with first detail etc, but all seem to be ignored because they are all in the footer of another report. How do I stop a report in this situation from having the header for any of the 4 reports at the base of a page and all the detail on the following page?>>

 If you try what I said, you'll find that the sub-reports headings will repeat on any overlow pages and I believe that will take care of your problem.

Do it in a copy of the DB.  Shouldn't take more then a few minutes to test.

 The problem is the sub-reports themselves and not the fact that they are in the main reports footer.

Jim.
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
DatabaseDekAuthor Commented:
Hi Jim

I did try what you suggested and got exactly the same problem

"Capture4". shows the settings as you explained. Normally you would have any new page repeating title in the page header, View menu Tick page header footer. But what I want is the report to only appear on the remainder of any page that is large enough to hold the complete subreport. Which is where "keep together" feature is meant to come in.

I am beginning to think that the correct way is to have each subreport placed in the previous reports footer and set the report footer to keep together.

Seems a lot of grief, when all I want is to see 5 reports one after the other.
Capture4.PNG
0
 
DatabaseDekAuthor Commented:
It seems that after faffing around with this for best part of a day that the problem is that the first subreport  in any main report's report footer will obey the keep together and grouping  settings. Then, I suppose obviously when you think about it whether to fit a report at the end of a previous report will depend on the space required from the main report and then what is left will either allow or not allow the subreport to be fitted in any space below. But it cannot calculate what is left from the first and second before the third is placed. This is why I think that all reports need to be placed in the previous reports footer.

I am trying that and will get back asap
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
I can't play with it here, but one approach used in the past has been to place page breaks in the section, then at format make them visible/hidden as needed to force a page break where you want based on your current postion on the page.

 But your method might work and would be cleaner, so I would give that a shot first.

Jim.
0
 
DatabaseDekAuthor Commented:
Thanks Jim

My effort has come to nowt'

Although I did solve another problem. Even when set to keep together the main form report footer (Because it has subreports) does not keep the totals together. But by drawing a Transparent box around them they keep together anyway.

Your suggestion, presumably,  would require the report length before a decision on a page break was effective I guess and would have to be deducted from that available on page 1 2 or 3 etc of the main report. Who ever could do that has my utmost respect. Too time consuming for me.

I will have to accept that on the odd occasion the report will be a little second rate and thank you again for your time.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now