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.
I am trying to use the value in a field in our table to assign the color of a row.
This is what I have:
TABLE FILE RPTDATA
PRINT NAME TYPE COLOR
BY TYPE NOPRINT
ON TABLE HOLD AS JUNK FORMAT PDF
ON TABLE SET STYLE *
TYPE=DATA, BACKCOLOR=RGB(COLOR),COLOR=RGB(000 000 000), $
ENDSTYLE
END
-RUN
Of course that gives me an error: FOC3202) BAD VALUE IN STYLESHEET FILE AT LINE 40: BACKCOLOR=RGB(COLOR)
THe Color field is in the correct format: 245 235 215.
I could have sworn this worked in the past, but I can't find anything to support it.
Thoughts?
Thanks
This is on WF 8.0.0.5This message has been edited. Last edited by: <Kathryn Henning>,
WebFOCUS 7.6 - Windows Output formats: HTML, Excel 2000, PDF, Active HTML
Waz is right. Never seen this before, but the stylesheet lines can be generated for you like:
DEFINE FILE CAR
NAME/A20 = COUNTRY;
TYPE/A20 = CAR;
COLOR/A12 = DECODE SEATS(
1 '050 050 050'
2 '050 150 250'
4 '150 250 050'
5 '222 111 000'
DEFAULT '111 000 200'
);
COLORLINES/A150 = 'TYPE=DATA, BACKCOLOR=RGB(' || COLOR || '), COLOR=RGB(000 000 000), WHEN=COLOR EQ ''' || COLOR || ''' ,$';
END
-* --- Generate STYLESHEET lines to include in report
TABLE FILE CAR
BY COLORLINES
ON TABLE HOLD AS HLDSTYLE FORMAT ALPHA
ON TABLE SET HOLDLIST PRINTONLY
END
-RUN
TABLE FILE CAR
PRINT
NAME
TYPE
COLOR
SEATS
BY TYPE NOPRINT
ON TABLE SET PAGE NOPAGE
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT ,WRAP=OFF ,$
TYPE=REPORT ,BORDER=1 ,BORDER-COLOR=RGB(210 210 210) ,$
TYPE=REPORT ,UNITS=PTS ,FONT='VERDANA', SIZE=8 ,$
TYPE=TITLE ,STYLE=BOLD ,BACKCOLOR=RGB(230 230 230) ,$
TYPE=DATA ,TOPGAP=3 ,BOTTOMGAP=3 ,$
-INCLUDE HLDSTYLE
ENDSTYLE
END
DEFINE FILE CAR
CLR/A20='200 100 235';
END
TABLE FILE CAR
PRINT CLR COUNTRY CAR
ON TABLE HOLD AS TEST
END
-RUN
-READ TEST, &CLR.A12.
-TYPE &CLR
TABLE FILE CAR
PRINT CLR COUNTRY CAR
ON TABLE SET STYLE *
TYPE=DATA, BACKCOLOR=RGB(&CLR),$
ENDSTYLE
END
-Rifaz
WebFOCUS 7.7.x and 8.x
Posts: 406 | Location: India | Registered: June 13, 2013