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.
TABLE FILE CAR PRINT CAR NOPRINT WHERE RECORDLIMIT EQ 1 HEADING "NO DATA" FOOTING "PAGE ON TABLE SET EMPTYREPORT ON ON TABLE PCHOLD FORMAT &DISPFORMAT ON TABLE SET STYLE * TYPE=REPORT,GRID=OFF,SIZE=8,FONT=ARIAL,$ TYPE=HEADING,STYLE=BOLD,$ TYPE=FOOTING,BACKCOLOR=SILVER,COLOR=MAROON,$ ENDSTYLE END -EXIT
WFConsultant
WF 8105M on Win7/Tomcat
Posts: 780 | Location: Florida | Registered: January 09, 2005
I think what Prarie and Kamesh are telling you is you can check &RECORDS and if there are none, branch to another place in the focexec that produces a dummy report against the CAR file. The CAR files comes with WebFOCUS. Empty Reports do not display footings. It would be nice if they did!
you're request here -RUN -IF &RECORDS EQ 0 GOTO NOREPORT;
-NOREPORT TABLE FILE CAR...... dummy report
Good Luck!
WebFOCUS 7.6.6/TomCat/Win2k3
Posts: 428 | Location: Springfield, MA | Registered: May 07, 2003
Yeah, I know about the 0 records idea but the reason I didn't want to use that is because they want the report headers and column headings to still appear on the report.
Eric
dev: WF 7.6.5 w/IIS + Tomcat
prod: WF 7.6.5 w/IIS + Tomcat
Posts: 153 | Location: Chicago, IL | Registered: February 24, 2006
An empty report, that is, the report without data but including column titles, a report heading (if one was specified in the report request), and a page heading (if one was specified).
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
I believe that what Carol meant was to use something like the Car file and then hardcode the same report and column headings when the &lines(not necessarily &records) is zero in your report.
DEFINE FILE CAR DUM/A1 WITH CAR =' '; END TABLE FILE CAR HEADING "WHATEVER THE REAL REPORT HEADING WOULD BE" PRINT DUM AS 'TITLE FOR COLUMN1 ON REAL REPORT' DUM AS 'TITLE FOR COLUMN2 ON REAL REPORT' .... etc one for each column on real report IF RECORDLIMIT EQ 1 FOOTING "WHATEVER YOUR REAL REPORT FOOTING WOULD BE" END
Good luck
FOCUS 7.6 MVS PDF,HTML,EXCEL
Posts: 115 | Location: Chicago, IL | Registered: May 28, 2004
WebFOCUS places footings at the end of the data or at the bottom of the last page of data. Since there is no data, it can't put it anywhere - basically division by zero. ET's idea would be the only way to get a footing in. I guess you could re-run the same report if &RECORDS=0, changing the page heading to a report heading and the footing to a heading, (using &variables) but the column titles would still come after both, not in between the two.
Regards,
Darin
In FOCUS since 1991 WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex WF Client: 77 on Linux w/Tomcat
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007
This was really not my idea but from Carol's post. What this does is if real report was empty then use the Car file (or any other file that you know is not empty) and print a blank field to add the column titles corresponding to each field on the empty report. Becasue there is one record on this report Focus can then add the footing. My experience leads me to use &lines and not &records. I have encountered instances where an empty report happens and &records is not zero. One case where this happens is the real report could have had qualifying records and thus &records is not zero but there was an if/where total test that eliminated all the records and &lines is equal to zero.
TABLE FILE CAR PRINT COUNTRY IF TOTAL COUNTRY EQ ' ' END NUMBER OF RECORDS IN TABLE= 5 LINES= 5 <======== 5 records (BEFORE TOTAL TESTS) ? stat STATISTICS OF LAST COMMAND
SET EMPTYREPORT = ANSI
TABLE FILE CAR
FOOTING
"THIS IS THE FOOTING"
HEADING
"THIS IS THE HEADING"
ON TABLE SUBFOOT
"THIS IS THE TABLE FOOTING"
SUM SALES
BY COUNTRY
WHERE COUNTRY EQ 'RUSSIA'
END
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Produces a single-line report and displays the missing data character or a zero if a COUNT is requested. in each case, &RECORDS will be 0, and &LINES will be 1.
If the SQL Translator is invoked, ANSI automatically replaces OFF as the default setting for EMPTYREPORT.
ON
Produces an empty report (column headings with no content). This was the default behavior in prior releases.
OFF
Produces no report output. OFF is the default value except for SQL Translator requests. When the SQL Translator is invoked, ANSI replaces OFF as the default setting for the EMPTYREPORT parameter, so the results are the same as for the ANSI setting.
The command can also be issued from within a request:
ON TABLE SET EMPTYREPORT ANSI
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
ANSI is not an option for EMPTYREPORT when working in graph mode. New people like me relying on code generation will assume ON/OFF are the only options. But it works even without counting! Thank you all!
Developer Studio 7.6.11 AS400 - V5R4 HTML,PDF,XLS
Posts: 305 | Location: Winnipeg,MB | Registered: May 12, 2008
Originally posted by Francis Mariani: And it's in the manual:
SET EMPTYREPORT={ANSI|ON|OFF} where:
ANSI
Produces a single-line report and displays the missing data character or a zero if a COUNT is requested. in each case, &RECORDS will be 0, and &LINES will be 1.
If the SQL Translator is invoked, ANSI automatically replaces OFF as the default setting for EMPTYREPORT.
ON
Produces an empty report (column headings with no content). This was the default behavior in prior releases.
OFF
Produces no report output. OFF is the default value except for SQL Translator requests. When the SQL Translator is invoked, ANSI replaces OFF as the default setting for the EMPTYREPORT parameter, so the results are the same as for the ANSI setting.
The command can also be issued from within a request:
ON TABLE SET EMPTYREPORT ANSI
Hi, Have you noticed this not working in newer releases. All of a sudden EMPTYREPORT=OFF is not working. Still getting the heading and col headings as well as my zero records message. Any ideas??
Thanks
Michelle
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
I've used EMPTYREPORT in different versions of WebFOCUS and have always seen it working as documented.
See for instance:
TABLE FILE CAR
PRINT CAR
SEATS
BY COUNTRY
HEADING
"List of Cars"
FOOTING
"Page <TABPAGENO"
WHERE COUNTRY EQ 'AUSTRALIA'
ON TABLE SET EMPTYREPORT ANSI
ON TABLE SET PAGE-NUM NOPAGE
END
This request above has no matching records but yet produces "complete" output due to EMPTYREPORT ANSI:
List of Cars
COUNTRY CAR SEATS
------- --- -----
. . .
Page .
Switching EMPTYREPORT to OFF produces no report output -as expected- in WF 7.7.03:
? REL
TABLE FILE CAR
PRINT CAR
SEATS
BY COUNTRY
HEADING
"List of Cars"
FOOTING
"Page <TABPAGENO"
WHERE COUNTRY EQ 'AUSTRALIA'
ON TABLE SET EMPTYREPORT OFF
ON TABLE SET PAGE-NUM NOPAGE
END
Result:
--------------------------------------------------------------------------------
Your request did not return any output to display.
Possible causes:
- No data rows matched the specified selection criteria.
- Output was directed to a destination such as a file or printer.
- An error occurred during the parsing or running of the request.
--------------------------------------------------------------------------------
EDA7703 Release * Current Software:
EDA7703 Release RELEASE = R727703B
EDA7703 Release GEN_NUM = 567
EDA7703 Release SOURCE_DATE = 06/02/2011 18:09:19
EDA7703 Release BUILD_DATE = 06/02/2011 21:07:19
EDA7703 Release INSTALLATION_DATE = 8/26/2011 15:27:32
0 NUMBER OF RECORDS IN TABLE= 0 LINES= 0
Could you post the code you are using (including any settings) showing the behaviour you describe?
With my include file uncommented I get: (accept all I see displayed is the date line, first line of heading and the Sorry message. It appears to be acting like empty report is set to ON and displaying my No records message when &LINES EQ 0)
September 19 2011 8:06AM
Potential Cancellations Due To Low Enrollment Fall 2011 Off Campus Subject: History
Cr Prt Max Act % Begin End Course Hrs Trm Seats Reg Enrl Schedule Rm Days Time Time Status
Sorry ! There are no matching records. Please review and try again.
I appreciate you looking at my code. I am hoping you can see what the problem is. I have used this no records include with all of my other reports with no problems, I am not sure why it is behaving like this now. Which makes me wonder if the Empty Report is not functioning properly since the last upgrade.
Thank you Michelle
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
I can't spot any obvious reasons that explain why you are getting a report with HEADING and column titles even though you are sure no records match the selection criteria and EMPTYREPORT is indeed set to OFF.
Can you replicate that behaviour with the CAR table? if so, this is definitely a bug and you should open a case with Tech Support. I am also running 7.7.03 and have not seen this happening though.
Could you try breaking your request using a HOLD file in between to try and see where the problem might be?
JOIN ....
DEFINE FILE STG_CURR_REG_TERM
...
END
TABLE FILE STG_CURR_REG_TERM
PRINT ...
WHERE ...
ON TABLE SET EMPTYREPORT OFF
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE HOLD AS HDATA
END
-EXIT
Running that would allow you to see that indeed 0 records were read and 0 records were written to the HOLD file, but if this is not the case then maybe something else is going on ...
If that works as expected, you can now try and produce your report our of the HOLD file:
TABLE FILE HDATA
PRINT ....
HEADING ...
FOOTING ...
ON TABLE SET EMPTYREPORT OFF
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
...
ENDSTYLE
END
-RUN
If you still get an actual report event though you know that the HOLD file has no records whatsoever and that EMPTYREPORT is OFF, then a case before Tech Support will be a must.
Thank you so much. I will give that try and let you know.
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
Thank you Dan, but that didn't work either. I'm really stumped. I did a fex that shows I truly have no data and should not be getting the heading and titles.
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
Some other suggestions in trying to determine the cause:
Place the command '? SET EMPTYREPORT' both before and after the report query code to ensure the setting is turned off.
Comment out each of the other SET commands, including the PAGE-NUM NOPAGE, to see if one of them is in conflict with the EMPTYREPORT setting.
Create a simple report using the CAR file that generates zero records (example: WHERE COUNTRY EQ 'USA') and see how EMPTYREPORT=OFF and your 'No Records' message behave with that query.
If none of the above offer any possible solutions/ideas, open a case with IBI Tech Support.
WebFOCUS 7.7.05
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 2007
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
Originally posted by Dan Satchell: Some other suggestions in trying to determine the cause:
Place the command '? SET EMPTYREPORT' both before and after the report query code to ensure the setting is turned off.
Comment out each of the other SET commands, including the PAGE-NUM NOPAGE, to see if one of them is in conflict with the EMPTYREPORT setting.
Create a simple report using the CAR file that generates zero records (example: WHERE COUNTRY EQ 'USA') and see how EMPTYREPORT=OFF and your 'No Records' message behave with that query.
If none of the above offer any possible solutions/ideas, open a case with IBI Tech Support.
This is what I get; shows it OFF
EMPTYREPORT OFF 0 HOLDING HTML FILE ON PC DISK ...10 NUMBER OF RECORDS IN TABLE= 1 LINES= 0 EMPTYREPORT OFF WebFOCUS Version 7.7.03 compiled and linked on Mon Jun 6 01:04:45 EDT 2011 (Gen branch7703:126)
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML
For everyone that helped me and those interested, this is what I found out. I am posting my CAR file example for you to try. If there is a WHERE TOTAL clause in the fex I get the above mentioned errors. Take out the word TOTAL and the report runs fine and I get the norecords message(Sorry message as I call it).
Thank you Dan, your suggestions led me to find this. I had commented out everything pretty much and decided to see if the TOTAL was the issue, as I don't even remember putting it in.
-* File test_emptyreport.fex
? SET EMPTYREPORT
SET NODATA = na
SET DROPBLNKLINE = OFF
SET PRINTPLUS = ON
SET SQUEEZE = OFF
SET ORIENTATION = LANDSCAPE
SET PAGE-NUM = NOPAGE
SET PAGESIZE = LETTER
SET UNITS = INCHES
SET EMPTYREPORT=OFF
-SET &MYSTYLE = IF &WFFMT EQ PDF THEN 'kvcc_wf.sty' ELSE 'kvcc_wf_no_logo.sty';
-SET &USR = GETUSER(USERID);
TABLE FILE CAR
BY LOWEST CAR.ORIGIN.COUNTRY NOPRINT
BY LOWEST CAR.COMP.CAR NOPRINT
BY LOWEST CAR.CARREC.MODEL NOPRINT AS 'Model'
BY CAR.BODY.SEATS
BY CAR.BODY.DEALER_COST
ON CAR.ORIGIN.COUNTRY SUBHEAD
"<CAR.ORIGIN.COUNTRY "
ON CAR.COMP.CAR SUBHEAD
"<CAR.COMP.CAR "
ON CAR.CARREC.MODEL SUBHEAD
"<CAR.CARREC.MODEL "
HEADING
"This is the page heading"
FOOTING
"Page <TABPAGENO of<TABLASTPAGE "
ON TABLE SUBFOOT
" this is the footing"
WHERE TOTAL CAR.CARREC.MODEL EQ 'blue';
ON TABLE SET EMPTYREPORT OFF
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT &WFFMT.(<HTML,HTML>,<PDF,PDF>,<Excel,EXL07>,< Active HTML,AHTML>).Select type of display output.
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = kvcc_wf,
$
TYPE=TABFOOTING,
LINE=1,
JUSTIFY=LEFT,
$
ENDSTYLE
END
-INCLUDE norecords.fex
? SET EMPTYREPORT
NORECORDS.FEX ...............
-IF &LINES EQ 0 THEN GOTO NORECS
- ELSE GOTO EXIT;
-NORECS
-IF &WFFMT EQ PDF THEN GOTO PDF
- ELSE GOTO HTML;
-HTML
-HTMLFORM norecords.htm
-GOTO EXIT
-PDF
-INCLUDE norecords_pdf_2.fex **change this**
-EXIT
norecords.htm CODE
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META id=mycharsetmeta content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META id=Generation content="Created in release 7701, Generation 3.0">
<SCRIPT id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>
<SCRIPT id=IBI_OptionsScript type=text/javascript>
var cgipath = "cgipath";
var ibirls = "ibirls3";
var rltdyncalendar = "rltdyncalendar";
var gmap = "ibigmap";
var olap="olap";
var olappanebase="olappanebase";
var olapdrill="olapdrill";
var ibixmltree="ibixmltree";
var ibiOptions = new Array(cgipath,ibirls);
</SCRIPT>
<SCRIPT id=IBI_nls type=text/javascript src="/ibi_html/javaassist/nls.js"></SCRIPT>
<SCRIPT id=IBI_nlsVars type=text/javascript src="/ibi_html/javaassist/nlsvars.js"></SCRIPT>
<SCRIPT id=IBI_ibigbl type=text/javascript src="/ibi_html/javaassist/ibi/html/js/ibigbl.js"></SCRIPT>
<SCRIPT id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
addIntlTranslatedJS("composertrans.js");
</SCRIPT>
<TITLE>Error Page</TITLE>
<SCRIPT id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
UpdateData();
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
</SCRIPT>
<SCRIPT for=window type=text/javascript eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>
</HEAD>
<BODY style="Z-INDEX: 0; BACKGROUND-COLOR: white; OVERFLOW: auto" thumbnailscale="4" elementtype="21" edaconnectionrequired="false">
<SPAN style="Z-INDEX: 2; POSITION: absolute; TEXT-ALIGN: center; LINE-HEIGHT: normal; BACKGROUND-COLOR: white; WIDTH: 832px; FONT-FAMILY: Verdana; LETTER-SPACING: normal; HEIGHT: 180px; COLOR: #0091cc; FONT-SIZE: 18pt; VERTICAL-ALIGN: middle; TOP: 110px; FONT-WEIGHT: bold; LEFT: 90px" id=text1 tabIndex=2 defaultselection="1">
<BR>
<BR>There are no matching records.
<BR>Please review and try again.
<LABEL style="Z-INDEX: 3; POSITION: absolute; WIDTH: 300px; FONT-FAMILY: Verdana; HEIGHT: 60px; COLOR: #0091cc; FONT-SIZE: 24pt; TOP: 0px; CURSOR: default; LEFT: 260px" id=label1 tabIndex=3>Sorry !</LABEL></SPAN>
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden>
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app value=michelle type=hidden name="ibiapp_app">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibic_server value=EDASERVE type=hidden isdataserversarea="1" name="ibic_server">
<xml id=focus_xmlelement>
<script type="text/xml">
<rootxmlnode focoption="_FOC_NULL">
<variables></variables>
<input_controls></input_controls>
<other_bound_objects></other_bound_objects>
<requests></requests></rootxmlnode></script>
</xml></BODY>
<SCRIPT id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>
** I hope this helps someone else someday. This original post was from 2007 and I was surprised to get responses. Thank you!
Michelle
WebFOCUS Server 8.1.05 Windows 2008 Server WebFOCUS AppStudio 8.1.05 Windows 7 Professional IE 11 and Chrome Version 43.0.2357.124 m. Mostly HTML, PDF, Excel, and AHTML