November 27, 2007, 09:45 AM
Tom BrittnacherPrarie, I did some research on compound reports, not sure if that would help me out.
Darin Lee, I tried FOLD-LINE, but that seems to only be for PDF. I also tried SUBHEAD, but I want the master record to have column headings, and be in distinct columns so it can be exported to Excel.
The data I am working with has monetary transaction records, and there could be one or more comments attached to each record, typically 2 comments at least.
So...
ACCOUNTNUMBER POSTDATE AMOUNT
12345 11/26/2007 25.00
user123 11/27/2007 this is my comment
user123 11/27/2007 this is another comment
November 27, 2007, 10:12 AM
jgelonaWhen you analyze the question, this is just basic FOCUS. You have a file with a parent records (master) and child records (detail). You don't say what the data source is, but it should be irrelevant if you have properly described the data in your .mas file. Consider the following master. Now this is a flat file, but you can do the same thing with a FOCUS data base or relational tables. HREC is the Header and is identified with 'H' in column 1. DREC is the Detail and identified with 'D' in column 1. This master has the relationship you described. For every header, there can be 0 to many detail rows.
FILE=FMFCEXT ,SUFFIX=FIX
$
$ Financial Management Foster Care Extracts
$
SEGNAME=HREC,$
FIELD=RECTYPE , ALIAS=H, A1 , A1 , $
FIELD=RPT_DATE , , MYY , A6 , $
FIELD=RSRC_NAME , , A30 , A30 , $
FIELD=CONTRACT_NO , , A6 , A6 , $
FIELD=COUNTY_ID , , A2 , A2 , $
FIELD=ADDRVER , , A1 , A1 , $
FIELD=ADDRESS , , A40 , A40 , $
FIELD=CITY , , A13 , A13 , $
FIELD=STATE , , A2 , A2 , $
FIELD=ZIP , , A10 , A10 , $
FIELD=ADFILLER , , A19 , A19 , $
FIELD=RSRC_SSN , , A9 , A9 , $
FIELD=SUPL_SW , , A1 , A1 , $
FIELD=APPROVED_BY , , A10 , A10 , $
FIELD=H1FILL , , A7 , A7 , $
FIELD=RSRC_ID , , A8 , A8 , $
FIELD=CHECK_SEQ , , A5 , A5 , $
FIELD=H2FILL , , A30 , A30 , $
SEGNAME=DREC,PARENT=HREC,$
FIELD=RECTYPE , ALIAS=D, A1 , A1 , $
FIELD=CASE_ID , , A10 , A10 , $
FIELD=PERS_NO , , I3 , A3 , $
FIELD=CMD_CASE_ID , , A7 , A7 , $
FIELD=CMD_PERS_NO , , I3 , A3 , $
FIELD=CARE_TYPE , , A2 , A2 , $
FIELD=UNIT_CODE , , A2 , A2 , $
FIELD=CLIENT_LNM , , A12 , A12 , $
FIELD=CLIENT_FNM , , A7 , A7 , $
FIELD=CLIENT_MNM , , A1 , A1 , $
FIELD=CLIENT_BDT , , YYMD, A8 , $
FIELD=CLIENT_SSN , , A9 , A9 , $
FIELD=BEGIN_DAY , , I2 , A2 , $
FIELD=END_DAY , , I2 , A2 , $
FIELD=TOTAL_DAYS , , I2 , A2 , $
FIELD=PAY_RATE , , I5 , A5 , $
FIELD=CLAIM_AMT , , I7 , A7 , $
FIELD=ADJ_SW , , A1 , A1 , $
FIELD=ADJ_DT , , MYY , A6 , $
FIELD=DFILL1 , , A35 , A35 , $
FIELD=IVESTS , , A2 , A2 , $
FIELD=LICENSED , , A1 , A1 , $
FIELD=DCN , , A9 , A9 , $
FIELD=DFILL2 , , A63 , A63 , $
Your basic fex will look something like this:
TABLE FILE FMFCEXT
PRINT CLIENT_SSN TOTAL_DAYS PAY_RATE CLAIM_AMT
BY RSRC_ID NOPRPINT
BY CHECK_SEQ NOPRINT NOSPLIT
ON CHECK_SEQ SUBHEAD
"<RSRC_NAME>"
"<ADDRESS>"
"<CITY <STATE> <ZIP></1>"
ON TABLE SET ALL ON
END
Once this is working, then you can add other fields, formatting, etc.