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     HI i have some Problem with &retcode

Read-Only Read-Only Topic
Go
Search
Notify
Tools
HI i have some Problem with &retcode
 Login/Join
 
Platinum Member
posted
Hi ALL
iam working on Graphs with filters
for some filters it shows NO DATA
i want to customise this nodata
i have some idea on &RETCODE but how it works
and where i need to use thids to customize my Procedure.please give me a solution for this problem.

Thanks
 
Posts: 155 | Location: Bangalore. | Registered: January 24, 2006Report This Post
Expert
posted Hide Post
If, by NO DATA, you mean that the report has no records to be displayed (as opposed to NULLS) then use &LINES or &RECORDS together with SET EMPTYREPORT = ON to intercept that empty report.

&RECORDS is populated with the number of records returned by the query.
&LINES is populated with the number of lines of output resulting from your BY and verb clause combination. e.g. If you use PRINT field BY another_field then &RECORDS and &LINES will probably be the same, but if you use SUM field BY another_field then &RECORDS will be greater than &LINES.

After your GRAPH or TABLE check the value of &LINES and, when zero, redirect the output to give an empty report on the users terminal. Something like -
GRAPH FILE CAR
SUM RCOST
BY COUNTRY
WHERE COUNTRY EQ 'INDIA'
ON GRAPH SET GRAPHEDIT OFF
ON GRAPH SET BARNUMB OFF
ON GRAPH SET 3D OFF
ON GRAPH SET VZERO OFF
ON GRAPH SET GRID ON
ON GRAPH SET GRMERGE ON
ON GRAPH SET GRAPHSTYLE *
setGraphType (17);
ENDSTYLE
END
-RUN

-IF &LINES GT 0 THEN :ShowReport;
-HTMLFORM BEGIN
<html><head><title>Empty Report</title></head>
<body>
<h1>Your report returned no results
</body></html>
-HTMLFORM END
-EXIT

-:ShowReport


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, 2004Report This Post
Platinum Member
posted Hide Post
Hi Tony
Thanks for Your Quick Reply.

This message has been edited. Last edited by: kalyanswarna,
 
Posts: 155 | Location: Bangalore. | Registered: January 24, 2006Report This Post
<JG>
posted
The easiest way to keep your size is to create an image that contains the NO DATA message.
If you create it with the same size attributes as the graph output that solves your problem.
 
Report This Post
Expert
posted Hide Post
I agree with JG and it is the method I normally use for a graph when saved as a gif. I keep a copy of a few gifs with both axis', no lines or bars and the words "The request produced no data" plastered across the centre.

I also keep one with "Corrupt file" as the text and this is used when the gif created can not be opened with an image viewer (unrecognised format). To identify when this occurs I read the first 6 characters of the gif file and check for it being equal to "GIF89a" (if I remember correctly). If it isn't that or the &IORETUN is not 0 (no file to be read) then I use the bad image gif.

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, 2004Report 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     HI i have some Problem with &retcode

Copyright © 1996-2020 Information Builders