Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limit rows per page

Status
Not open for further replies.

promero

Technical User
Jun 12, 2001
83
0
0
ES
How can I limit the number of rows per page in a table, allowing other elements (tables, cells, etc.) to be above and bellow the table on each page?

A sollution could be to query a column to the DB with the page number, and then to make a section from the page number, starting each section in a new page. But the problem is that the page number information is not in the DB.

Thak you.

P. Romero
 
I have not found a total solution, but i have found
two partial solutions:

Partial solution one
------------------------

I have found that, when a table occupies more than a page, the first line of each page (except for the first page) is always after any block fixed in the upper side of the page. These blocks can be used as a header on each page.

But what about the footer? A multi-page table ends at the bottom margin of each page, overlapping with the blocks fixed in the lower side of the page. How can I make the last line of the table on each page to stay before any fixed block in the lower side of the page?

Note: for this explanation, a "fixed" block is a cell, table or graph with "Repeat on each page" checked on "Page design" on "Block format".

Partial solution two
------------------------

1) Add a column to the table with the formulae:

=EnteroInf(ÍndiceDeFilas()/<rows per page>)

Where <rows per page> is a constant (may be a variable)
with the number of rows desired by page.

The above is for the spanish version. I'm not sure
about the funcion names in the english version, but
could be something like this:

=Floor(RowsIndex()/<rows per page>)

2) Make a section from that column. This splits the
table in parts with the desired number of rows.

3) Set section properties to &quot;start each section on a new
page&quot;. Now you have each table part on a separate page.

4) Delete the section cell (not the section itself).
Only for format convenience.

This seems the perfect solution, but a problem arises when the table (and the new section created) is embedded in a existing section (here, the &quot;top-level section&quot;). When this occurs, if the last page of the first top-level section contains <n> rows (usually <n> < <rows per page>), then the first page of the second top-level section contains <rows per page> - <n> rows, instead of the desired <rows per page> rows.

------------------------
If anyone have better solutions, please reply!

Thak you.

P. Romero
 
A sollution could be to query a column to the DB with the page number, and then to make a section from the page number, starting each section in a new page. But the problem is that the page number information is not in the DB.

If you think this original idea of yours will do the trick, you can create a simple DB in Excel that contains your 'page number' field, and link it to the main universe DB used in your report. Then you can section on your 'page number'.
 
Can you not just set the second elements to start in relation to the first table ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top