Report Layout

R

Robert5833

Good day all;

I have a report with some layout problems. The report is based on a U.S.
government form, so the format must be preserved when printed. I'm using
Report Page Header, Detail, and Report Page Footer.

The report Detail section is populated with text boxes whose Record Source
is an underlying query. The Detail section is formatted to hold up to 4
recordsets, then starts another page with Header and Footer carried forward.
No problems there.

When there are less than 4 recordsets (less than 4 records on a single page
of the report; first, or last page), the empty records result in a “blankâ€
gap between the Page Header and Page Footer (both of which have a Rectangle
border, connected by vertical lines placed in the left and right margins of
the Detail section).

The problem does not appear in the “Report†view; only in Print Preview (and
when printed).

How can I "fill" the Detail section with "empty" records (either page 1, or
page 2)?

Thank you in advance for your help.

Robert5833
 
C

Clifford Bass

Hi Robert,

Untried: Create a table with one numeric field that contains enough
rows, with enough values to cover the most blank records you want. So record
1 will contain 1, record 2 will contain 2, etc. Create another query that is
based off or your original report's query that is a union query (use SQL
View).

select 0 as Presort_Order, * from [qryOriginalReportSource]
union all
select 1, null, null, null, .... (enough to equal the number of fields
in qryOriginalReportSource) ... from [tblNumbersTable] where
[tblNumberTable].[NumberColumn] <= (select count(*) from
[qryOriginalReportSource])

Use the Presort_Order "column" as your first sort column to make sure
that all of the real data rows come first before the blank rows.

Hope this helps,

Clifford Bass
 
R

Robert5833

Thank you Clifford! I'll try this approach and see what happens.

Regards,
Robert

Clifford Bass said:
Hi Robert,

Untried: Create a table with one numeric field that contains enough
rows, with enough values to cover the most blank records you want. So record
1 will contain 1, record 2 will contain 2, etc. Create another query that is
based off or your original report's query that is a union query (use SQL
View).

select 0 as Presort_Order, * from [qryOriginalReportSource]
union all
select 1, null, null, null, .... (enough to equal the number of fields
in qryOriginalReportSource) ... from [tblNumbersTable] where
[tblNumberTable].[NumberColumn] <= (select count(*) from
[qryOriginalReportSource])

Use the Presort_Order "column" as your first sort column to make sure
that all of the real data rows come first before the blank rows.

Hope this helps,

Clifford Bass

Robert5833 said:
Good day all;

I have a report with some layout problems. The report is based on a U.S.
government form, so the format must be preserved when printed. I'm using
Report Page Header, Detail, and Report Page Footer.

The report Detail section is populated with text boxes whose Record Source
is an underlying query. The Detail section is formatted to hold up to 4
recordsets, then starts another page with Header and Footer carried forward.
No problems there.

When there are less than 4 recordsets (less than 4 records on a single page
of the report; first, or last page), the empty records result in a “blankâ€
gap between the Page Header and Page Footer (both of which have a Rectangle
border, connected by vertical lines placed in the left and right margins of
the Detail section).

The problem does not appear in the “Report†view; only in Print Preview (and
when printed).

How can I "fill" the Detail section with "empty" records (either page 1, or
page 2)?

Thank you in advance for your help.

Robert5833
 
C

Clifford Bass

Hi Robert,

You are welcome. Just one correction to the statement. I have
realized that this version gives you an equal number of blank lines to
non-blank. To limit it so that it you only get enough to fill up the
remaining lines when the original has less than four change the condition
"... [tblNumberTable].[NumberColumn] <= (select count(*) ...." to
"...[tblNumberTable].[NumberColumn] <= 4 - (select count(*) ....".

Clifford Bass

Robert5833 said:
Thank you Clifford! I'll try this approach and see what happens.

Regards,
Robert

Clifford Bass said:
Hi Robert,

Untried: Create a table with one numeric field that contains enough
rows, with enough values to cover the most blank records you want. So record
1 will contain 1, record 2 will contain 2, etc. Create another query that is
based off or your original report's query that is a union query (use SQL
View).

select 0 as Presort_Order, * from [qryOriginalReportSource]
union all
select 1, null, null, null, .... (enough to equal the number of fields
in qryOriginalReportSource) ... from [tblNumbersTable] where
[tblNumberTable].[NumberColumn] <= (select count(*) from
[qryOriginalReportSource])

Use the Presort_Order "column" as your first sort column to make sure
that all of the real data rows come first before the blank rows.

Hope this helps,

Clifford Bass
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top