If you have a line of data that appears sometimes at page headers and sometimes not, then it's not really behaving like a page header. You could edit your detail template to also trap this line (check out using the preceding string in the advanced field properties to pick up data that appears below the first row of the detail), or you could edit the setting for forced page breaks in Monarch from the default 100 lines (up to 255 max).
Lname Fname MI CO=23 RCC= CLAIM NUMBER=XXXXXXXXXXXXXXXNCDMH EST AMT DUE=
7777777777 PAT ACCT=111111 MED REC= ATTN PROV=PW000000 1.0000
5555 AGENCY ROAD
GASTONIA NC 28054
NPI 1111111111 333
44444444 22 07/07/2009 21
Lname Fname MI 7777777777 CONTINUATION OF CLAIM DETAILS
ADSN 06012009 06012009 6.000 3 T1017 (T1017/HI) TARGETED CASE MA 11250 00 11250 00 11250 00 11250 99
DED= .00 PT LIB= .00 CO PAY= .00 TPL= .00 DIFF= .00 11250 00 11250 00 11250 00 11250
ORIGINAL BILLED AMOUNT= 112.50 ORIGINAL DETAIL COUNT= TOTAL FINANCIAL PAYERS= 1
Lname Fname MI CO=23 RCC= CLAIM NUMBER=XXXXXXXXXXXXXXNCDMH EST AMT DUE=
77777777777 PAT ACCT=1111111 MED REC= ATTN PROV=88888888B 1.0000
AMI 06122009 06122009 10.000 3 H2015 COMMUNITY SUPPORT TEAM 17260 00 17260 00 17260 00 17260 99
DED= .00 PT LIB= .00 CO PAY= .00 TPL= .00 DIFF= .00 17260 00 17260 00 17260 00 17260
ORIGINAL BILLED AMOUNT= 172.60 ORIGINAL DETAIL COUNT= TOTAL FINANCIAL PAYERS= 1
Here is a sample of the report.
My Detail Template captures the PAT ACCT # (111111) and ATTN PROV(PW000000).
Append 1 captures ASDN, 06082009, 1.000, 90862, Medication Check, 4716, 4716, 99.
Append 2 captures Lname, Fname, MI, Claim Number (XXXXXXXXXXXXX).
Header captures 16 lines beginning one line above AGENCY NAME and ending one line below MEDICAL. I tried extending this one more line to capture the next line
line containing "CONTINUATION OF CLAIM DETAILS" when it is there, but that did not work. This is the line that appears only when a record is split across the header. The line below that is my next line of detail that is missing when this happpens.
This report hasn't been an easy one to work with, esp. being my very first ! I fear I have created one huge mess. Many thanks for your help.
The most common difficulty with your first Monarch model is that you need to think "upside down". It's natural, as a human reading a report, to see the first line (working from the top of the page) you want to trap - in your case the PAT ACCT and ATTN PROV line - and to select it and build a template for it. Monarch will, by default, make that the Detail template, as every model requires one and only one Detail template.
Reading on, you then find, lower down the page, data like your ADSN line. You want to trap this as well, and so select the line, and Monarch defaults to suggesting another template type for this template: an Append template. The problem with this is that you want the ADSN line to be associated with the PAT ACCT line (detail) that appears above the ADSN line, so the Append is the wrong type of template to use. You need to either:
- keep PAT ACCT as the Detail template, and define ADSN as a Footer template, or
- Change PAT ACCT to be an Append template, and define ADSN as the Detail.
Which is the right choice will depend on the way your data repeats and what you need in your output, and I can't tell for certain from a one page sample. In general, ask yourself what you want from the report that will appear on one and only one line of the table. Do you want one row per CLAIM? One per PAT ACTT? One per ADSN? Whatever the answer, then select the template that extracts this data and define it as the Detail. For the others, if they appear above the Detail, define them as Appends, if they appear below, define them as Footers.
Once we've got that right, tweaking the Page Header will be easy.