Solved

Format Subreports

Posted on 2011-09-09
8
467 Views
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.

r/David
0
Comment
Question by:yddadsjd95
[X]
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
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 48

Expert Comment

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

Author Comment

by:yddadsjd95
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.

r/David
0
 
LVL 48

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.
0
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 

Author Comment

by:yddadsjd95
ID: 36510721
Here it is.

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

Thanks a million!

r/David
PrintInvoice-Sample-8-9-11.zip
0
 
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...
0
 
LVL 26

Accepted Solution

by:
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
PrintInvoice-Nick67.mdb
0
 

Author Closing Comment

by:yddadsjd95
ID: 36511758
It works perfectly Nick. Thank you very much and have a great day!
0
 
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"
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

691 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