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]TYPE=TITLE in Stylesheet

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED]TYPE=TITLE in Stylesheet
 Login/Join
 
Guru
posted
I have a report that generates an Excel spreadsheet. The report has a a column that has three lines for the column title. I need indent and change the font size of the first line of the column title only. Is there a way to do that in the stylesheet? I want to change only the first line of the column title to the following without the second and third line font size changing to font size 14.

TYPE=TITLE,COLUMN=N1,SIZE=14,$

This message has been edited. Last edited by: Michele Brooks,


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Master
posted Hide Post
I'm afraid that focus stylesheets are not quite that sophisticated. The code below might be the best you can do.

 
-* File CARTITLE.fex
-SET &ECHO = ALL;

TABLE FILE CAR

SUM SALES 

BY COUNTRY AS '  ONE,TWO,THREE'
BY CAR
BY MODEL
-*
HEADING
" CAR SALES REPORT"
" "
ON TABLE PCHOLD FORMAT EXL07

ON TABLE SET STYLE *
 INCLUDE = endeflt,
$
TYPE=REPORT,
GRID=OFF,
FONT=ARIAL,
SIZE=10,
STYLE=NORMAL,
$
TYPE=HEADING,
HEADALIGN=BODY,
SIZE=9,
COLOR=BLACK,
STYLE=BOLD,
JUSTIFY=CENTER,
$
TYPE=HEADING,
LINE=1,
COLSPAN=4,
$
TYPE=TITLE,
FONT=ARIAL,
STYLE=NORMAL,
COLOR='WHITE',
$
TYPE=TITLE,
COLUMN=N1,
ITEM=1,
$
TYPE=TITLE,
COLUMN=N1,
ITEM=2,
STYLE=NORMAL,
OBJECT=TEXT,
$
TYPE=TITLE,
COLUMN=N1,
ITEM=3,
STYLE=NORMAL,
OBJECT=TEXT,
$
ENDSTYLE
END
-RUN


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Expert
posted Hide Post
Ah, you are on WF 7.1.7, this limits you and I think this version is now unsupported.

I was going to post info about MARKUP, like :
TABLE FILE CAR
PRINT COUNTRY AS '<font face="arial" size=14 color=#FF9933>  This is</font>,The, Country'
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=REPORT, FONT=ARIAL, SIZE=10, MARKUP=ON, $
ENDSTYLE
END


But that will probably not work.

You could use some of the other markup tags.
TABLE FILE CAR
PRINT COUNTRY AS '<b><i><u>  This is</u></i></b>,The, Country'
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=REPORT, FONT=ARIAL, SIZE=10, MARKUP=ON, $
ENDSTYLE
END


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Thanks so much for both replies. I will try them both--excellent suggestions.


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Guru
posted Hide Post
My apologies, but I posted the wrong version of WF. I am currently using 7.6.1. I can run your code using the CAR file, but for some reason it doesn't work when I run my code.
quote:
Originally posted by Waz:
Ah, you are on WF 7.1.7, this limits you and I think this version is now unsupported.

I was going to post info about MARKUP, like :
TABLE FILE CAR
PRINT COUNTRY AS '<font face="arial" size=14 color=#FF9933>  This is</font>,The, Country'
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=REPORT, FONT=ARIAL, SIZE=10, MARKUP=ON, $
ENDSTYLE
END


But that will probably not work.

You could use some of the other markup tags.
TABLE FILE CAR
PRINT COUNTRY AS '[b][i]<u>  This is</u>[/i][/b],The, Country'
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET STYLE *
TYPE=REPORT, FONT=ARIAL, SIZE=10, MARKUP=ON, $
ENDSTYLE
END


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Expert
posted Hide Post
Can you post your code ?


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!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Will do on Thursday. Thanks.


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Guru
posted Hide Post
I tried one of your stylesheet suggestions, but nothing changed in my column heading. The report gets output to an Excel spreadsheet and a macro does autofit formatting so I will let it go at that. I appreciated the stylesheet tips and I know I will use them in future programs. Thank you.
quote:
Originally posted by Tomsweb:
I'm afraid that focus stylesheets are not quite that sophisticated. The code below might be the best you can do.

 
-* File CARTITLE.fex
-SET &ECHO = ALL;

TABLE FILE CAR

SUM SALES 

BY COUNTRY AS '  ONE,TWO,THREE'
BY CAR
BY MODEL
-*
HEADING
" CAR SALES REPORT"
" "
ON TABLE PCHOLD FORMAT EXL07

ON TABLE SET STYLE *
 INCLUDE = endeflt,
$
TYPE=REPORT,
GRID=OFF,
FONT=ARIAL,
SIZE=10,
STYLE=NORMAL,
$
TYPE=HEADING,
HEADALIGN=BODY,
SIZE=9,
COLOR=BLACK,
STYLE=BOLD,
JUSTIFY=CENTER,
$
TYPE=HEADING,
LINE=1,
COLSPAN=4,
$
TYPE=TITLE,
FONT=ARIAL,
STYLE=NORMAL,
COLOR='WHITE',
$
TYPE=TITLE,
COLUMN=N1,
ITEM=1,
$
TYPE=TITLE,
COLUMN=N1,
ITEM=2,
STYLE=NORMAL,
OBJECT=TEXT,
$
TYPE=TITLE,
COLUMN=N1,
ITEM=3,
STYLE=NORMAL,
OBJECT=TEXT,
$
ENDSTYLE
END
-RUN


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Guru
posted Hide Post
Your suggestion actually did WORK. It didn't work the first time because I had the statement coded wrong. Since your idea was so great, I decided to try it in an Excel macro template report that uses the OVER statement. I need to leave a few blank spaces in front of some of the OVER columns so that they are indented. For some reason, just leaving blank spaces in front of OVER columns does not work. For example:

This code does not leave blank spaces in front of Total Payments (there are 4 spaces in front of Total Payments)
SET SHOWBLANKS = ON
SUM PAYMENTS AS '    Total Payments' OVER
******************************************
Your markup code does leave blank spaces in front Total Payments
  SHOWBLANKS = ON
SUM PAYMENTS AS '<font face="arial"     </font> Total Payments' OVER

However, the SHOWBLANKS = ON causes the macro in Excel not to run.  

If I don't use the SHOWBLANKS = ON, the blank spaces will not appear before Total Payments.  This is the workaround that I came up with.

SUM PAYMENTS AS '<font face="arial" 
color=WHITE>    bb</font> Total Payments' OVER


The letters bb represent the blank spaces that will seem to appear in front of Total Payments because the color of the letters bb will be white on white. The only downside to this solution is that if the Excel cursor is placed on that cell where Total Payments appear, you will see the bb, otherwise it appears to be invisible. Thanks again for your solution. I'm quite sure that the MARKUP feature will come in handy in the future as well.
quote:
Originally posted by Waz:
Can you post your code ?

This message has been edited. Last edited by: Michele Brooks,


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Expert
posted Hide Post
Have you tried :

SUM PAYMENTS AS '&|nbsp;&|nbsp; Total Payments' OVER

Remove the concat bar, coulndn't get it to show without adding it...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Guru
posted Hide Post
Will try it and let you know the results. Thanks.


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Guru
posted Hide Post
[QUOTE]Originally posted by Tom Flynn:
Have you tried :
 

SUM PAYMENTS AS '&|nbsp;&|nbsp; Total Payments' OVER

Remove the concat bar, coulndn't get it to show without adding it...[/QUOTE]
I tried the following and nothing happened
-DEFAULT &|nbsp = '';
SUM PAYMENTS AS '&|nbsp  &|nbsp  Total Payments' OVER
 

This message has been edited. Last edited by: Michele Brooks,


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Expert
posted Hide Post
did you try HEADALIGN = BODY
and using SUBHEAD
Have no titles at all
instead have 3 lines of subhead
and you can style each line any way you want
ON SOMETHING SUBHEAD
"<+0>ONE<+0> <+0> ...."
"<+0>TWO<+0>THIS<+0> ..."
"<+0>THREE<+0>THAT<+0> ..."




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Guru
posted Hide Post
This will not work because subhead comes before the heading. The heading area is very sensitive because the macro template reformats the heading section. The headings on all the reports that use this template must use the same amount of lines, has to be in the same spot and the style of the heading has to be the same. Thank you for your reply.


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Expert
posted Hide Post
only the ON TABLE SUBHEAD goes before the heading
ON SOMEFIELDNAME goes after
even if SOMEFIELDNAME is a dummy field that just is the first sort BY and NOPRINT




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Guru
posted Hide Post
This still will not work because I would have to use the SHOWBLANKS = ON command and when I use that command, the macro template does not work. Here is a Car File example of the type of report that I am trying to do. I need to run this without using SHOWBLANKS = ON. Thanks.

SET NODATA = '';
SET ASNAMES = ON
-*SET SHOWBLANKS = ON
DEFINE FILE CAR
BLANK/A1 = ' ';
AYEAR/A4 = '2013';
RPT_MONTH/A12 = IF CAR EQ 'BMW'    THEN 'January'  ELSE
                IF CAR EQ 'DATSUN' THEN 'February' ELSE
				IF CAR EQ 'JAGUAR' THEN 'March'    ELSE
				IF CAR EQ 'TOYOTA' THEN 'April'    ELSE '';
DCOST/D7 =      IF RPT_MONTH EQ 'January' OR 'February' OR 'March' OR 'April' THEN DEALER_COST ELSE 0;
RCOST/D7 =      IF RPT_MONTH EQ 'January' OR 'February' OR 'March' OR 'April' THEN RETAIL_COST ELSE 0;
SCOST/D7 =      IF RPT_MONTH EQ 'January' OR 'February' OR 'March' OR 'April' THEN SALES       ELSE 0;
END
TABLE FILE CAR
HEADING

"Car Report "
"Date: January - April 2013 "
SUM DCOST AS 'Dealer Cost'     OVER
RCOST     AS '  Retail Cost'   OVER
SCOST     AS '  Sales Units'   OVER
COMPUTE COST/D12 = RETAIL_COST + DEALER_COST; AS 'Total Cost'
BY BLANK NOPRINT
ACROSS AYEAR AS ''
ACROSS RPT_MONTH AS ''
ACROSS CAR AS ''
WHERE CAR EQ 'BMW' OR 'DATSUN' OR 'JAGUAR' OR 'JENSEN' OR 'TOYOTA'
WHERE RPT_MONTH NE ' '
ON TABLE SET PAGE-NUM OFF
ON TABLE SET BYDISPLAY ON
ON TABLE SET EMPTYCELLS OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=OFF,
     ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=8,
     SQUEEZE=ON,
$
TYPE=ACROSSVALUE,ACROSS=AYEAR,JUSTIFY=CENTER,BACKCOLOR=RGB(31 46 110),COLOR='WHITE',$
TYPE=ACROSSVALUE,ACROSS=RPT_MONTH,JUSTIFY=CENTER,BACKCOLOR=RGB(31 46 110),COLOR='WHITE',$
TYPE=ACROSSVALUE,ACROSS=CAR,JUSTIFY=CENTER,BACKCOLOR=RGB(31 46 110),COLOR='WHITE',$
ENDSTYLE
END



WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Guru
posted Hide Post
I tried this and nothing happened.
quote:
Originally posted by Michele Brooks:
[QUOTE]Originally posted by Tom Flynn:
Have you tried :
 

SUM PAYMENTS AS '&|nbsp;&|nbsp; Total Payments' OVER

Remove the concat bar, coulndn't get it to show without adding it...[/QUOTE]
I tried the following and nothing happened
-DEFAULT &|nbsp = '';
SUM PAYMENTS AS '&|nbsp  &|nbsp  Total Payments' OVER
 


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report This Post
Guru
posted Hide Post
If anything doesn't work out, let the MACRO satisfy your requirement as you're using MACRO though.

after running the report, click disable macro and save it in desktop.
open it & comment out the main macro workbook.
save again, now open it by enabling macro.
click F8 for, how macro is getting executed by checking parallely then and now.
Add macro code as per your need.

Thanks,
Rifaz


-Rifaz

WebFOCUS 7.7.x and 8.x
 
Posts: 406 | Location: India | Registered: June 13, 2013Report This Post
Guru
posted Hide Post
After you mentioned doing a parallel check, I decided to test various coding tecniques using the response from Waz. I tried to replicate my report code as much as possible using the Car File. Upon further testing, I realized that the SHOWBLANKS was not the culprit that was causing the macro template not to run. The suggestion from Waz actually worked using the Car File. The only difference between my report code and the Car file report is that there is a company logo in the heading of my report code. The logo has to remain in the report heading and I'm not authorized to alter the macro. Thanks everyone for the responses and excellent suggestions. This is the code I used against the Car File.
  SET NODATA = '';
SET ASNAMES = ON
DEFINE FILE CAR
BLANK/A1 = ' ';
AYEAR/A4 = '2013';
RPT_MONTH/A12 = IF CAR EQ 'BMW'    THEN 'January'  ELSE
                IF CAR EQ 'DATSUN' THEN 'February' ELSE
				IF CAR EQ 'JAGUAR' THEN 'March'    ELSE
				IF CAR EQ 'TOYOTA' THEN 'April'    ELSE '';
DCOST/D7 =      IF RPT_MONTH EQ 'January' OR 'February' OR 'March' OR 'April' THEN DEALER_COST ELSE 0;
RCOST/D7 =      IF RPT_MONTH EQ 'January' OR 'February' OR 'March' OR 'April' THEN RETAIL_COST ELSE 0;
SCOST/D7 =      IF RPT_MONTH EQ 'January' OR 'February' OR 'March' OR 'April' THEN SALES       ELSE 0;
END
TABLE FILE CAR
HEADING
" "
" "
" "
"Car Report "
"Date: January - April 2013 "
" "
" "
" "
" "
SUM DCOST AS 'Dealer Cost'     OVER
RCOST     AS '  Retail Cost'   OVER
SCOST     AS '<font face="arial" color=WHITE>    </font>  Sales Units'   OVER
COMPUTE COST/D12 = RETAIL_COST + DEALER_COST; AS 'Total Cost'
BY BLANK NOPRINT
ACROSS AYEAR AS ''
ACROSS RPT_MONTH AS ''
ACROSS CAR AS ''
WHERE CAR EQ 'BMW' OR 'DATSUN' OR 'JAGUAR' OR 'JENSEN' OR 'TOYOTA'
WHERE RPT_MONTH NE ' '
ON TABLE SET PAGE-NUM OFF
ON TABLE SET BYDISPLAY ON
ON TABLE SET EMPTYCELLS OFF
ON TABLE NOTOTAL
ON TABLE SET SHOWBLANKS ON
ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=OFF,
     ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=8,
     SQUEEZE=ON,
$
TYPE=ACROSSVALUE,ACROSS=AYEAR,JUSTIFY=CENTER,BACKCOLOR=RGB(31 46 110),COLOR='WHITE',$
TYPE=ACROSSVALUE,ACROSS=RPT_MONTH,JUSTIFY=CENTER,BACKCOLOR=RGB(31 46 110),COLOR='WHITE',$
TYPE=ACROSSVALUE,ACROSS=CAR,JUSTIFY=CENTER,BACKCOLOR=RGB(31 46 110),COLOR='WHITE',$
ENDSTYLE
END

This message has been edited. Last edited by: Michele Brooks,


WF 8205, Windows 10
Oracle DBMS
EXL07/PDF Output
 
Posts: 244 | Registered: August 27, 2012Report 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]TYPE=TITLE in Stylesheet

Copyright © 1996-2020 Information Builders