Solved Sub report is ruining the spacing on the main (1 Viewer)

breezett93

New member
Local time
Today, 00:20
Joined
Jun 7, 2021
Messages
20
It looks like the cause of the issue is the Application sub report. Here is how the report looks normally and is functioning properly:
0001.jpg
Everything fits on one page.

Here is what happens when more than two items are in the Application sub report:
0001.jpg
0002.jpg
There is now a huge gap right above Application that shouldn't be there. I have confirmed that no blank characters were entered in the Special Info box. I've made changes to spacing but it doesn't seem to matter. Hopefully someone has experienced something similar and knows what the little fix is.

Thanks.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 00:20
Joined
Feb 28, 2001
Messages
27,131
The first thing would be to look at the record source for that report to verify that the field feeding "Special Info" is actually blank/empty. That screen shot you showed us LOOKS like the "Special Info" box has the CanGrow property set to YES, and it grew. That would explain why things moved down. So the next question is: WHY did it grow? That is a rhetorical question - it grew because thinks it needs to, and that usually involves data being added somehow. So check the record source for that specific record. That would include hidden non-printing characters like the characters implied by vbCrLf, for example.

It is not clear where the page break is located, but you might wish to look for something just above the Application: label to see if there is something else dumping extra lines OR that is forcing alignment of that label to a specific height (vertical position, actually) on the form. Which would be the label's Top property, which is section-relative but IS affected by page feeds.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 06:20
Joined
Feb 19, 2013
Messages
16,603
Not much to go on and what is the subreport - application? Which contains what controls?

what settings are you using? Particularly can grow is applied to what controls?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:20
Joined
Feb 19, 2002
Messages
43,213
Are you sure there isn't a gap in design view? Post a picture so we can see what it looks like please.
 

breezett93

New member
Local time
Today, 00:20
Joined
Jun 7, 2021
Messages
20
Sorry for the delay. Here is what the report looks like in Design View.
0001.jpg
0002.jpg


So, to answer some of the questions: @CJ Both Special Order Info and Application are subreports. Can Grow is enabled for both of them.
@Pat In Design View, there is no gap. There is just a change from OrdId Header to Detail. @DocMan The record source for both subreports is the same, meaning one query is retrieving the info for both of them. However, Special Order Info has controls with IIF statements that only show the relevant info. Does that explain why the box is growing?

Just to test, I disabled Can Grow for Special Order Info, and all the information fits on one page like it should. Is the solution to break up the query into two?

I'll add that I did not design this report. It was created before I started.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:20
Joined
Feb 19, 2002
Messages
43,213
Looks like the box for the special order information is growing. Does the gap appear on all records or just some. Might be extra spaces or tabs at the end of the text in the box making it grow.
 

breezett93

New member
Local time
Today, 00:20
Joined
Jun 7, 2021
Messages
20
The gap appears only when the Application sub-report has more than record to display.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 01:20
Joined
Feb 19, 2002
Messages
43,213
From what we could see in the picture, the text box didn't have any data. One think you should always do with text fields is set AllowZeroLengthStrings to No. This is a big problem when you import data from old applications. To get rid of the trailing "blanks" that fill these fields, don't import directly into your tables. Link the source as a table and run append queries. In the append queries, you can fix up bad data like this using the Trim() function.
 

Users who are viewing this thread

Top Bottom