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     SOLVED Text Row Formatting in FML
Go
New
Search
Notify
Tools
Reply
  
SOLVED Text Row Formatting in FML
 Login/Join
 
Silver Member
posted
I have a FML report and within the report we have a couple of text lines, just to seperate and space out the data.
I also have one of the columns a different color to make it stand out.
This works great where there is data on the rows, however for the blank text rows, it skips the color. I can make the whole text row a different color but it seems like there is no way to color just that cell on a blank text row.
I created a simple example below.
TABLE FILE CAR
SUM 
     MPG
BY  LOWEST BODYTYPE
FOR
     BHP
" " LABEL R1 OVER 
'     70' AS '     70' LABEL R2 OVER 
'     90' AS '     90' LABEL R3 OVER 
" " LABEL R4 OVER 
'    241' AS '    241' LABEL R5
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE SET BYDISPLAY ON 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=REPORT,
     GRAPHCOLOR='GREEN',
     GRAPHCOLORNEG='RED',
$
TYPE=REPORT,
     LINES-PER-PAGE=10,
     REPORT-VIEW=GRID,
$
TYPE=DATA,
     COLUMN=N3,
     BACKCOLOR='SILVER',
$
TYPE=TITLE,
     COLUMN=N3,
     BACKCOLOR='SILVER',
$
TYPE=FREETEXT,
     LABEL=R4,
     COLUMN=N3,
	 BACKCOLOR='SILVER',
$
ENDSTYLE
END


Anybody have any ideas how I can get Column for those blank text lines to color the same as when there is data.

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


WF 81.5, Windows7
AS/400 Database.
All Outputs

 
Posts: 46 | Registered: November 26, 2008Reply With QuoteReport This Post
Expert
posted Hide Post
The LABEL text rows have only once cell that spans all the columns in the row (like HEADING, SUBHEAD, FOOTING, SUBFOOT) - you cannot style the individual cells - they don't exist.

However, the following works poorly - use HEADALIGN=BODY - though I don't think this is kosher for LABELs:

TABLE FILE CAR
SUM 
MPG

BY  LOWEST BODYTYPE

FOR BHP

" <+0> <+0> " LABEL R1 OVER 
'     70' AS '     70' LABEL R2 OVER 
'     90' AS '     90' LABEL R3 OVER 
" <+0> <+0> " LABEL R4 OVER 
'    241' AS '    241' LABEL R5

ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE SET BYDISPLAY ON 
ON TABLE PCHOLD FORMAT PDF

ON TABLE SET STYLE *

TYPE=REPORT,
     GRAPHCOLOR='GREEN',
     GRAPHCOLORNEG='RED',
$
TYPE=REPORT,
     LINES-PER-PAGE=10,
     REPORT-VIEW=GRID,
$
TYPE=DATA,
     COLUMN=N3,
     BACKCOLOR='SILVER',
$
TYPE=TITLE,
     COLUMN=N3,
     BACKCOLOR='SILVER',
$
TYPE=FREETEXT, HEADALIGN=BODY, $

TYPE=FREETEXT, LABEL=R1, OBJECT=TEXT, ITEM=3, BACKCOLOR='BLUE', $

TYPE=FREETEXT, LABEL=R4, OBJECT=TEXT, ITEM=3, BACKCOLOR='RED', $

ENDSTYLE
END

Unfortunately, the background colour overflows to the right. So, this example seems to work - add an extra column to the right of MPG and colour it white. (In these examples I'm using red, blue and purple for illustrative purposes).

SET NODATA = ''

TABLE FILE CAR
SUM 
MPG
MPG AS ''

BY  LOWEST BODYTYPE

FOR BHP

" <+0> <+0> <+0> " LABEL R1 OVER 
'     70' AS '     70' LABEL R2 OVER 
'     90' AS '     90' LABEL R3 OVER 
" <+0> <+0> <+0> " LABEL R4 OVER 
'    241' AS '    241' LABEL R5

ON TABLE NOTOTAL
ON TABLE SET PAGE-NUM NOLEAD 
ON TABLE SET BYDISPLAY ON 
ON TABLE PCHOLD FORMAT PDF

ON TABLE SET STYLE *

TYPE=REPORT,
     GRAPHCOLOR='GREEN',
     GRAPHCOLORNEG='RED',
$
TYPE=REPORT,
     LINES-PER-PAGE=10,
     REPORT-VIEW=GRID,
$
TYPE=DATA,
     COLUMN=N3,
     BACKCOLOR='SILVER',
$
TYPE=TITLE,
     COLUMN=N3,
     BACKCOLOR='SILVER',
$
TYPE=FREETEXT, HEADALIGN=BODY, $

TYPE=FREETEXT, LABEL=R1, OBJECT=TEXT, ITEM=3, BACKCOLOR='BLUE', $

TYPE=FREETEXT, LABEL=R4, OBJECT=TEXT, ITEM=3, BACKCOLOR='RED', $

TYPE=REPORT, COLUMN=MPG(2), COLOR= PURPLE, $

ENDSTYLE
END


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
Silver Member
posted Hide Post
Thanks Francis.

I had a feeling that because it's a freeform row, styling the individual cell wasn't going to really be possible.
Your example works great until I add another column and I am trying to make the second column of data the colored one. Then the colors overflow to the right again and adding an additional column and coloring it white doesn't fix it.

Looks like I might have to try and think of a different approach but I really appreciate your help.


WF 81.5, Windows7
AS/400 Database.
All Outputs

 
Posts: 46 | Registered: November 26, 2008Reply With QuoteReport This Post
Expert
posted Hide Post
I think the colour should not overflow if you always have a white column at the end. You also have to add the appropriate number of separators <+0> that break the labels into multiple cells.


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
Silver Member
posted Hide Post
You're are a genius and my hero. I did not know about the <+0> separators.
Now to apply this to my real report.

Thank you so much


WF 81.5, Windows7
AS/400 Database.
All Outputs

 
Posts: 46 | Registered: November 26, 2008Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     SOLVED Text Row Formatting in FML

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