Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Format Subreports

Posted on 2011-09-09
Last Modified: 2013-11-27
Great Day! I have a report that has two subreports in it. In design view, the subreports are stacked and I placed them about 1/4 inch apart; however, when the report runs, if the subreport on the top has more than three rows that are displayed, then the subreport on the bottom is displayed like it is in design view; meaning that it is about 1/4 inch from the top subreport. However, if less than three rows are displayed in the top subreport, then the bottom subreport is displayed about an inch or more below.

What can I do to have the bottom subreport display 1/4 inch below the top one in all situations?

Thanks in advance for your assistance.

Question by:yddadsjd95
  • 3
  • 2
  • 2
  • +1
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 36510328
have you set the CanGrow and CanShrink properties of both subreports to Yes?

Author Comment

ID: 36510386
Thanks for reaching out to me Fyed. Yes both subforms are to yes for CanGrow and CanShrink. This may be related: the page footer of the main report has some total lines about 1/4 inch below the page footer line, but it prints about an inch below the second subform, so I appear to be having a systemic problem here.

LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 36510507
Can you dummy up a new database with your report, and enough sanitized data from your original to replicate the problem, so we can see it with actual data?

1.  Just open a new mdb, import the tables, queries, and reports necessary to replicate the problem.  

2.  Go through the tables you copied and delete all but a couple of records.  Leave enough records in all of the tables to duplicate two versions of the report, one which works, and one which doesn't.

3.  Then go into your tables and change any of the remaining data that might be proprietary or personal in nature (company names, phone #, email, account #), that kind of thing.

Then post it back here.
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.


Author Comment

ID: 36510721
Here it is.

1. Open frmRepairOrder-Select4Report2
2. Select a Repair Order
3. Click Open Report

Thanks a million!

LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36511302
Without digging too deeply into your design here...
As a test...
If the tables are normalized and related properly, you can use the Report wizard to create a "Grouped report".
You can select the needed fields from each (related) table and the wizard will ask you how you want to view the data.
If you select the Main table, it will create a report hierarchically grouped to show the same data as in your report with subreports.
If this report is not correct, then something is awry in your table design/relationships...
LVL 26

Accepted Solution

Nick67 earned 500 total points
ID: 36511513
While there are programmatic ways to muck around with spacing, Access 2007+ introduced a nasty bug that blows up Access when you try to dynamically move subreports and resize the section they are in.
Your best bet is to make each sub report's control very short (.125" or so) and the maximum space apart that you want and let CanGrow take care of the rest.

Attached is the heavily altered sample I sent on your last question, with the report spacing done in this fashion

Author Closing Comment

ID: 36511758
It works perfectly Nick. Thank you very much and have a great day!
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36511834
I think the key (No pun intended) here was to link the parts subreport to the same "RepairOrderId" as the first subreport  (RepairOrderSubreport)

In the case of Nick's report, it is "JobID"

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question