Page Break on 1st Character of Field

shaggy

Registered User.
Local time
Today, 05:14
Joined
Sep 9, 2002
Messages
41
I have a field in a report that represents a geographic area. The first character represents a large area and each succesive character narrows the area represented.

How can I force a page-break based on a change in only the first character of the field.

Here's an example

601-0530
602-0760
611-2310
<page break>
723-2190
725-1510
<page break>
818-0930

I was able to create a new field using Left$([FIELDNAME],1) which has the character i need to break on.

Any help would be appreciated
 
Last edited:
I create an expr1 field in the query using LEFT$([FIELDNAME],1) which has only the 1st character of the original field.

I then create an expr1 header in the report with the properties groupe header Yes, and keep together Whole Group.

I got this to work on one report, but can't seem to get it to on any others.
 
Sounds like you're on the right track Shaggy.

In your query, you most likely created a new column listing the first character in the field. This is done in SQL like "criteria AS newcolumn_name" OR in design view by selecting a blank column and typing (in your case) FIELDNAME_CHAR: LEFT$([FIELDNAME],1) Verify that you have a column called FIELDNAME_CHAR with the expected data.

Now when you are creating your report, select the sorting and grouping button - under "Field/Expression", select your newly created column (FIELDNAME_CHAR) and click yes to "GroupHeader" (even if you don't need anything to appear you can always leave no space in that section).

Your options now are to either place a page break in that section OR select the "FIELDNAME_CHAR header" section - click properties - Force New Page.

Hope that helps!
-Sean
 
Thanks Sean, that worked.

The only thing I forgot was the Force New Page property.

- Kevin
 

Users who are viewing this thread

Back
Top Bottom