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     Empty table with WHERE TOTAL

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Empty table with WHERE TOTAL
 Login/Join
 
Virtuoso
posted
Am I right in assuming this is a bug?

TABLE FILE CAR
SUM CNT.CAR
BY COUNTRY
WHERE TOTAL CNT.CAR EQ 0;
ON TABLE HEADING
"Zero lines, but a heading and column titles"
END


This code gives me an empty table with just a heading and column titles, but no data rows. Shouldn't I be getting the 'No HTML Output!' message instead?

I just accidentally encountered this with a table file on a relatively small set of invoice data that only prints results if the invoice total not equals zero. Getting an "empty" excel sheet from that was a little surprising!


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
Not a bug, sounds like EMPTYREPORT is set to on.

SET EMPTYREPORT = ON

If there are no records to return then you get a report with column headings and no data as you describe instead on the No HTML Output message.


WF 7.6.11
Output: HTML, PDF, Excel
 
Posts: 123 | Location: UK | Registered: October 09, 2003Report This Post
Virtuoso
posted Hide Post
Nope, it isn't EMPTYREPORT.

The same table file with WHERE CAR EQ '0' instead of the WHERE TOTAL does result in 'No HTML Output!'.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
This thread deals with the same issue. Seems this is the documented behaviour with WHERE TOTAL

http://forums.informationbuild...267000016#6267000016


WF 7.6.11
Output: HTML, PDF, Excel
 
Posts: 123 | Location: UK | Registered: October 09, 2003Report This Post
Virtuoso
posted Hide Post
Interesting, but in a different way than the people in that thread meant, I think.

So how do I prevent getting an empty report when WHERE TOTAL yields no results?

"I got this car and when I turn off the engine the doors won't open. I called the manufacturer about this and they said that it's not a design fault, but just the way the car behaves. They even referred to the manual where it says the doors won't open if you turn off the engine. So apparently it's not a problem."


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Platinum Member
posted Hide Post
Something like this should work

TABLE FILE CAR
SUM CNT.CAR
BY COUNTRY
WHERE TOTAL CNT.CAR EQ 0;
ON TABLE HEADING
"Zero lines, but a heading and column titles"
ON TABLE HOLD AS MYHOLD
END
-RUN
-IF &LINES EQ 0 GOTO :theEnd;
TABLE FILE MYHOLD
PRINT *
END
-:theEnd


WF 7.6.11
Output: HTML, PDF, Excel
 
Posts: 123 | Location: UK | Registered: October 09, 2003Report This Post
Virtuoso
posted Hide Post
I was hoping for a simple way to turn off the EMPTYREPORT-like behaviour, not a workaround. The actual report that's having this issue is quite a bit more complicated than the simple CAR-example I used to point out the issue.

I suppose your workaround would be comparable to installing a remote in the car from before so that you can turn off the engine after you got out. It works, but it's hardly elegant.

For now, I'll just accept the fact that the report is sometimes going to show up empty and report this as a bug.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
Here they explain it some more - I don't think they will say it's a Bug...it's just an annoying fly buzzing around your head while you are stuck in your car.

ibi speak
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Virtuoso
posted Hide Post
Another work-around. Change the "EQ" to "NE" in the WHERE on FRANCE to generate a report.

TABLE FILE CAR
 SUM SALES
 BY COUNTRY
 WHERE (COUNTRY EQ 'FRANCE');
 WHERE TOTAL (SALES NE 0);
 ON TABLE HEADING
  "Report Heading"
 ON TABLE HOLD AS RPTFILE FORMAT EXL2K
END
-*
-RUN
-IF (&LINES NE 0) GOTO :DISPLAY_RPT ;
-*Display whatever message is appropriate here....
-EXIT
-*
-:DISPLAY_RPT
SET HTMLFORMTYPE = XLS
-RUN
-HTMLFORM RPTFILE


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007Report 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     Empty table with WHERE TOTAL

Copyright © 1996-2020 Information Builders