IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Displaying footer with empty report?
Go
New
Search
Notify
Tools
Reply
  
-star Rating Rate It!  Login/Join 
Platinum Member
Posted
Is there a way I can get the footer to display on an empty report? The column headings / header all appear but goes blank there after.

Eric


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.1.6 w/IIS + Tomcat
 
Posts: 151 | Location: Chicago, IL | Registered: February 24, 2006Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
This one works,

-SET &DISPFORMAT='HTML';

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


Kamesh

WF 7.1.6 on WinXp/IIS/Tomcat
Ouput:HTML/PDF/Exl2k
 
Posts: 551 | Location: cincinnati | Registered: January 09, 2005Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
But this does not.

SET EMPTYREPORT=ON
TABLE FILE CAR
PRINT CAR
IF CAR EQ 'TRUCK'
HEADING
"NO DATA"
FOOTING
"PAGE"
END


WebFOCUS 7.6.1 Win 2003 Test -7.6.5
 
Posts: 1188 | Location: San Antonio | Registered: February 28, 2005Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
Prarie's example is what happens in my report....any ideas?


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.1.6 w/IIS + Tomcat
 
Posts: 151 | Location: Chicago, IL | Registered: February 24, 2006Reply With QuoteEdit or Delete MessageReport This Post
Guru
Posted Hide Post
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 5.2.4 Dev Studio/5.2.8 Server/Win2K WebFOCUS 7.6.6/TomCat/Win2k3
 
Posts: 386 | Location: Springfield, MA | Registered: May 07, 2003Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
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.1.6 w/IIS + Tomcat
 
Posts: 151 | Location: Chicago, IL | Registered: February 24, 2006Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
Seems to happen everywhere, under all conditions. Cannot get it to change behaviour.


Alan.
WF 7.6.5, PMF 5.1, MRE,RA,RG, etc... Win2003(8xQuad)/IIS/Tomcat with SSL and AD security.
 
Posts: 848 | Location: Portugal | Registered: February 07, 2007Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
Quote from manual

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.6.5, PMF 5.1, MRE,RA,RG, etc... Win2003(8xQuad)/IIS/Tomcat with SSL and AD security.
 
Posts: 848 | Location: Portugal | Registered: February 07, 2007Reply With QuoteEdit or Delete MessageReport This Post
ET
Platinum Member
Posted Hide Post
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.11 MVS PDF,HTML,EXCEL
 
Posts: 115 | Location: Chicago, IL | Registered: May 28, 2004Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
Alright, that's what I was afraid of...thanks guys.

Eric


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.1.6 w/IIS + Tomcat
 
Posts: 151 | Location: Chicago, IL | Registered: February 24, 2006Reply With QuoteEdit or Delete MessageReport This Post
Virtuoso
Posted Hide Post
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



WF Server: 7.1.6 on Z/OS and Linux, ReportCaster, Self-Service, MRE, Java
Data: DB2, DB2/UDB, Adabas, SQL Server Output: HTML,PDF,Excel2K
WF Client: Linux w/WebSphere, Servlet, CGI
 
Posts: 1306 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteEdit or Delete MessageReport This Post
ET
Platinum Member
Posted Hide Post
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

RECORDS = 5 &records SEGS DELTD = 0
LINES = 0 &lines NOMATCH = 0
BASEIO = 3 DUPLICATES = 0
TRACKIO = 0 FORMAT ERRORS = 0
SORTIO = 3 INVALID CONDTS = 0
SORT PAGES = 4 OTHER REJECTS = 0
READS = 0 CACHE READS = 0
TRANSACTIONS = 0 MERGES = 0
ACCEPTED = 0 SORT STRINGS = 1
SEGS INPUT = 0 INDEXIO = 0
SEGS CHNGD = 0

INTERNAL MATRIX CREATED: YES AUTOINDEX USED: NO
SORT USED: FOCUS AUTOPATH USED: NO
AGGREGATION BY EXT.SORT: NO HOLD FROM EXTERNAL SORT: NO
MINIO USED:

NO
Good luck


FOCUS 7.11 MVS PDF,HTML,EXCEL
 
Posts: 115 | Location: Chicago, IL | Registered: May 28, 2004Reply With QuoteEdit or Delete MessageReport This Post
Guru
Posted Hide Post
In WebFocus 7.1x there is a value -

SET EMPTYREPORT = ANSI

This will produce a footer, since it places a line in every report (where all data is missing).



(Prod: WebFOCUS 7.1.3: HPUX hub/Servlet Mode; various subs; mostly Self Serve; DBs: Oracle, Redbrick, JDE, SQLServer; various output formats)
(Test: WebFOCUS 7.6.4: HPUX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, Redbrick, JDE, SQLServer; various output formats)
 
Posts: 277 | Location: California | Registered: April 14, 2003Reply With QuoteEdit or Delete MessageReport This Post
Expert
Posted Hide Post
quote:
SET EMPTYREPORT = ANSI


N.Selph! Something new to learn everyday!

It works in 5.3.2 as well.

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



Env 1: WebFOCUS 5.3.2 Servlet - MRE/BID/Self Service/ReportCaster - MS Windows Server 2003 - IIS/New Atlanta ServletExec - MS SQL Server 2000 - DataMigrator 5.3.4
Env 2: WebFOCUS 7.6.5 Servlet - MRE/BID/Self Service - MS Windows XP SP2 - Apache Tomcat/5.5.25 - MS SQL Server 2000
Env 3: WebFOCUS 5.3.3 CGI - Self Service - AIX 5.2 - IBM DB2
Output formats: HTML, Excel 2000 and PDF
 
Posts: 3379 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteEdit or Delete MessageReport This Post
Expert
Posted Hide Post
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


Francis



Env 1: WebFOCUS 5.3.2 Servlet - MRE/BID/Self Service/ReportCaster - MS Windows Server 2003 - IIS/New Atlanta ServletExec - MS SQL Server 2000 - DataMigrator 5.3.4
Env 2: WebFOCUS 7.6.5 Servlet - MRE/BID/Self Service - MS Windows XP SP2 - Apache Tomcat/5.5.25 - MS SQL Server 2000
Env 3: WebFOCUS 5.3.3 CGI - Self Service - AIX 5.2 - IBM DB2
Output formats: HTML, Excel 2000 and PDF
 
Posts: 3379 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteEdit or Delete MessageReport This Post
Master
Posted Hide Post
Francis,

Thanks. As usual, when you have tried everything and nothing works, RTM (read the manual)!


Daniel
wf 7.6/WinXP/IIS/SSA
www.wrapapp.com
www.srl.co.il

 
Posts: 594 | Location: Tel Aviv, Israel | Registered: March 23, 2006Reply With QuoteEdit or Delete MessageReport This Post
Platinum Member
Posted Hide Post
Ahh this was my own fault. I use ANSI in my self service reports and used ON for who knows what reason cause I was adding it to a reporting object.

Thanks guys.


dev: WF 7.6.5 w/IIS + Tomcat

prod: WF 7.1.6 w/IIS + Tomcat
 
Posts: 151 | Location: Chicago, IL | Registered: February 24, 2006Reply With QuoteEdit or Delete MessageReport This Post
Hua
Gold member
Posted Hide Post
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.4
AS400 - V5R4
HTML
 
Posts: 55 | Location: Winnipeg,MB | Registered: May 12, 2008Reply With QuoteEdit or Delete MessageReport This Post
 Previous Topic | Next Topic powered by eve community  
 

IB - Developer Center    Forums  Hop To Forum Categories  FOCUS/WebFOCUS    Displaying footer with empty report?

Copyright © 1996-2008 Information Builders, leaders in enterprise business intelligence.