Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] Column Title Formatting
Go
New
Search
Notify
Tools
Reply
  
[SHARING] Column Title Formatting
 Login/Join
 
Expert
posted
I was mucking around with MARKUP=ON, and found that you can style the column titles, in fact bits of the titles.

Have a look at this, the posibilities are quite interesting.

-SET &RELNO = EDIT(&FOCREL,'$$$$999') ;

-SET &_V71 = IF &RELNO GE 710 AND &RELNO LE 760 THEN '-*' ELSE '' ;
-SET &_V76 = IF &RELNO GE 760 THEN '-*' ELSE '' ;

TABLE FILE CAR
PRINT CAR   AS '[b]Car[/b],[i]Name[/i]'
      MODEL AS '[i]<u>M</u>odel[/i]'
&_V71.EVAL BY COUNTRY AS '<font face="arial" size=12 color=#FF9933>Country</font>,<font face="arial" size=8 color=#0066FF>Name</font>'
&_V76.EVAL BY COUNTRY AS '[b]Country[/b],<sup>Name</sup>'
ON TABLE PCHOLD FORMAT PDF
-*ON TABLE SET NEWLAYOUT ON
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
UNITS=CM, PAGESIZE='A4', LEFTMARGIN=0.635000, RIGHTMARGIN=0.635000,
    TOPMARGIN=0.635000, BOTTOMMARGIN=0.635000,
    SQUEEZE=ON,
    ORIENTATION=LANDSCAPE, $
TYPE=REPORT, FONT=ARIAL, SIZE=10, MARKUP=ON, $
END

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


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6136 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Virtuoso
posted Hide Post
That's nice, Waz. A perfect way of styling PDF components that defied styling using normal stylesheet commands.
I just had to change the [ and ] by < and > and it ran like a charm. Good One


GamP

- Using AS 8.2.01 on Windows 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
Excellent spotting Waz, and this gets my vote on a great tip!! Good One

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5617 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Master
posted Hide Post
So nice Waz. By this we get more control over styling in PDF.
 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Reply With QuoteReport This Post
Virtuoso
posted Hide Post
quote:
this gets my vote on a great tip

Excellent tip, indeed! Good One Waz!



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
 
Posts: 1533 | Registered: August 12, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Thanks GamP for spotting the [] issue, I've fixed it up.

Good One

I assume the posting to the forum did it ??


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6136 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
Traps for young players


Be aware that if your data has
<char(s)>
it will be interpreted as a tag.

Seems that < char[s)> is OK. Note th space between the < and the char.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6136 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Waz, thanks for this excellent tip!

Now, why didn't I know about this? I'll tell you why - it's not mentioned in the documentation, that's why!

"WebFOCUS Version 7 Release 6.5 introduced the ability to format any portion of the text entered in a text object on a report and hold it in PDF format."

This is from 'WebFOCUS New Features - Version 7 Release 6.9'. The syntax for "MARKUP" is nowhere to be found in the v7.6.5 or v7.6.8 documentation that I read before I go to bed every night.

The syntax finally shows up in the Summary of New Features for v7.6.9. Some interesting stuff has been added to v7.6.9:

"A report that contains markup tags in a text object is called a markup report. Starting with WebFOCUS Version 7 Release 6.9, a markup report can be generated as a PDF, DHTML, or PPT output file. A markup report does not have to be created in the Document Composer tool. You can use StyleSheet syntax to add drawing objects and markup tags to any report request saved in one of the supported formats.

In addition, in WebFOCUS Version 7 Release 6.9, an enhancement has been added to the markup syntax that enables you to adjust line spacing for a text object.

This new feature document describes the markup tags and options supported in WebFOCUS Version 7 Release 6.9."


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
quote:
it's not mentioned in the documentation


Well I didn't find it any place either. I'd used the tags in headings, then in data to solve a superscript issue. And I thought where else would this work, and bingo, there you are.

I wonder if it works in other places as well, like EMR, or data in SUBTOTAL, etc. It'll be interesting to test.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.06OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Know The Code

 
Posts: 6136 | Location: 33.8688° S, 151.2093° E | Registered: October 31, 2006Reply With QuoteReport This Post
Gold member
posted Hide Post
I just came across this post, and thought it may be a possible answer to an issue that has troubled me at my client site.

We have reports on our dashboard are broken up by section, and we have been using column titles as section headers, since that is much simpler than other methods we have tried. In addition, we enable columns to be sorted by clicking on the column title, and we use stylesheet links to do this. So, the column titles always are the color blue and are underlined.

This is an example of what I am talking about:

TABLE FILE CAR
PRINT 
  COUNTRY AS 'Country'
  CAR AS 'Car 1,,Car'
  MODEL AS 'Model'
  COUNTRY AS 'Country'
  CAR AS 'Car 2,,Car'
  MODEL AS 'Model'
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT,GRID=OFF,$
TYPE=TITLE,COLUMN=N1,FOCEXEC=car,$
TYPE=TITLE,COLUMN=N2,FOCEXEC=car,$
TYPE=TITLE,COLUMN=N3,FOCEXEC=car,$
TYPE=TITLE,COLUMN=N4,FOCEXEC=car,$
TYPE=TITLE,COLUMN=N5,FOCEXEC=car,$
TYPE=TITLE,COLUMN=N6,FOCEXEC=car,$
END



The issue that we have is that the 'section title' portion of the column title also looks like a link, and we would like it to not show as a link. In other words, have it display as black and not underlined.

Using the technique in this post, I can have the 'section title' display in black, but I could not get rid of the underline. Can we use this technique to override the underline when a stylesheet link is used?


WebFOCUS 8
 
Posts: 74 | Location: Gahanna, OH | Registered: September 22, 2009Reply With QuoteReport This Post
Expert
posted Hide Post
Try HEADING:

 
APP PREPENDPATH IBISAMP
-RUN
SET SHOWBLANKS = ON
-RUN
TABLE FILE CAR
HEADING
"                             Car 1<+0>                             Car 2"
" "
PRINT 
  COUNTRY AS 'Country'
  CAR AS 'Car'
  MODEL AS 'Model'
  COUNTRY AS 'Country'
  CAR AS 'Car'
  MODEL AS 'Model'
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT,GRID=OFF,$
TYPE=HEADING, HEADALIGN=BODY, COLSPAN=6, STYLE=BOLD, COLOR=BLACK,$
TYPE=HEADING, ITEM=1, COLSPAN=3, $
TYPE=HEADING, ITEM=2, COLSPAN=3, $
TYPE=TITLE,COLUMN=N1,FOCEXEC=car,$
TYPE=TITLE,COLUMN=N2,FOCEXEC=car,$
TYPE=TITLE,COLUMN=N3,FOCEXEC=car,$
TYPE=TITLE,COLUMN=N4,FOCEXEC=car,$
TYPE=TITLE,COLUMN=N5,FOCEXEC=car,$
TYPE=TITLE,COLUMN=N6,FOCEXEC=car,$
END
-EXIT


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1958 | Location: Centennial, CO | Registered: January 31, 2006Reply With QuoteReport This Post
<FreSte>
posted
Or

  CAR AS '<font onclick="return false" style="text-decoration:none; color:black;">Car 1</font>,,Car'
 
Reply With QuoteReport This Post
Gold member
posted Hide Post
FreSte, your solution works great! That is exactly what I was looking for.

Thanks for your suggestions!


WebFOCUS 8
 
Posts: 74 | Location: Gahanna, OH | Registered: September 22, 2009Reply With QuoteReport This Post
Silver Member
posted Hide Post
I came across this post and it was so helpful. I want to use background color within title but it doesn't work. Below is the across title with formatting I have, can someone be able to help? Thank you!

ACROSS CRS_N AS '[b]<font face="arial">R - Waitlisted
X - Completed
E - Enrolled
<font color=rgb[0 0 0) background-color=rgb[127 176 0)>Green = Certified</font>
<font color=rgb[0 0 0) background-color=red>Red = Expired</font>
<span style="color:rgb[0 0 0);background-color:yellow;">Yellow = Needs work</span></font>[/b]'

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


WebFOCUS 8.2.05
Windows 2003
Excel, HTML, PDF
 
Posts: 40 | Registered: April 22, 2009Reply With QuoteReport This Post
Master
posted Hide Post
quote:
Originally posted by JJ:
I came across this post and it was so helpful. I want to use background color within title but it doesn't work. Below is the across title with formatting I have, can someone be able to help? Thank you!

ACROSS CRS_N AS '[b]<font face="arial">R - Waitlisted
X - Completed
E - Enrolled
<+0><font color=rgb[0 0 0) background-color=rgb[127 176 0)>Green = Certified</font>
<+0><font color=rgb[0 0 0) background-color=red>Red = Expired</font><+0>
<span style="color:rgb[0 0 0);background-color:yellow;">Yellow = Needs work</span></font>[/b]'

Could you post a full example using the CAR file? I'm having a hard time understanding what this means


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 497 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
Silver Member
posted Hide Post
TABLE FILE CAR
PRINT CAR   AS '<b><font face="arial" color=black background-color=green>Car</font><br><font color=black background-color=red>Name</font></b>'
      MODEL AS '<b><font face="arial color=black background-color=yellow">Model</font>'

ON TABLE PCHOLD FORMAT EXL2K
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
UNITS=CM, PAGESIZE='A4', LEFTMARGIN=0.635000, RIGHTMARGIN=0.635000,
    TOPMARGIN=0.635000, BOTTOMMARGIN=0.635000,
    SQUEEZE=ON,
    ORIENTATION=LANDSCAPE, $
TYPE=REPORT, FONT=ARIAL, SIZE=10, MARKUP=ON, $
END


Background color doesn't work. Thank you!


WebFOCUS 8.2.05
Windows 2003
Excel, HTML, PDF
 
Posts: 40 | Registered: April 22, 2009Reply With QuoteReport This Post
Master
posted Hide Post
Everything that I'm seeing in the docs shows that MARKUP=ON only works on text output objects like PDF or PPTX.

https://webfocusinfocenter.informationbuilders.com


Hallway
WF(Prod):8202M
WF(Test):8202M
OS/Platform:Win 10
Outputs:All
 
Posts: 497 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SHARING] Column Title Formatting

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.