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 trying to work on a report where the field should be hidden if the field has no value to be displayed. Is there any way in WF by which i can achieve this. ThnxThis message has been edited. Last edited by: Kerry,
First query what you want to query and HOLD it. Then query that hold checking on conditions for display or not. Check the output and fill a parameter accordingly Query the hold again for user output..
CAR sample:
TABLE FILE CAR
SUM SALES
CNT.MODEL AS MODELS
BY COUNTRY
WHERE COUNTRY EQ 'FRANCE'
ON TABLE HOLD AS H01 FORMAT FOCUS
END
TABLE FILE H01
SUM SALES
BY COUNTRY
WHERE SALES GT 0;
ON TABLE HOLD AS H02 FORMAT FOCUS
END
-RUN
-SET &SHOW_IT = IF &LINES EQ 0 THEN 'NOPRINT' ELSE '';
TABLE FILE H01
PRINT SALES &SHOW_IT
MODELS
BY COUNTRY
ON TABLE PCHOLD FORMAT HTML
END
In the first query country FRANCE is selected. SALES is not shown. Change it to JAPAN and SALES will be shown.
G'luck, Dave
_____________________ WF: 8.0.0.9 > going 8.2.0.5
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010
You could also achieve this in one pass of the data. However, you wil need to be very sure of the impending output to ensure that your "hidden" column performs as you would wish -
SET NODATA = ''
-DEFAULT &Model = 'V12XKE AUTO'
DEFINE FILE CAR
TRANSCOL/D12 MISSING ON = IF SEATS GT 2 THEN SEATS ELSE MISSING;
TRANSHDR/A6 MISSING ON = IF SEATS GT 2 THEN 'Seats' ELSE MISSING;
END
TABLE FILE CAR
SUM TRANSCOL AS ''
RCOST AS ''
DCOST AS ''
BY COUNTRY AS ''
BY CAR AS ''
BY MODEL AS ''
WHERE MODEL EQ '&Model'
HEADING
"Country<+0>Manufacturer<+0>Model<TRANSHDR>Retail Cost<+0>Dealer Cost"
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
GRID=OFF, SIZE=9, $
TYPE=HEADING, HEADALIGN=BODY, $
ENDSTYLE
END
This restricts the data to such an extent that I kno only on row will be reported and that the column will be "hidden", howver, if I resticted it by CAR EQ 'JAGUAR' then the hidden row would not be relevant to all the reported rows.
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Thank you all for the responses. I wil try each of those options. Butcan anybdy point what is wrong with code i have written ================================================ DEFINE FILE XYZ TITLE/A30=IF TITLE_DESC NE'' THEN 'TITLE DESCRIPTION' END -IF TITLE_DESC EQ '' THEN GOTO NODISPLY; TABLE XYZ BY TITLE AS '' BY TITLE_DESC AS '' ON TABLE HOLD FORMAT PDF
then styling
ENDSTYLE END -RUN -NODISPLY ================================================ Each field displays only one value and report is PDF Free form report. Please help me with dis code as to i donno wat is wrong with dis code..This message has been edited. Last edited by: Zak,
TITE_DESC is a field within your file and is therefore not known to dialogue manager (-IF TITLE_DESC ....).
You are not alone in making this new user assumption and you will not be the last, however it will benefit you understanding about dialogue manager and how it is used and executed.
T
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Sounds like you not only what to not display a colomn, but an entire table?
TABLE FILE ******
ON TABLE HOLD AS H01 FORMAT FOCUS
END
-RUN
-IF &LINES EQ 0 THEN GOTO NODISPLY
TABLE FILE H01
SUM / PRINT
BY / ACROSS
...
...
END
-NODISPLY
?
_____________________ WF: 8.0.0.9 > going 8.2.0.5
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010
Lemme explain wat exactly i m looking for... i have table to displayed in which i hav to customise few fields in such a way that dey shud not be displayed when those fields hav no data in it. If the fields hav data only den those fields shud be displayed. I have jus a posted a piece of the code taking a field as example.
Report looks smthng like dis..
ACCOUNT : 123 TITLE : ENGINEER TITLE DESCRIPTION : MECHANICAL TYPE : CONTACT NUMBER : ----------------------------------------------------- In above report 2 of the fields doesnot have data thus those FILEDS should NOT be displayed in my report. Only ACCOUNT, TITLE, TITLE DESCRIPTION SHOULD BE DISPLAYED.This message has been edited. Last edited by: Zak,
You did not tell FOCUS what to do if the TITLE_DESC is blank... but if you do not define an else case, it will hold the value from the previous record. Also be tidy, end each defined field with a ; This only works because the define statement is the last one before the end.
DEFINE FILE XYZ TITLE/A30=IF TITLE_DESC NE'' THEN 'TITLE DESCRIPTION' ELSE ' '; END Additionally if you do not want any of the record to appear if the title is blank add the if statement
TABLE XYZ BY TITLE AS '' BY TITLE_DESC AS '' IF TITLE_DESC NE ' ' ON TABLE HOLD FORMAT PDF
then styling
ENDSTYLE END -RUN -NODISPLY[/quote]
Posts: 17 | Location: Colorado, USA | Registered: January 22, 2010