B
BruceM
I have a report that is an index of documents, grouped by customer. The
actual documents are contained in physical binders. A new binder is started
when the previous one is full. The index needs to correspond to the
binder's contents. For instance:
Alpha Corp.
Doc1
Doc2
Bravo Corp.
Doc1
Doc2
...
Doc20
Charlie Corp.
Doc1
Doc2
...
Doc35
The page break needs to happen at Charlie Corp. To accomplish this I have
created a PageBreak table that contains the CompanyID for the companies at
which the page break occurs. I have joined this table to the report's
Recordset query. The text box txtPageBreak is bound to the Company field in
the PageBreak table. I added a manual page break brkCo to the group header.
In the group header's Format event:
Dim blnBreak As Boolean
blnBreak = Not IsNull(Me.txtPageBreak)
Me.brkCo.Visible = blnBreak
This works, except that I have set the group header's Header Repeat property
to Yes since some company's documents occupy several pages. In the example
I have given I selected Charlie Corp as the company at which a page break is
to occur. The Charlie Company listing occupies two pages, so the page break
is visible on each page, resulting in a blank page between the two Charlie
Corp. headings. If I could identify that a repeated section header is the
second instance of that header I could make it so the page break is visible
only at the first instance of the header, or something like that.
In practice there are a number of companies at each letter of the alphabet,
some with one or two documents and others with many documents. Also, the
breaks don't necessarily occur between letters of the alphabet. If the
question to me is why I didn't use grouping, my reply is that I couldn't
figure out a way other than to create a Number grouping field, and assign
the value of 10 to all of the A and B companies, and a value of 20 to all of
the companies in the next group, etc., then group on that field. Or maybe I
could have used a ranking query in some way.
actual documents are contained in physical binders. A new binder is started
when the previous one is full. The index needs to correspond to the
binder's contents. For instance:
Alpha Corp.
Doc1
Doc2
Bravo Corp.
Doc1
Doc2
...
Doc20
Charlie Corp.
Doc1
Doc2
...
Doc35
The page break needs to happen at Charlie Corp. To accomplish this I have
created a PageBreak table that contains the CompanyID for the companies at
which the page break occurs. I have joined this table to the report's
Recordset query. The text box txtPageBreak is bound to the Company field in
the PageBreak table. I added a manual page break brkCo to the group header.
In the group header's Format event:
Dim blnBreak As Boolean
blnBreak = Not IsNull(Me.txtPageBreak)
Me.brkCo.Visible = blnBreak
This works, except that I have set the group header's Header Repeat property
to Yes since some company's documents occupy several pages. In the example
I have given I selected Charlie Corp as the company at which a page break is
to occur. The Charlie Company listing occupies two pages, so the page break
is visible on each page, resulting in a blank page between the two Charlie
Corp. headings. If I could identify that a repeated section header is the
second instance of that header I could make it so the page break is visible
only at the first instance of the header, or something like that.
In practice there are a number of companies at each letter of the alphabet,
some with one or two documents and others with many documents. Also, the
breaks don't necessarily occur between letters of the alphabet. If the
question to me is why I didn't use grouping, my reply is that I couldn't
figure out a way other than to create a Number grouping field, and assign
the value of 10 to all of the A and B companies, and a value of 20 to all of
the companies in the next group, etc., then group on that field. Or maybe I
could have used a ranking query in some way.