Focal Point
[CLOSED] heading vs subhead

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

June 17, 2008, 11:51 AM
serenekk
[CLOSED] heading vs subhead
Hi,
I know that if you have heading center and such,
the heading will pop up every page if you have 20 page report. subhead on the other hand will only show up once on the top of the report for that 20 pages, right?
However, if you have
by sort1 noprint page-break
by sort2 noprint page-break
and have these sort1 and sort2 printed out in the heading area, say, sort1 has 5 pages of data and sort2 has the last 15 pages. Subhead will take care of not poping up the heading in every page but show only on the 1st page and will suppress too to show at the top of that 6th page when sort2 has changed. How do I take care of that? I want the heading to show up again when &sort1 and &sort2 changes.
Thanks in advance!

This message has been edited. Last edited by: Kerry,


on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment
Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
June 17, 2008, 11:56 AM
serenekk
btw, I just want to add one more thing, with HTML if I set lines =999999, the heading center works fine. Just PDF I am having problem with.


on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment
Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
June 17, 2008, 12:05 PM
Leah
quote:
Subhead will take care of not poping up the heading in every page but show only on the 1st page and will suppress too to show at the top of that 6th page when sort2 has changed. How do I take care of that? I want the heading to show up again when &sort1 and &sort2 changes.
Thanks in advance!


Do you mean you only want the heading on the first page? If so
ON TABLE SUBHEAD
"heading stuff"

Don't do a heading. Of course if that's not what you want then, I'm confused by your statement.


Leah
June 17, 2008, 12:08 PM
Darin Lee
I am not able to follow your description. If you are able, create a sample using the CAR file or give some visual representation of what you need.

ON TABLE SUBHEAD only shows up once at the beginning of the report. ON fieldname SUBHEAD displays each time a sort value changes.

Also, the SET LINES=999999 does not work for PDF. PDF must create a physical page, which is not how HTML works. So for every physical page, you get a page heading. The only way to avoid a page heading in PDF would be to use a subheading with a page-break on your by field.


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
June 17, 2008, 12:20 PM
serenekk
OK. Here's the sample code:
TABLE FILE CAR
PRINT COUNTRY CAR MODEL BODYTYPE
WARRANTY STANDARD SEATS DEALER_COST RETAIL_COST SALES
BY COUNTRY NOPRINT
ON TABLE HOLD AS CARTMP
END
-RUN

TABLE FILE CARTMP
PRINT MODEL
BODYTYPE
SEATS
BY COUNTRY NOPRINT PAGE-BREAK
BY MODEL NOPRINT PAGE-BREAK
BY CAR NOPRINT PAGE-BREAK
-*HEADING CENTER
ON TABLE SUBHEAD
"COUNTRY: "CAR with Model: " "
ON TABLE PCHOLD FORMAT PDF
END
-RUN

now with the on table subhead, even when model changes, the heading does not repeat again.

But with the heading center though instead of subhead, Let's say the first model has 10 pages of report on PDF, it will show up on every page. I want though to show it on the first page for that first model and show up again when that model changes.


on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment
Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
June 17, 2008, 12:28 PM
GinnyJakes
TABLE FILE CAR
SUM SALES RCOST DCOST
BY COUNTRY NOPRINT PAGE-BREAK
BY CAR NOPRINT PAGE-BREAK
BY MODEL
ON COUNTRY SUBHEAD
"SUBHEAD FOR COUNTRY <COUNTRY"
ON CAR SUBHEAD
"SUBHEAD FOR CAR <CAR"
HEADING
"Sales Report for Country <COUNTRY and Car <CAR </1"
ON TABLE SET ONLINE-FMT PDF
END


Serenekk,

Please run this code and tell us how it is different than what you want. Headings appear on every page. The subhead for the primary sort, in this example COUNTRY, only appears on the pages where it changes.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
June 17, 2008, 12:32 PM
GinnyJakes
Sorry, my post passed yours in the bit stream. As Darin said, change ON TABLE SUBHEAD to ON COUNTRY SUBHEAD and it should do what you want.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
June 17, 2008, 12:35 PM
serenekk
Thank you, Ginny. But we'd prefer to use on table subhead or heading center..The users here do not particularly like on sortfield subhead unless we have so many fields and we dont want to pannel, then we use that..thanks so much though.


on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment
Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
June 17, 2008, 12:36 PM
serenekk
On table subhead
only shows once on top of the report and wont show up again though if you have many pages of pdf report for that same sort. That's my problem...:-(


on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment
Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
June 17, 2008, 12:39 PM
GinnyJakes
Another idea is to use the HEADING CENTER but refer to a field that you calculate as blank when you don't want it to print on a page. Your data must be sorted and you can use the LAST feature to check your current sort field against the one in the previous record. When they are not the same, restore the contents of the heading field.

Do you understand what I am saying?


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
June 17, 2008, 12:41 PM
Darin Lee
Still having a hard time trying to visualize what you're looking for. If you only want a heading to appear when a sort field changes then it must be in an ON fieldname SUBHEAD statement - no way around that. A simple HEADING will not work. You can add appropriate PAGE-BREAKs and use JUSTIFY=CENTER in the stylesheet for that subhead to make it appear as if it were a page heading.

Also, I don't think your code appears properly (when fieldnames appear in the < and > brackets, the browser thinks they're tags and doesn't display right). please use the
[code]
[/code] markers around your code.


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
June 17, 2008, 12:46 PM
GinnyJakes
TABLE FILE CAR
PRINT CAR MODEL BODYTYPE
WARRANTY STANDARD SEATS DEALER_COST RETAIL_COST SALES
BY COUNTRY 
ON TABLE HOLD AS CARTMP FORMAT ALPHA
END
-RUN
DEFINE FILE CARTMP
HEADLINE/A40=IF COUNTRY NE LAST COUNTRY THEN 'COUNTRY: CAR with Model:'| COUNTRY ELSE ' ';
END
TABLE FILE CARTMP
PRINT MODEL 
BODYTYPE 
SEATS 
BY COUNTRY NOPRINT PAGE-BREAK
BY CAR NOPRINT PAGE-BREAK
BY MODEL NOPRINT PAGE-BREAK
HEADING CENTER
"<HEADLINE"
ON TABLE PCHOLD FORMAT PDF
END


Try this. There is some bad data in your hold file so the first few pages don't look right but then you'll start to see the pattern.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
June 17, 2008, 12:50 PM
serenekk
THANKS, GINNY.
This may be it. I may be able to develop with the sort fields I am using in my report. Thanks a million!


on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment
Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
June 17, 2008, 01:03 PM
Darin Lee
Something like the follofing maybe?

TABLE FILE CAR
PRINT MODEL AS ''
BODYTYPE  AS ''
SEATS  AS ''
BY COUNTRY NOPRINT PAGE-BREAK
BY CAR NOPRINT PAGE-BREAK
BY MODEL NOPRINT PAGE-BREAK
ON MODEL SUBHEAD
"COUNTRY: <COUNTRY"
"CAR <CAR with Model: <MODEL "
" "
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=SUBHEAD, BY=MODEL, JUSTIFY=CENTER,$
ENDSTYLE
END



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
June 03, 2011, 02:52 PM
Agnes Yeung
I used subhead to show the coloumn subgroup for 3 columns. It only shows up on the 1st page. How could I show this subhead on every page break.


WebFOCUS 766
Windows XP
Output: HTML, PDF or Excel, per users' preference