Advanced table generation

  • Thread starter Thread starter jim
  • Start date Start date
J

jim

Word Gurus,

A customer of mine requires that database reports are provided in Word
format. My database extract program successfully creates a HTML file
that is imported into Word. Tables look just fine; header lines are
repeated as expected. Here's the problem:

My extract program removes repeated cell values to enhance
readability. For example ...

ColumnA ColumnB ColumnC
-----------------------
A1 B1 C1
A2 B2 C2
B3 C3
C4
A3 B5 C5
B6 C6

As I approach the bottom of a page, a group may be split across two
pages. This acceptable, however, the repeating cell values from the
previous page are not displayed. For example ...

ColumnA ColumnB ColumnC
-----------------------
A1 B1 C1
A2 B2 C2
B3 C3
== page break ==
C4
A3 B5 C5
B6 C6

I need to have the repeating cell values displayed on the next page.

Stuff I've tried/tought of ...

* Thought of: Line counting in the extract program -- can't be used
because some of the values (key or non-key) may be multi-line because
of wrapping in Word.

* Thought of: Conditionally printing a key value. I tried using an IF
field to compare PAGE with a bookmark value. I'm probably doing
something wrong here.

Suggestions would be nice.
 
For each table in the document, check each cell in column 1: for each cell,
store the page number (use the Information() function) and the cell
contents. For each successive column 1 cell, if you're on a new page and the
cell is empty, insert the contents of the previous.
 
Back
Top