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.
If all you want is for WF to show the report and not a screen showing no records e.g. No HTML Output NUMBER OF RECORDS IN TABLE= 0 LINES= 0, then you can SET EMPTYREPORT = ON.
This will ensure that the report is always shown but if you have no output for your report then the report will just be blank with column headings (and not show your suggestion of 0 under the COUNT column heading)!
The common method of achieving an empty report scenario is to issue a -RUN after your report and then check the value of &LINES. If the value is zero then redirect the code stream to an HTMLFORM that displays a report stating that the selection criteria produced no records. If the report has data to be shown then just show the report as usual -
-*SET EMPTYREPORT = ON
TABLE FILE CAR
WRITE CNT.MODEL
WHERE COUNTRY EQ 'CHINA'
ON TABLE PCHOLD AS MYREPORT FORMAT HTMLTABLE
END
-RUN
-IF &LINES EQ 0 THEN :NoReport;
-* If the code stream gets here then the report will be displayed
-HTMLFORM MYREPORT
-GOTO :NowExit;
-:NoReport
-HTMLFORM BEGIN
<html><head><title>Emptry Report</title></head>
<body>
The selection criteria produced no data for the report
</body></html>
-HTMLFORM END
-:NowExit
Of course you can go one step further and check for &FOCERRNUM being non zero and redirect to an HTMLFORM showing that the code had errors within it as well, but I'll leave you to work that one out .
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