Focal Point
[SOLVED]empty report with footing

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/111100534

May 05, 2010, 06:18 AM
Koteswar
[SOLVED]empty report with footing
Hi All,

I am developing a report with heading and footing. The report should display the footing at the time of empty report. But I am unable to get footing in the output. please Any body suggust me.

Thanks
KOteswar

Example;

SET EMPTYREPORT = ON
TABLE FILE EMPDATA
PRINT *
WHERE DEPT EQ ' ';
HEADING
" HAI"
FOOTING
"BYE"
END

WebFOCUS 7.6.4, Oracle 9i, Windows XP.

This message has been edited. Last edited by: Koteswar,
May 05, 2010, 06:48 AM
Swap
Instead of having footing for Empty record set, use the same code to print the Footing irrespective of the data returned. You can do this by making the report compound and appending the dummy records at the last to ensure that footing always appears on the report.

Eg:

SET EMPTYREPORT = ON
TABLE FILE EMPDATA
PRINT *
ON TABLE PCHOLD FORMAT EXL2K OPEN
END
TABLE FILE CAR
PRINT MODEL NOPRINT
FOOTING
"BYE"
ON TABLE PCHOLD FORMAT EXL2K CLOSE


Hope this helps.


Webfocus 7.7.03
Windows XP
Excel, PDF, HTML, APDF, AHTML, Maintain
May 05, 2010, 08:46 AM
Dan Satchell
Try this:

SET EMPTYREPORT = ANSI
-*
TABLE FILE CAR
 PRINT COUNTRY CAR MODEL
 WHERE TOTAL COUNTRY EQ 'SPAIN';
 ON TABLE HOLD
END
-* 
TABLE FILE HOLD
 PRINT *
 HEADING
  "Hi"
 FOOTING
  "Bye"
END



WebFOCUS 7.7.05
May 05, 2010, 12:10 PM
Darin Lee
There was a similar post recently that gave several suggestions for this. Your observation that a footing is not generated for an empty report is correct. A heading can be generated, but a footing cannot. The compound report idea will work, but that just seems like overkill for something simple like this (in addition to the fact that the syntax that Swap uses is the "old" syntax and is no longer generated by the GUI tools this way.)

Best way would be something like Dan has. Run the procedure, test to see if &RECORDS EQ 0 and, if so, branch to a separate procedure that gives the output you want.


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
May 05, 2010, 05:36 PM
Waz
In relation to Dan's suggestion, I found this technique.

http://techsupport.information...utions/30862015.html


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!

May 05, 2010, 06:35 PM
Dan Satchell
Actually, the SUBFOOT isn't necessary - either FOOTING or SUBFOOT will work. The reason the HOLD file was neceassry in my ealier post is because the TOTAL was inadvertently left in the WHERE clause from an earlier test.

SET EMPTYREPORT = ANSI
-*
TABLE FILE CAR
 PRINT COUNTRY CAR MODEL
 WHERE COUNTRY EQ 'SPAIN';
 HEADING
  "Hi"
 FOOTING
  "Bye"
END



WebFOCUS 7.7.05
May 05, 2010, 06:45 PM
Waz
Good One Dan

Its interesting that the technique above was dated 2007, it is by no means new.



FYI

I fount the technique by using the search function here. I've found many useful things with it.


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!

May 05, 2010, 06:59 PM
Dan Satchell
Waz, thanks for the link. First time I've seen Magnify in the real world.


WebFOCUS 7.7.05
May 05, 2010, 07:22 PM
Waz
I always find myself using this as a first port of call when I have an issue.

I've found some links that come out of it do not work (or are restricted)

The only real issue I've had is what words to search for.


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!

May 06, 2010, 02:35 AM
Kofi
Waz,

I am thanking you for link also, it now in favorites Smiler

I think that people not necessarily use search first but should do as Francis say here.

Other problem people no speak Engrish well and is their next language. This problem is when using Engrish based forum like this but I know people try to show help in other language like Ira and TonyA here which is good but when use Engrish based SW there requires Engrish understand.

Kofi


Client Server 8.1.05: Apache; Tomcat;Windows Server 2012
Reporting Server 8.1.05; Oracle; MS SQL; Windows Server 2012
May 06, 2010, 11:12 AM
Darin Lee
So it's the EMPTYREPORT=ANSI instead of EMPTYREPORT=ON that makes the difference. Using EMPTYREPORT=ON, you will not get a footing. It would be interesting to know how that setting is changing the internal processing.


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
May 06, 2010, 12:24 PM
njsden
Based on what I've read, when EMPTYREPORT=ON is used and no records are retrieved, then only HEADING and column titles are displayed. Both &RECORDS and &LINES are set to 0.

With EMPTYREPORT=ANSI and no records retrieved, WF "fakes" one line with values of 0 for numeric fields and blank for alpha fields. In this case, a whole report is produced (with one empty record) so FOOTING is also displayed. &RECORDS is still set to 0 but &LINES is set to 1.

I need to read again to get the facts clear but hopefully I'm not that off Wink



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
May 12, 2010, 10:24 AM
Koteswar
Hi All,

Thanks to one and all to share knowledge with me. It is really helpful to me.

Regards
Koteswar