Focal Point
Burst and send output , but print the header only once

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

November 20, 2007, 09:50 AM
johney
Burst and send output , but print the header only once
Hi All,

I have a report which will be used for bursting using report caster.I have coded my header logic in SUBHEAD (not in HEADING) in order to print it only one time per report (even for multiple pages, only once the header appear), Now if I run this report without bursting it is doing well(sending the report with single header) ; but if burst check box is checked, and sent emails , the recepients are receiving the report with out headers.
TABLE FILE SQLOUT
-*HEADING
-*heading was moved to ON TABLE SUBHEAD to make it print only once for the report
-*and the style type is TABHEADING not HEADING.
PRINT
&PRINTCLAUSE
COMPUTE CTR/I1 = IF LAST CTR NE 1 OR 2 THEN 1 ELSE IF LAST CTR EQ 1 THEN 2 ELSE IF LAST CTR EQ 2 THEN 1 ELSE 3; NOPRINT
&BYVAL.EVAL
ON TABLE SUBHEAD
" "
"
ON TABLE SUBHEAD
" "
" Run date: <+0>&DATEtrMDYY <+0>"
"&VNAME"
" "
"&VDESC"
" "

Any idea , why?
Regards,
Johney.


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
November 20, 2007, 10:00 AM
Francis Mariani
quote:
ON TABLE SUBHEAD


prints a report header only once, burst or no burst.

You should create your header on the field you're bursting with:

ON burst-field SUBHEAD
"sub-heading"



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
November 20, 2007, 10:27 AM
Leah
As Francis says, your code is doing it. This is one of those 'Have your cake and eat it to' situations. Perhaps you could do a SUBHEAD on the Burst value to get a heading once per report.

BY BURSTVALUE
ON BURSTVALUE SUBHEAD
"THIS IS MY REPORT"

And if I'd read Francis' whole post I would have concurred not retyped. Red Face


Leah
November 21, 2007, 02:41 AM
johney
quote:
ON BURSTVALUE SUBHEAD

Hi Francis / Leah,

Thanks a lot!!!

It worked for me but there are some small issues.My column titles are coming first and then only my header(SUBHEAD) appers now.I want the header first then titles(in every page).

Secondly , what is the style type of the subhead now?.Earlier it was TABHEADING when I used ON TABLE SUBHEAD.

Thanks and regards,
Johney.


Version 7.6.11
Webfocus installed in AIX 5.3,
desktop PC: Windows-XP based
Output: Excel, HTML, PDF
November 21, 2007, 03:41 AM
Tony A
Johney,

That's what a SUBHEAD on a BY field does, it places the sub heading after the column titles, unlike how it performs when issued by ON TABLE SUBHEAD.

When you are bursting you would probably want to have a HEADING with ON byfieldname PAGE-BREAK together with SET LINES = 9999. Of course, this might not be what you require when the report is run either as a self service app or through MRE/BID.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
November 21, 2007, 05:43 AM
Danny-SRL
Johney,

Here is something built with the CAR file, bursting on COUNTRY.
  
TABLE FILE CAR
PRINT SALES 
COMPUTE DCOUNTRY/A10=IF COUNTRY EQ LAST COUNTRY THEN ' ' ELSE COUNTRY; NOPRINT
COMPUTE RDATE/MtrDYY=IF COUNTRY EQ LAST COUNTRY THEN ' ' ELSE '&MDYY'; NOPRINT 
COMPUTE DCTITLE/A10=IF COUNTRY EQ LAST COUNTRY THEN ' ' ELSE 'Country:'; NOPRINT
COMPUTE RDTITLE/A10=IF COUNTRY EQ LAST COUNTRY THEN ' ' ELSE 'Run date:'; NOPRINT 
BY COUNTRY NOPRINT REPAGE
BY CAR 
BY BODYTYPE
ON CAR PAGE-BREAK 
HEADING
"<RDTITLE <RDATE>"
"<DCTITLE <DCOUNTRY "
END

Hope it helps.

This message has been edited. Last edited by: Danny-SRL,


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF