Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] align single heading line over columns in excel?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] align single heading line over columns in excel?
 Login/Join
 
Gold member
posted
I have the following code-
TABLE FILE CAR
-* COMPUTE a/A1 = '|';
PRINT
CAR.ORIGIN.COUNTRY AS 'a-country'
CAR.COMP.CAR AS 'a-car'
CAR.CARREC.MODEL AS 'a-model'
CAR.ORIGIN.COUNTRY AS 'b-country'
CAR.COMP.CAR AS 'b-car'
CAR.CARREC.MODEL AS 'b-model'
BY CAR.ORIGIN.COUNTRY AS 'first sort field'
BY CAR.COMP.CAR AS 'second sort field'
ON TABLE PCHOLD FORMAT XLSX
END

I have a few lines of report heading text that are left justified fine, but I went to add a last line of heading text, and cannot figure it out.

I would like this last heading text line, as follows:
" a-fields (magical spacing) b-fields"

to be centered over the A-fields / B-fields in the report (past the two sort fields). I tried playing with COLSPAN, but that messes up my normal first lines of heading text. Suggestions gratefully accepted. Thanks!

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
 
Posts: 71 | Registered: May 29, 2015Report This Post
Platinum Member
posted Hide Post
Does this work for you?
 TABLE FILE car
 "Heading one"
 "Heading two"
 " <+0> <+0>a-fields<+0>b-fields"
 PRINT
    CAR.ORIGIN.COUNTRY AS 'a-country'
    CAR.COMP.CAR       AS 'a-car'
    CAR.CARREC.MODEL   AS 'a-model'
    CAR.ORIGIN.COUNTRY AS 'b-country'
    CAR.COMP.CAR       AS 'b-car'
    CAR.CARREC.MODEL   AS 'b-model'
 BY CAR.ORIGIN.COUNTRY AS 'first sort field'
 BY CAR.COMP.CAR       AS 'second sort field'
 ON TABLE PCHOLD FORMAT XLSX
 ON TABLE SET STYLE *
 TYPE=REPORT, HEADALIGN=BODY, $
 TYPE=HEADING, LINE=3, ITEM=3, COLSPAN=3, justify=center,  $
 TYPE=HEADING, LINE=3, ITEM=4, COLSPAN=3, justify=center, $
 END  


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
Gold member
posted Hide Post
Okay- this worked great- thanks for the assist. I do have a follow-up.

In the real report, my heading text has spot markers, which the code now treats as separate objects. I would like - if possible - to treat all this code as a single (left-most) column.

Here is some modified code that illustrates the new problem:

TABLE FILE car
"Heading one"
"Heading two"
"HEADING FOR " <+0> <+0>a-fields<+0>b-fields"
PRINT
CAR.ORIGIN.COUNTRY AS 'a-country'
CAR.COMP.CAR AS 'a-car'
CAR.CARREC.MODEL AS 'a-model'
CAR.ORIGIN.COUNTRY AS 'b-country'
CAR.COMP.CAR AS 'b-car'
CAR.CARREC.MODEL AS 'b-model'
BY CAR.ORIGIN.COUNTRY AS 'first sort field' PAGE-BREAK
BY CAR.COMP.CAR AS 'second sort field'
-* ON TABLE PCHOLD FORMAT XLSX
ON TABLE SET STYLE *
TYPE=REPORT, HEADALIGN=BODY, $


TYPE=HEADING, LINE=4, ITEM=3, COLSPAN=3, justify=center, size=14,color=rgb(12 13 116),style=bold, BACKCOLOR=LIGHT GRAY,$
TYPE=HEADING, LINE=4, ITEM=4, COLSPAN=3, justify=center, $

ENDSTYLE
END

I Would like LINE 3 to appear in its own WIDE cell, but of course, with HEAADLIGN on, each ITEM (text or spot marker) is treated uniquely. What I would like is something that could be code so: TYPE=HEADING, LINE=3, ITEM=*, COLSPAN=3, $

.. so that all the text and spot markers on that line appear in a single cell- is that possible?

Thanks again.


WebFOCUS 8
Windows, All Outputs
 
Posts: 71 | Registered: May 29, 2015Report This Post
Gold member
posted Hide Post
ok, I posted a bad last example; here is my code-

TABLE FILE car
"Heading one"
"Heading two"
"HEADING FOR " <+0> <+0>a-fields<+0>b-fields"
PRINT
CAR.ORIGIN.COUNTRY AS 'a-country'
CAR.COMP.CAR AS 'a-car'
CAR.CARREC.MODEL AS 'a-model'
CAR.ORIGIN.COUNTRY AS 'b-country'
CAR.COMP.CAR AS 'b-car'
CAR.CARREC.MODEL AS 'b-model'
BY CAR.ORIGIN.COUNTRY AS 'first sort field' PAGE-BREAK
BY CAR.COMP.CAR AS 'second sort field'
-* ON TABLE PCHOLD FORMAT XLSX
ON TABLE SET STYLE *
TYPE=REPORT, HEADALIGN=BODY, $
TYPE=HEADING, LINE=4, ITEM=3, COLSPAN=3, justify=center, size=14,color=rgb(12 13 116),style=bold, BACKCOLOR=LIGHT GRAY,$
TYPE=HEADING, LINE=4, ITEM=4, COLSPAN=3, justify=center, $
END

I am trying to get ALL the heading text in heading line 3 in a single cell, which is the default. Thanks.


WebFOCUS 8
Windows, All Outputs
 
Posts: 71 | Registered: May 29, 2015Report This Post
Gold member
posted Hide Post
 
TABLE FILE car
 "Heading one"
 "Heading two"
 "HEADING FOR <COUNTRY AND <COUNTRY"
 " <+0> <+0>a-fields<+0>b-fields"
 PRINT
    CAR.ORIGIN.COUNTRY AS 'a-country'
    CAR.COMP.CAR       AS 'a-car'
    CAR.CARREC.MODEL   AS 'a-model'
    CAR.ORIGIN.COUNTRY AS 'b-country'
    CAR.COMP.CAR       AS 'b-car'
    CAR.CARREC.MODEL   AS 'b-model'
 BY CAR.ORIGIN.COUNTRY AS 'first sort field' PAGE-BREAK
 BY CAR.COMP.CAR       AS 'second sort field'
-* ON TABLE PCHOLD FORMAT XLSX
 ON TABLE SET STYLE *
 TYPE=REPORT, HEADALIGN=BODY, $


 TYPE=HEADING, LINE=4, ITEM=3, COLSPAN=3, justify=center,  size=14,color=rgb(12 13 116),style=bold, BACKCOLOR=LIGHT GRAY,$
 TYPE=HEADING, LINE=4, ITEM=4, COLSPAN=3, justify=center, $

 END


okay, now that I see I have to use the code brackets, the example should make more sense- ah, Mondays.


WebFOCUS 8
Windows, All Outputs
 
Posts: 71 | Registered: May 29, 2015Report This Post
Master
posted Hide Post
Well if you are limiting this to 2 counties, are the values in & variables? If so, try

"HEADING FOR &COUNTRY1 AND &COUNTRY2"


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] align single heading line over columns in excel?

Copyright © 1996-2020 Information Builders