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.
We use long SUBHEADs a lot. We use stylesheet statements like: TYPE=SUBHEAD, LINE=14, ITEM=4, MACRO=bold, WHEN=WBS_Level_No EQ 9, $ to get the appearance we want for specific items on specific lines. Now for the first time we have a subhead that spans more than one page. We have found that when the subhead continues to the next page, the line numbers start over at 1. Can we set something to force the line numbers to keep going until the subhead ends?
If you have SET PAGE=NOLEAD, there is a strange behavour in WebFOCUS whereby SET LINES is ignored if it is greater than 998 and the report is paginated! Can you try SET LINES = 998 and see if that is better?
Thanks for the ideas, but we couldn't get anything to work. I did notice that the SET LINES commands did not seem to have the expected effect - the number of lines on a page seems to be determined by some other setting in our environment that I can't identify, because I could not get the number I specified in SET LINES to be the actual number of lines on a page.
Also, I could not get SET PAGE=NOLEAD to produce a continuous nonpaginated report as stated in the documentation - the effect it had was that in HTML format it extended the page length to as many lines as were in the SUBHEAD, then started a new page with the first row of data; in PDF format it extended the number of SUBHEAD lines on the page by a few or by several depending on how many total SUBHEAD lines I coded (I went as high as 60), then continued the SUBHEAD on the next page.
I worked on this a bit over the weekend. If you run this in HTML output format, it should go over 4 pages, but only 'line 14' of the subhead is bolded.
Here's what I came up with:
-* Environmental Settings
SET ASNAMES = ON SET HOLDLIST = PRINONLY
-* I set lines = 15 so that the subhead(s) will go over 1 page.
SET LINES = 15
-* Define a new field that will be used to represent line number.
DEFINE FILE CAR TEMP1/A2 = '01'; END
-* Extract data from CAR with the ROWS option. I have created new -* fields for FLD1 through FLD20 to represent new columns of data -* that might be in the report. It is done with a multiverb request -* in conjunction with ROWS so that each of the fields (NEW_SALES) -* through FLD20 will be related to each of the line counter fields -* created through ROWS.
TABLE FILE CAR SUM SALES AS 'NEW_SALES' COMPUTE FLD1/A5 = 'FLD1' ; COMPUTE FLD2/A5 = 'FLD2' ; COMPUTE FLD3/A5 = 'FLD3' ; COMPUTE FLD4/A5 = 'FLD4' ; COMPUTE FLD5/A5 = 'FLD5' ; COMPUTE FLD6/A5 = 'FLD6' ; COMPUTE FLD7/A5 = 'FLD7' ; COMPUTE FLD8/A5 = 'FLD8' ; COMPUTE FLD9/A5 = 'FLD9' ; COMPUTE FLD10/A5 = 'FLD10' ; COMPUTE FLD11/A5 = 'FLD11' ; COMPUTE FLD12/A5 = 'FLD12' ; COMPUTE FLD13/A5 = 'FLD13' ; COMPUTE FLD14/A5 = 'FLD14' ; COMPUTE FLD15/A5 = 'FLD15' ; COMPUTE FLD16/A5 = 'FLD16' ; COMPUTE FLD17/A5 = 'FLD17' ; COMPUTE FLD18/A5 = 'FLD18' ; COMPUTE FLD19/A5 = 'FLD19' ; COMPUTE FLD20/A5 = 'FLD20' ; BY COUNTRY SUM SALES BY COUNTRY BY TEMP1 ROWS '01' OVER '02' OVER '03' OVER '04' OVER '05' OVER '06' OVER '07' OVER '08' OVER '09' OVER '10' OVER '11' OVER '12' OVER '13' OVER '14' OVER '15' OVER '16' OVER '17' OVER '18' OVER '19' OVER '20' WHERE COUNTRY EQ 'ENGLAND' ; ON TABLE HOLD AS TEST1 END
-* Hold the data to a new hold file renaming E23 to LINE_COUNTER just -* for the purpose of this example. In reality it is not neede, but -* for the semantics further down, it makes things more readable.
TABLE FILE TEST1 SUM MAX.NEW_SALES MAX.FLD1 MAX.FLD2 MAX.FLD3 MAX.FLD4 MAX.FLD5 MAX.FLD6 MAX.FLD7 MAX.FLD8 MAX.FLD9 MAX.FLD10 MAX.FLD11 MAX.FLD12 MAX.FLD13 MAX.FLD14 MAX.FLD15 MAX.FLD16 MAX.FLD17 MAX.FLD18 MAX.FLD19 MAX.FLD20 BY COUNTRY BY E23 AS 'LINE_COUNTER' ON TABLE HOLD AS TEST2 END
-* This is the final report that is produced. All of the columns -* are NOPRINTed so that they can be displayed through subheads. -* In the stylesheet, you won't reference the subhead line by -* LINE=x, it will be WHEN=LINE_COUNTER EQ 'x'.
TABLE FILE TEST2 HEADING "This is the report" " " SUM NEW_SALES NOPRINT MAX.FLD1 NOPRINT MAX.FLD2 NOPRINT MAX.FLD3 NOPRINT MAX.FLD4 NOPRINT MAX.FLD5 NOPRINT MAX.FLD6 NOPRINT MAX.FLD7 NOPRINT MAX.FLD8 NOPRINT MAX.FLD9 NOPRINT MAX.FLD10 NOPRINT MAX.FLD11 NOPRINT MAX.FLD12 NOPRINT MAX.FLD13 NOPRINT MAX.FLD14 NOPRINT MAX.FLD15 NOPRINT MAX.FLD16 NOPRINT MAX.FLD17 NOPRINT MAX.FLD18 NOPRINT MAX.FLD19 NOPRINT MAX.FLD20 NOPRINT BY COUNTRY NOPRINT BY LINE_COUNTER NOPRINT
ON COUNTRY SUBHEAD " " "~COUNTRY"
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD1" WHEN LINE_COUNTER EQ '01' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD2" WHEN LINE_COUNTER EQ '02' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD3" WHEN LINE_COUNTER EQ '03' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD4" WHEN LINE_COUNTER EQ '04' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD5" WHEN LINE_COUNTER EQ '05' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD6" WHEN LINE_COUNTER EQ '06' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD7" WHEN LINE_COUNTER EQ '07' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD8" WHEN LINE_COUNTER EQ '08' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD9" WHEN LINE_COUNTER EQ '09' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD10" WHEN LINE_COUNTER EQ '10' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD11" WHEN LINE_COUNTER EQ '11' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD12" WHEN LINE_COUNTER EQ '12' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD13" WHEN LINE_COUNTER EQ '13' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD14" WHEN LINE_COUNTER EQ '14' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD15" WHEN LINE_COUNTER EQ '15' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD16" WHEN LINE_COUNTER EQ '16' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD17" WHEN LINE_COUNTER EQ '17' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD18" WHEN LINE_COUNTER EQ '18' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD19" WHEN LINE_COUNTER EQ '19' ;
ON LINE_COUNTER SUBHEAD "~LINE_COUNTER ~MAX.FLD20" WHEN LINE_COUNTER EQ '20' ;
ON TABLE SET STYLE * TYPE=SUBHEAD, BY=COUNTRY, STYLE=BOLD, BACKCOLOR=SILVER,$ TYPE=SUBHEAD, BY=LINE_COUNTER, STYLE=BOLD, WHEN=LINE_COUNTER EQ '14', $ ENDSTYLE END
where ~ is used in palce of the column marker.
The line counter column essentially works as a line number reference that you were originally looking into. With this method, you can now identify each line of a subhead that spans multiple pages.
Of course, this is totally dependent upon the data. This is a very simple example of sales by country. This process assumes that each of the 'line counter' numbers will contain the same data for the higher level sort field (in this case COUNTRY).
KenThis message has been edited. Last edited by: k.lane,
Prod - WF 7.6.4 Unix/Solaris - Self-Service, BI Dashboard, MRE Dev - WF 7.6.4 Unix/Solaris - Self-Service, BI Dashboard, MRE Databases: Oracle 10g, SQL Server 2000, DB2.
It looks more complicated than it really is. There are really only two steps in the logic. The first is to use the ROWS option to create a line number and then using the hold file created, dump out the fields using several subheads that essentially give the impression of using a single subhead.
Ken
Prod - WF 7.6.4 Unix/Solaris - Self-Service, BI Dashboard, MRE Dev - WF 7.6.4 Unix/Solaris - Self-Service, BI Dashboard, MRE Databases: Oracle 10g, SQL Server 2000, DB2.