How can I fix the height of detail section in the report? (1 Viewer)

yunhsuan

Member
Local time
Today, 19:27
Joined
Sep 10, 2021
Messages
54
Hello~
I tried to make a table in report. The area of the group header, detail section and group footer in this table should be fixed. I know I can fix the height of group header and footer by pulling broader. But, the height of detail section would be changed by amount of records. How can I fix the height of detail section (like more than 70 cm and less than 80cm)?
Thanks!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:27
Joined
Oct 29, 2018
Messages
21,357
Hi. The height of the Detail section is dictated by the number of records in the report. If you want a fixed height, you could try using a fixed number of records.
 

yunhsuan

Member
Local time
Today, 19:27
Joined
Sep 10, 2021
Messages
54
Hi. The height of the Detail section is dictated by the number of records in the report. If you want a fixed height, you could try using a fixed number of records.
The number of records in my report is uncertainties. Could I fix number of records in one page in the report?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:27
Joined
Oct 29, 2018
Messages
21,357
The number of records in my report is uncertainties. Could I fix number of records in one page in the report?
Yes, you can fix the number of records in one page by "padding" it with blank rows.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:27
Joined
Oct 29, 2018
Messages
21,357
PS. Does any of your Textboxes in the Details section has Can Grow = Yes? If so, that might complicate things.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:27
Joined
Feb 28, 2001
Messages
26,996
To clarify - the detail section actually IS more or less fixed in height (with the detail section's property ".CanGrow" as a cause for the "more or less" part.) But... the detail section repeats once for each record in the group. That repetition is why you get height variability. You can prove this to yourself by imposing some kind of line at the top or bottom of the detail section.
 

yunhsuan

Member
Local time
Today, 19:27
Joined
Sep 10, 2021
Messages
54
PS. Does any of your Textboxes in the Details section has Can Grow = Yes? If so, that might complicate things.
Unfortunately, yes. And sometimes, records need to be print across when the number of records is a lot.
Is there any file and video can let me refer to?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 04:27
Joined
Oct 29, 2018
Messages
21,357
Unfortunately, yes. And sometimes, records need to be print across when the number of records is a lot.
Is there any file and video can let me refer to?
In that case, you might consider using a subreport then.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:27
Joined
Feb 28, 2001
Messages
26,996
The number of records in my report is uncertainties. Could I fix number of records in one page in the report?

How do you mean this? As in, LIMIT the number of records per page? That is actually automatic. What you might wish to examine are the Format properties of the Detail section, particularly the .KeepTogether (which prevents splitting the section across two pages) and .ForceNewPage (which defines when you have to put in a page break - before or after the section).
 

isladogs

MVP / VIP
Local time
Today, 11:27
Joined
Jan 14, 2017
Messages
18,186
Are you using Report View? If so, suggest you use Print Preview which will automatically 'paginate' the data displayed.
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 11:27
Joined
Sep 12, 2006
Messages
15,613
The details section is the page height less any headers and footers.

The report will then put as many records as it can within the available height of the details section subject to restrictions imposed by any "keep together" and similar options (if there are any others). The only thing you might be able to do is force a new page after a certain number of records. I think you could certainly get a new page for each record, but I don't expect this is the aim. I can't see what else you could do .
 

Users who are viewing this thread

Top Bottom