I am storing some data in file.There is one column(linenum) in hold file. I want to show data in subhead when linenum>0.but it is ignoring this condition and displaying data for linenum=0 as well.
Can anyone tell me what is the best way to put when condition in subhead section in webfocus 8.Because this same query is working fine in webfocus 7.6.4
WebFOCUS 8 Windows, Excel, CSV, PDF
December 22, 2014, 02:10 AM
Ram Prasad E
Harish,
Below code works fine in WF 8. You may need to check the format of linenum. Is it alpha or numeric?
Total sales for France is zero. So no subhead for France.
TABLE FILE CAR
SUM
COMPUTE TOTSALES/D20=SALES; NOPRINT
BY COUNTRY
PRINT
CAR
SALES
TOTSALES NOPRINT
BY COUNTRY
ON COUNTRY SUBHEAD
"</1 SUBHEAD FOR <COUNTRY </1"
WHEN TOTSALES GT 0 ;
ON COUNTRY SUBFOOT
"</1"
END
Thanks, RamThis message has been edited. Last edited by: Ram Prasad E,
Linenum field is coming from another fex file we are including this field in this fex file .we are holding this Linenum value in Hold file like --(ON TABLE HOLD AS SA_OPNBL3 FORMAT ALPHA).can you tell how this can be resolved.
TABLE FILE SA_OPNBL3 PRINT OPENNING_BALANCE NOPRINT TRANSACTION_DATE NOPRINT RUNNING_AMT NOPRINT COMPUTE RUN_TOTAL/D23.2 = IF EOD_ACCOUNT EQ LAST EOD_ACCOUNT AND OPERATING_UNIT EQ LAST OPERATING_UNIT AND GAAP EQ LAST GAAP AND OU_COUNTERPARTY EQ LAST OU_COUNTERPARTY AND CURRENCY EQ LAST CURRENCY THEN RUN_TOTAL + RUNNING_AMT ELSE RUNNING_AMT; NOPRINT COMPUTE CURRENCY_TOTAL/D23.2 = RUN_TOTAL + OPENNING_BALANCE; NOPRINT BY PROCESSING_CNTR NOPRINT BY CONTROL_UNIT NOPRINT -*BY OPERATING_UNIT NOPRINT BY OPERATING_UNIT NOPRINT &PGBRK_UNIT.EVAL BY EOD_ACCOUNT NOPRINT BY GAAP NOPRINT BY OU_COUNTERPARTY NOPRINT -*BY CURRENCY NOPRINT PAGE-BREAK BY CURRENCY NOPRINT &PGBRK_CURR.EVAL BY TRANSACTION_DATE NOPRINT BY P_TRANSACTION_ID NOPRINT ON P_TRANSACTION_ID SUBHEAD " WHEN LINE_NUM NE 0;
-In this LINE_NUM is coming from another file and we are including that file in this fex file.But this same code is working fine in Webfocus 7.6.4 but not working in webfocus 8.
WebFOCUS 8 Windows, Excel, CSV, PDF
December 22, 2014, 07:12 AM
Harish
sorry .the code is
TABLE FILE SA_OPNBL3 PRINT OPENNING_BALANCE NOPRINT TRANSACTION_DATE NOPRINT RUNNING_AMT NOPRINT COMPUTE RUN_TOTAL/D23.2 = IF EOD_ACCOUNT EQ LAST EOD_ACCOUNT AND OPERATING_UNIT EQ LAST OPERATING_UNIT AND GAAP EQ LAST GAAP AND OU_COUNTERPARTY EQ LAST OU_COUNTERPARTY AND CURRENCY EQ LAST CURRENCY THEN RUN_TOTAL + RUNNING_AMT ELSE RUNNING_AMT; NOPRINT COMPUTE CURRENCY_TOTAL/D23.2 = RUN_TOTAL + OPENNING_BALANCE; NOPRINT BY PROCESSING_CNTR NOPRINT BY CONTROL_UNIT NOPRINT -*BY OPERATING_UNIT NOPRINT BY OPERATING_UNIT NOPRINT &PGBRK_UNIT.EVAL BY EOD_ACCOUNT NOPRINT BY GAAP NOPRINT BY OU_COUNTERPARTY NOPRINT -*BY CURRENCY NOPRINT PAGE-BREAK BY CURRENCY NOPRINT &PGBRK_CURR.EVAL BY TRANSACTION_DATE NOPRINT BY P_TRANSACTION_ID NOPRINT ON P_TRANSACTION_ID SUBHEAD " WHEN LINE_NUM NE 0;
WebFOCUS 8 Windows, Excel, CSV, PDF
December 22, 2014, 07:15 AM
Harish
AFTER SUBHEAD AND BEFORE WHEN LINE_NUM NE 0
THIS LINE IS THEIR
WebFOCUS 8 Windows, Excel, CSV, PDF
December 22, 2014, 07:17 AM
Harish
I don't know why that line is not copying here. I that line we are printing all the values mentioned in print command +Line_Num as well.
Actually thing is that line_num is packed decimal datatype.So that's why it's not working.Can u tell me how i can convert this to alpha numeric datatype and where i need to do code changes for that.?