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.
1) I would like to conditionally modify the font colour of data rows.
2) I also would like to set the column width of certain columns.
Doing these two in the same report is causing me problems:
1) The data row conditional colour does not work on columns where WRAP is specified - for both Excel and HTML.
2) Commenting-out the data row background colour makes the numeric columns left-justified - for HTML, the justification problem is not an issue in Excel.
-SET &ECHO=ALL;
-SET &WFFMT='HTML';
-*-SET &WFFMT='EXL2K';
SET PAGE=NOLEAD
SET HTMLCSS=ON
SET BYDISPLAY=ON
DEFINE FILE CAR
COL_FLAG/A1 = IF COUNTRY EQ 'ITALY' THEN 'Y' ELSE 'N';
END
TABLE FILE CAR
SUM
WARRANTY
STANDARD
HEIGHT AS 'A LONG COLUMN TITLE FOR HEIGHT'
WEIGHT AS 'A LONG COLUMN TITLE FOR WEIGHT'
LENGTH AS 'A LONG COLUMN TITLE FOR LENGTH'
WIDTH
SALES
FUEL_CAP AS 'FUEL CAP'
BHP AS 'BRUTE HORSEPOWER'
COL_FLAG
BY COUNTRY AS 'COUNTRY'
BY CAR AS 'CAR'
ON TABLE SET STYLE *
TYPE=DATA, BACKCOLOR=(WHITE SILVER), $
TYPE=DATA, COLOR=RED, WHEN=COL_FLAG EQ 'Y', $
TYPE=REPORT, COLUMN=COUNTRY, WRAP=OFF, $
TYPE=REPORT, COLUMN=WARRANTY, WRAP=OFF, $
TYPE=REPORT, COLUMN=WEIGHT, WRAP=80, $
TYPE=REPORT, COLUMN=HEIGHT, WRAP=80, $
TYPE=REPORT, COLUMN=LENGTH, WRAP=80, $
ENDSTYLE
ON TABLE PCHOLD FORMAT &WFFMT
END
This message has been edited. Last edited by: Francis Mariani,
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
It seems the only workaround is to repeat the styling for the columns where other styling is specified:
-SET &ECHO=ALL;
-SET &WFFMT='HTML';
-*-SET &WFFMT='EXL2K';
SET PAGE=NOLEAD
SET HTMLCSS=ON
SET BYDISPLAY=ON
DEFINE FILE CAR
COL_FLAG/A1 = IF COUNTRY EQ 'ITALY' THEN 'Y' ELSE 'N';
END
TABLE FILE CAR
SUM
WARRANTY
STANDARD
HEIGHT AS 'A LONG COLUMN TITLE FOR HEIGHT'
WEIGHT AS 'A LONG COLUMN TITLE FOR WEIGHT'
LENGTH AS 'A LONG COLUMN TITLE FOR LENGTH'
WIDTH
SALES
FUEL_CAP AS 'FUEL CAP'
BHP AS 'BRUTE HORSEPOWER'
COL_FLAG
BY COUNTRY AS 'COUNTRY'
BY CAR AS 'CAR'
ON TABLE SET STYLE *
TYPE=DATA, BACKCOLOR=(WHITE SILVER), $
TYPE=DATA, COLOR=RED, WHEN=COL_FLAG EQ 'Y', $
TYPE=DATA, COLUMN=COUNTRY, COLOR=RED, WHEN=COL_FLAG EQ 'Y', $
TYPE=DATA, COLUMN=WARRANTY, COLOR=RED, WHEN=COL_FLAG EQ 'Y', $
TYPE=DATA, COLUMN=HEIGHT, COLOR=RED, WHEN=COL_FLAG EQ 'Y', $
TYPE=DATA, COLUMN=WEIGHT, COLOR=RED, WHEN=COL_FLAG EQ 'Y', $
TYPE=DATA, COLUMN=LENGTH, COLOR=RED, WHEN=COL_FLAG EQ 'Y', $
TYPE=REPORT, COLUMN=COUNTRY, WRAP=OFF, $
TYPE=REPORT, COLUMN=WARRANTY, WRAP=OFF, $
TYPE=REPORT, COLUMN=WEIGHT, WRAP=80, $
TYPE=REPORT, COLUMN=HEIGHT, WRAP=80, $
TYPE=REPORT, COLUMN=LENGTH, WRAP=80, $
ENDSTYLE
ON TABLE PCHOLD FORMAT &WFFMT
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
Got it Francis, but the only matter I have is that I need to wrap a column for a PDF output and can't figure how to combine it with specifying it twice?
$
TYPE=REPORT,
COLUMN=NAME,
WRAP=3.00000,
$
TYPE = DATA, BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
TYPE = DATA, BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,$
This won't work:
$
TYPE=DATA,
COLUMN=NAME,
WRAP=3.00000,
$
TYPE = DATA, BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
TYPE = DATA, BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,$
This won't work either:
$
$
TYPE=REPORT,
COLUMN=NAME,
WRAP=3.00000,
BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
$
TYPE=REPORT,
COLUMN=NAME,
WRAP=3.00000,
BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,
$
TYPE = DATA, BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
TYPE = DATA, BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,$
WebFOCUS 8105m Windows 7, All Outputs
Member of the Benelux Usergroup
Posts: 198 | Location: Amsterdam | Registered: August 24, 2011
SWES, what if you flip the order of your Style Commands. Since Style Sheets read top down and it seems that the TYPE=DATA command is removing your WRAP command maybe having the below will work better. Also why are you issuing TYPE=REPORT? I would just have used TYPE=DATA, and then if needed I would set my TYPE=HEADING for the specific column.
$
TYPE = DATA, BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
TYPE = DATA, BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,$
TYPE=REPORT,
COLUMN=NAME,
WRAP=3.00000,
BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
$
TYPE=REPORT,
COLUMN=NAME,
WRAP=3.00000,
BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,
$
Eric Woerle 8.1.05M Gen 913- Reporting Server Unix 8.1.05 Client Unix Oracle 11.2.0.2
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013
Thank you for your reply Eric. Changing the order is what I tried before, what happens is that the WRAP command doesn't work anymore. What do you mean by changing to TYPE=HEADING?
$
TYPE = DATA, BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
TYPE = DATA, BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,$
TYPE=HEADING,
COLUMN=CLIENTNAME,
WRAP=3.00000,
BACKCOLOR = RGB(215 235 194), WHEN = FLAG EQ 1,$
$
TYPE=HEADING,
COLUMN=CLIENTNAME,
WRAP=3.00000,
BACKCOLOR = RGB(255 255 255), WHEN = FLAG EQ 2,
$
Like this?
Thanks, SWES
WebFOCUS 8105m Windows 7, All Outputs
Member of the Benelux Usergroup
Posts: 198 | Location: Amsterdam | Registered: August 24, 2011