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.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I have created several defines in my fex the openbalance and closing defines, the user wants to see just totals when it breaks on the transaction type(TT) and on the accountno is this possible/ and is so how ?
DEFINE FILE WF_GL_DETAIL_VIEW ADD Debits/D15.2=IF PERIOD EQ 10 AND FISCAL_YEAR EQ 2009 AND TRANSAMNT GE 0 THEN TRANSAMNT ELSE 0; Credits/D15.2=IF PERIOD EQ 10 AND FISCAL_YEAR EQ 2009 AND TRANSAMNT LT 0 THEN TRANSAMNT ELSE 0; OPENBALANCE/D17.2=IF PERIOD LT 10 AND FISCAL_YEAR EQ 2009 AND TRANSAMNT NE -0 THEN TRANSAMNT ELSE 0; TRANQTY/D15.2=IF PERIOD EQ 10 AND FISCAL_YEAR EQ 2009 AND TRANSQTY NE -0 THEN TRANSQTY ELSE 0; TRANDT/MDYY=IF PERIOD EQ 10 AND FISCAL_YEAR EQ 2009 THEN WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.TRANSDATE; REF/A20=IF PERIOD EQ 10 AND FISCAL_YEAR EQ 2009 THEN REFERENCENO; CLOSING/D17.2=OPENBALANCE + Credits + Debits; END TABLE FILE WF_GL_DETAIL_VIEW SUM 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.TRANQTY' AS 'Qty' 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.Debits' AS 'Debit' 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.Credits' AS 'Credit' 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.OPENBALANCE' AS 'Opening Bal' 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.CLOSING' AS 'Closing Bal' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.CENTER' NOPRINT AS 'Ctr' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.ACCOUNTNO' AS 'Account,Number' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.ACCOUNTNAME' AS 'Description' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.TRANSTYPE' AS 'TT' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.TRANDT' AS 'Transdate' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.REF' AS 'Reference,Number' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.PERIOD' NOPRINT AS 'Per,' PRINT 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.COMMENT_TEXT' AS 'COMMENT' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.CENTER' NOPRINT AS 'Ctr' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.ACCOUNTNO' AS 'Account,Number' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.ACCOUNTNAME' AS 'Description' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.TRANSTYPE' AS 'TT' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.TRANDT' AS 'Transdate' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.REF' AS 'Reference,Number' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.PERIOD' NOPRINT AS 'Per,'
ON WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.CENTER SUBTOTAL AS '*Total For Center'
ON WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.ACCOUNTNO SUBTOTAL AS '*Total For Account'
ON WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.TRANSTYPE SUBTOTAL AS '*Total For TT' HEADING "&DATEtMDYY <+0> &TOD" "P C C S T R U C T U R A L S, I N C." "Cost Center Ranges : Detail Financial Report" "By Cost Center, Acct Number, Trans Type and Transaction Date" "For Period &PERIOD.Period:. Fiscal Year &FISCALYEAR.Fiscal Year:." " " WHERE ( WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.PERIOD LE &PERIOD ) AND ( WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.FISCAL_YEAR EQ &FISCALYEAR ) AND ( WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.PLANT GE '&PLANT1.Plant GE: Plant Is 2 Digits.' ) AND ( WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.PLANT LE '&PLANT2.Plant LE: Plant Is 2 Digits.' ); ON TABLE SET PAGE-NUM ON ON TABLE COLUMN-TOTAL AS '** Grand Total' ON TABLE PCHOLD FORMAT PDFThis message has been edited. Last edited by: Kerry,
It doesn't matter if the columns are defined fields or not. You can specify which columns you want to show the total for. Here is an example from the car file:
TABLE FILE CAR
PRINT SALES RCOST DCOST
BY COUNTRY
BY CAR
BY MODEL
ON CAR SUBTOTAL RETAIL_COST
ON TABLE SUBTOTAL RETAIL_COST
END
please look at my code I want to print the total for this field called "openbalance" which is a defined field, and only what it to print after the break by "accountno" the user only wants to see this total once( does not want to see the detail amounts).
calculate the opening and closing bal, and the number of detail rows, at the account level (another SUM, with NOPRINT on its dependent columns and fewer BY's). calculate the row number within its account for each detail record. Now you can identify the first and last detail line for each account break.
calculate the displayed opening balance column for the first row of the account as the account-level opening bal, and zero for all the other rows; give it a computed format, defined to print normally when it's the first row, and with 'S' suffix, so it shoots blanks, if it's any other row.
Similarly for the closing balance (to print with either the first or last detail row of the account, as you wish)
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005
I trimmed my by's to 3, I created a new define field called count_record, where do I do the define to print normally when it row one and the 'S' suffix if not row one?
DEFINE FILE WF_GL_DETAIL_VIEW ADD OPENBAL/D17.2=IF PERIOD LT &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR THEN TRANSAMNT ELSE 0; count_record/I5 = IF TRANSAMNT THEN count_record + 1 ELSE 0; Debits/D15.2=IF PERIOD = &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR AND TRANSAMNT GE 0 THEN TRANSAMNT ELSE 0; Credits/D15.2=IF PERIOD = &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR AND TRANSAMNT LT 0 THEN TRANSAMNT ELSE 0; REF/A12=IF PERIOD EQ &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR THEN REFERENCENO; COM/A12=IF PERIOD EQ &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR THEN COMMENT_TEXT; QTY/D12=IF PERIOD EQ &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR THEN TRANSQTY ELSE 0; TT/A2=IF PERIOD EQ &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR THEN TRANSTYPE; TD/MDYY=IF PERIOD EQ &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR THEN TRANSDATE;
END TABLE FILE WF_GL_DETAIL_VIEW SUM 'OPENBAL' AS 'Opening,Balance' 'COUNT_RECORD' NOPRINT BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.CENTER' NOPRINT AS 'Ctr' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.ACCOUNTNO' AS 'Account,Number' BY 'TT' BY 'TD' AS 'Transdate' PRINT 'REF' AS 'Reference,Number' 'COM' AS 'Comment' 'QTY' AS 'Qty' 'Debits' AS 'Debit' 'Credits' AS 'Credit' 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.ACCOUNTNAME' AS 'Description' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.CENTER' NOPRINT AS 'Ctr' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.ACCOUNTNO' AS 'Account,Number' BY 'TT' BY 'TD' AS 'Transdate' ON WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.CENTER SUBTOTAL AS '*Total For Center'
ON WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.ACCOUNTNO SUBTOTAL AS '*Total For Account'
I am having a problem getting the count(rownum) to work the way I would like it to work, when it hits a new accountno I want it to set the count back to zero. COMPUTE ROWNUM/I5 = IF ACCOUNTNO EQ LAST ACCOUNTNO THEN ROWNUN +1 ELSE 0;
this is the complete code:
DEFINE FILE WF_GL_DETAIL_VIEW ADD OPENBAL/D17.2=IF PERIOD LT &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR THEN TRANSAMNT ELSE 0; Debits/D15.2=IF PERIOD = &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR AND TRANSAMNT GE 0 THEN TRANSAMNT ELSE 0; Credits/D15.2=IF PERIOD = &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR AND TRANSAMNT LT 0 THEN TRANSAMNT ELSE 0; REF/A12=IF PERIOD EQ &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR THEN REFERENCENO; COM/A12=IF PERIOD EQ &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR THEN COMMENT_TEXT; QTY/D12=IF PERIOD EQ &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR THEN TRANSQTY ELSE 0; TT/A2=IF PERIOD EQ &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR THEN TRANSTYPE; TD/MDYY=IF PERIOD EQ &PERIOD AND FISCAL_YEAR EQ &FISCALYEAR THEN TRANSDATE;
END TABLE FILE WF_GL_DETAIL_VIEW SUM COMPUTE ROWNUM/I5 = IF ACCOUNTNO EQ LAST ACCOUNTNO THEN ROWNUN +1 ELSE 0; 'OPENBAL' AS 'Opening,Balance'
BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.CENTER' NOPRINT AS 'Ctr' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.ACCOUNTNO' AS 'Account,Number' BY 'TT' BY 'TD' AS 'Transdate' PRINT 'REF' AS 'Reference,Number' 'COM' AS 'Comment' 'QTY' AS 'Qty' 'Debits' AS 'Debit' 'Credits' AS 'Credit' 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.ACCOUNTNAME' AS 'Description' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.CENTER' NOPRINT AS 'Ctr' BY 'WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.ACCOUNTNO' AS 'Account,Number' BY 'TT' BY 'TD' AS 'Transdate' ON WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.CENTER SUBTOTAL AS '*Total For Center'
ON WF_GL_DETAIL_VIEW.WF_GL_DETAIL_VIEW.ACCOUNTNO SUBTOTAL AS '*Total For Account'
ON TT SUBTOTAL AS '*Total For TT' HEADING "&DATEtMDYY <+0> &TOD"
Thanks I have fixed the typo, I still have a problem on the breaks, when it breaks on the accountno I get 0 and that's what I want but with in that account it breaks on TT and that is also 0, I want to print open bal on just the break of accountno when rownum is 0 not every 0.
But the sum of the open balance is calculated for each mentioned sort field. If you would print only the open balance when the account number changes value, then you would lose all openbalances for all underlying levels. I would try and see if the desired result is achieved when you remove the by tt and by td phrases from the first request set (under the sum that is). Leave them under the print.
Hope this helps ...
GamP
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007
It is closer, I need to get the rownum at the detail level, or by pass the count "ON TT SUBTOTAL" it shows 0 at that "ON TT SUBTOTAL" level so then it prints the open bal which I don't want it to print there.