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] Display message for empty records

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Display message for empty records
 Login/Join
 
Silver Member
posted
Hi All,

This is the my main procedure and I want to display the message in case of no records
"No records are there",

I tried using SET EMPTYREPORT = ANSI (or ON) , but displaying the column names and value as 0.

I need to display message instead of this.

ENGINE DB2 SET DEFAULT_CONNECTION CNAME
-SET ECHO = ALL;
SET EMPTYREPORT = ANSI
SET ASNAMES = ON
SET SQUEEZE=ON
-DEFAULT &FROM_DATE='07/21/2015';
-DEFAULT &TO_DATE='08/21/2015';
SQL DB2 EX SYSPROC.TEST('&FROM_DATE','&TO_DATE')@
;
TABLE FILE SQLOUT
SUM CNT.CUST_ACCT
BY CUST_ACCT
ENDSTYLE
END

ENGINE DB2 SET DEFAULT_CONNECTION CNAME
-SET ECHO = ALL;
SET EMPTYREPORT = ANSI
SET ASNAMES = ON
SET SQUEEZE=ON
SQL DB2 EX SYSPROC.Q9WEBSP('&FROM_DATE','&TO_DATE')@
;
TABLE FILE SQLOUT
SUM CNT.STOP_PYMT_CHANNEL AS COUNT
COMPUTE TOTCNTSEATS/I5=LAST TOTCNTSEATS + CNT.STOP_PYMT_CHANNEL; NOPRINT
BY STOP_PYMT_CHANNEL AS 'STOP PAYMENT CHANNEL'
ENDSTYLE
END

Can anyone please suggest.

Thanks ,
User1

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8
Windows, All Outputs
 
Posts: 37 | Registered: September 05, 2015Report This Post
Master
posted Hide Post
quote:
Can anyone please suggest.

Yes...
...get educated. Do a WF training.



SET EMPTYREPORT = ON
will show the report even with no results.

I think your problem is that the SQL returns no results. Therefor SQLOUT doesn't exist. And the report fails.

You should either first check the number of rows returned by the SQL and/or check the existence of the SQLOUT hold.


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Expert
posted Hide Post
Have you verified that there are no errors ?


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
Expert
posted Hide Post
Fast on the response Dave.....


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
Silver Member
posted Hide Post
HI,

Thanks for this.

SQLOUT is empty.

How do I check the resultset.

Can u please guide

Thanks,
User1


WebFOCUS 8
Windows, All Outputs
 
Posts: 37 | Registered: September 05, 2015Report This Post
Expert
posted Hide Post
Hi User1,

So a search for &LINES or &RECORDS and empty report.

There are many in the forum


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
Silver Member
posted Hide Post
Hi ,
As per the suggestion, I have tried below code,
but still showing the record count as 0.



ENGINE DB2 SET DEFAULT_CONNECTION CNAME
-SET ECHO = ALL;
SET ASNAMES = ON
SET SQUEEZE=ON
SET EMPTYREPORT = ANSI

SQL DB2 EX SYSPROC.TEST('&STOPPED_FROM_DATE','&STOPPED_TO_DATE')@
;
TABLE FILE SQLOUT
SUM CNT.CUST_ACCT_NO AS COUNT
COMPUTE TOTCNTSEATS/I5=LAST TOTCNTSEATS + CNT.CUST_ACCT_NO; NOPRINT
BY CUST_ACCT_NO AS 'CUSTOMER ACCOUNT'
HEADING
" COUNT BY ACCOUNT"
FOOTING
"TOTAL COUNT= ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
-*ON TABLE PCHOLD FORMAT &WFFMT.(Inline,Excel).output.
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
-*ON TABLE PCHOLD FORMAT HTML
ON TABLE HOLD AS MYREPORT
ON TABLE SET HTMLCSS ON

ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/STP/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END



-IF &LINES EQ 0 THEN GOTO NORECS ELSE GOTO DOREPORT;
-NORECS
-TYPE +---------------------------------------------+
-TYPE | No records have been returned for this |
-TYPE | request. Please try again later or with |
-TYPE | different criteria. |
-TYPE +---------------------------------------------+
-GOTO ENDIF
-************************************DO report


-DOREPORT
TABLE FILE MYREPORT
PRINT *
END
-ENDIF


Thanks,
Usre1


WebFOCUS 8
Windows, All Outputs
 
Posts: 37 | Registered: September 05, 2015Report This Post
Silver Member
posted Hide Post
Hi,

And apllied the drill down on ACC_NO.

If I hold the result in a file then there is no hyperlink on ACC_NO.

Thanks,
User1


WebFOCUS 8
Windows, All Outputs
 
Posts: 37 | Registered: September 05, 2015Report This Post
Virtuoso
posted Hide Post
User1,

What is your location? Please update.
How much training did you get?


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
Silver Member
posted Hide Post
Hi,

I am located in India.

I didn't get any training on reporting.

The drill down code is also there on acc no, that i didnt mentioned in above code.

With the above code with correct values I got the output but for no values not able to display error message.

Thanks,
User1

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


WebFOCUS 8
Windows, All Outputs
 
Posts: 37 | Registered: September 05, 2015Report This Post
Virtuoso
posted Hide Post
Put a -RUN after the END statement of your report query. Otherwise &LINES will be zero.


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report This Post
Master
posted Hide Post
quote:
-IF &LINES EQ 0 THEN GOTO NORECS ELSE GOTO DOREPORT;


After this, use a -INCLUDE for another fex instead of writing it out for each of your reports. Lot easier on the next guy that has to change the wording across all reporting.



- FOCUS Man, just FOCUS!
-----------------------------
Product: WebFOCUS
Version: 8.1.04
Server: Windows 2008 Server
 
Posts: 578 | Registered: October 01, 2014Report This Post
Expert
posted Hide Post
Hi User1,

I would strongly suggest that you source some basic training.

And also please use the search functionality in the forum, there is much to learn.


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
Silver Member
posted Hide Post
HI,

Thanks you all ..!!!!

Able to display the error message.

Thanks,
user1


WebFOCUS 8
Windows, All Outputs
 
Posts: 37 | Registered: September 05, 2015Report 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] Display message for empty records

Copyright © 1996-2020 Information Builders