Each time you do EXFMT, the entire record format is wiped out and re-drawn, so the column headings are definitely re-done.
Here's an example that works for me... display file named COLHDGD:
Code: Select all
A R SFL SFL
A QPUI000001 1A O 2 2
A NUM 5S 0H
A TEXT 1000A H
A R QSFLCTL001 SFLCTL(SFL)
A SFLSIZ(0001)
A SFLPAG(0001)
A SFLDSP
A 1 2HTML('QPUISFLCTL')
A R CTL
A 1 2HTML('QPUICTL1 SFL 5 RS-
A FLDSP 0 RSFLDSPCTL 0 RSF-
A LCLR 0 FCLEARSFL RSFLPAG -
A 1 C1 5 RSFLSIZ 1 C1 -
A 6 0 0 ')
A 1 2HTML('{"screen":{"record format nam-
A e":"ctl"},"items":[{"id":"Grid1","f-
A ield type":"grid","css class":"blue-
A print-grid","left":"35px","top":"90-
A px","number of rows":"6","number of-
A columns":"2","column widths":"100,-
A 386","column headings":{"fieldName"-
A :"ColumnHead","dataLength":"500","t-
A rimLeading":"false","trimTrailing":-
A "true","blankFill":"false","rjZeroF-
A ill":"false","dataType":"char","for-
A matting":"Text","textTransform":"no-
A ne"},"header height":"35","row heig-
A ht":"35","height":"210px","width":"-
A 487px","css class 2":"blueprint-def-
A aults","visibility":"visible","bord-
A er color":"transparent","record for-
A mat name":"sfl","clear subfile":{"f-
A ieldName":"ClearSFL","customTrue":"-
A ","customFalse":"","dataType":"indi-
A cator","formatting":"Indicator","in-
A dFormat":"true / false"}},{"id":"Ou-
A tputField1","field type":"output fi-
A eld","css class":"outputField","val-
A ue":{"fieldName":"num","dataLength"-
A :"5","decPos":"0","numSep":"false",-
A "zeroBalance":"false","numBlankFill-
A ":"false","zeroFill":"false","noExt-
A raSpaces":"false","curSym":"","data-
A Type":"zoned","formatting":"Number"-
A ,"negNum":"-999.00","units":"","des-
A ignValue":"[num]"},"left":"0%","top-
A ":"5px","css class 2":"blueprint-de-
A faults","css class 3":"blueprint-ou-
A tput-field","width":"100%","grid":"-
A Grid1","column":"0"},{"id":"OutputF-
A ield2","field type":"output field",-
A "css class":"outputField","value":{-
A "fieldName":"text","dataLength":"10-
A 00","trimLeading":"false","trimTrai-
A ling":"true","blankFill":"false","r-
A jZeroFill":"false","dataType":"char-
A ","formatting":"Text","textTransfor-
A m":"none","designValue":"[text]"},"-
A left":"0%","top":"5px","css class 2-
A ":"blueprint-defaults","css class 3-
A ":"blueprint-output-field","width":-
A "100%","grid":"Grid1","column":"1"}-
A ]}')
A CLEARSFL 1A H
A COLUMNHEAD 500A H
RPG program that runs the display is named COLHDGR:
Code: Select all
**free
ctl-opt dftactgrp(*no) option(*srcstmt:*nodebugio);
dcl-f colhdgd workstn handler('PROFOUNDUI(HANDLER)')
sfile(SFL:RRN);
dcl-s RRN packed(4: 0);
ClearSFL = *on;
write CTL;
ClearSFL = *off;
RRN = 0;
ColumnHead = 'Count,Fruit Name';
writeRow( 25: 'Apples');
writeRow( 19: 'Oranges');
writeRow( 12: 'Bananas');
exfmt ctl;
ClearSFL = *on;
write CTL;
ClearSFL = *off;
RRN = 0;
ColumnHead = 'Qty,Product';
writeRow( 15: 'Rich Display Licenses');
writeRow( 20: 'Genie Licenses');
writeRow( 6: 'Profound.js Licenses');
exfmt ctl;
*inlr = *on;
dcl-proc writeRow;
dcl-pi *n;
n packed(5: 0) const;
t char(1000) const;
end-pi;
RRN += 1;
num = n;
text = t;
write SFL;
end-proc;
When I run it, it looks like this:
- firsthdg.png (7.51 KiB) Viewed 902 times
After hitting enter, it changes the column headings and looks like this:
- secondhdg.png (10.16 KiB) Viewed 902 times
Please tell me what I should change to experience the same problem you're having.