As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.
I sometimes create a sequential number using LAST in a COMPUTE to reference rows for conditions like this: SUM COMPUTE REC_SEQ/I8 = 1 + LAST REC_SEQ;NOPRINT COMPUTE ACCT_CNT_TOT/I8=TOT.ACCT_CNT; NOPRINT ACCT_CNT/I8C AS '# Accounts' COMPUTE REMAIN/I8C =IF ( REC_SEQ EQ 1 ) THEN ACCT_CNT_TOT - ACCT ELSE ( REMAIN - ACCT_CNT ); BY WF_ITEM AS 'Criteria Group'
This REQ_SEQ starts at 1 when I output to XLSX as I would expect. However, when I try to output to HTML or PDF, the counter starts at 8.
Can anyone think of why this might occur? Is there some HTML SET command that would correct this? thanks
BobThis message has been edited. Last edited by: FP Mod Chuck,
WF (App Studio) 8.2.01m / Windows Mainframe FOCUS 8
Thanks for the tip about LAST. Should have realized that as I'm not doing it elsewhere.
I just did in CAR as well and works fine. So I backed out pieces of my code to see if I could find the cause. It seems to happen when I use ON TABLE SET SUBTOTALS ABOVE I see what it's doing because of this. The COMPUTE must recognize the total row as the final row. In my example, it's the 7th row. And it's building off that even though I'm not referencing it. Removing LAST does not fix.
WF (App Studio) 8.2.01m / Windows Mainframe FOCUS 8
Should Remain be a value that is counting down per WF_ITEM? Then I would try solving this with PARTITION_AGGR. COMPUTE REMAIN/I8C = TOT.ACCT_CNT - PARTITION_AGGR(ACCT_CNT, WF_ITEM , B, C, SUM);
Otherwise do a SUM ACCT_CNT/I8C AS '# Accounts' RANKED BY WF_ITEM AS 'Criteria Group' ON TABLE HOLD FORMAT FOCUS END
and do a define on this. Then sort on RANK in your next TABLE request.