Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [solved] - Verifing that data was retrieved

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[solved] - Verifing that data was retrieved
 Login/Join
 
Guru
posted
What is the best way to test for data being retrieved so that if there isn't any data I can display a screen saying that there isn't any data instead of the response that looks like an error.

This message has been edited. Last edited by: Jay Potter,


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
Virtuoso
posted Hide Post
Jay,

At the end of the report, after the END statement, you can add a test on the variable &RECORDS. Something like this:
  
...
END
-RUN
-IF &RECORDS GT 0 GOTO #DONE;
-HTMLFORM BEGIN
No records retrieved
-HTMLFORM END
-#DONE


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Expert
posted Hide Post
I would suggest using &LINEs and not &RECORDS, as the &RECORDS indicates the number retrieved, and &LINES the number after sorting aggregation and WHERE TOTAL tests.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Unless your HOLDing your data before attempting to produce a report, also make sure EMPTYREPORT is set to OFF for your control logic on &LINES to kick in appropriately. EMPTYREPORT ON/ANSI does force the creation of report output so by the time you're evaluating &LINES it may be too late for your NO DATA message to be displayed (this is most likely to happen in PDF output).



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Report This Post
Gold member
posted Hide Post
You can display the error message with appropriate details for your selected input parameters as below:

  
.
.
.
-*After the end of report
-IF &LINES EQ 0 THEN GOTO NODATA;
-ELSE GOTO THEEND;

-NODATA
-SET &ERRMSG1 = 'There is no data retrieved for your given parameters.';
-SET &ERRMSG2 = 'Input 1:' | &ip1;
-SET &ERRMSG3 = 'Input 2:' | &ip2;

-GOTO ERRORMSG

-ERRORMSG

-HTMLFORM BEGIN
<HTML>
<BODY>
<P> &ERRMSG1 </P>
<P> &ERRMSG2 </P>
<P> &ERRMSG3 </P>
</BODY>
</HTML>
-HTMLFORM END

-THEEND
END

This message has been edited. Last edited by: SriAravind,


WebFocus Version 7.7.05
Windows, HTML/PDF/EXL2K/AHTML
 
Posts: 63 | Registered: January 12, 2011Report This Post
Guru
posted Hide Post
Thank you for all of the suggestions. I went with the &LINES suggestion. I then display a report with our company header and a line indicating that no information was pulled.


WebFocus 8.1.5
iSeries/Windows
DB2/SQL/Access
Dev Studio
App Studio
Maintain
ReportCaster
 
Posts: 341 | Location: Pembroke NH/Jericho NY | Registered: June 15, 2011Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [solved] - Verifing that data was retrieved

Copyright © 1996-2020 Information Builders