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 have an error report and one column value gives the column name of the error for that row. I need to highlight that value. I created a CAR results for an example. Here I would need the value in BODYTYPE to be highlighted because that is the column with the ERROR. The ERROR column can be any other column, this is just a basic example. Anyone have a way to do this?
DEFINE FILE CAR
ERROR/A20='BODYTYPE';
END
TABLE FILE CAR
PRINT
ERROR
CAR.COMP.CAR
CAR.CARREC.MODEL
CAR.BODY.BODYTYPE
CAR.BODY.SEATS
CAR.SPECS.LENGTH
CAR.WARANT.WARRANTY
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/BIRS05/_EDAHOME/ETC/endeflt.sty,
$
ENDSTYLE
END
This message has been edited. Last edited by: <Emily McAllister>,
DEFINE FILE CAR
ERROR/A20='BODYTYPE';
END
TABLE FILE CAR
PRINT
ERROR
CAR.COMP.CAR
CAR.CARREC.MODEL
CAR.BODY.BODYTYPE
CAR.BODY.SEATS
CAR.SPECS.LENGTH
CAR.WARANT.WARRANTY
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=CAR , COLOR=RED, WHEN=ERROR EQ 'CAR' , $
TYPE=DATA, COLUMN=MODEL , COLOR=RED, WHEN=ERROR EQ 'MODEL' , $
TYPE=DATA, COLUMN=BODYTYPE, COLOR=RED, WHEN=ERROR EQ 'BODYTYPE', $
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
I second the WHEN. Just discovered it a couple weeks ago as I needed to essentially create a stop light for certain cells based upon comparison values and it works like a charm.
Another question, I can have multiple error columns for a row, but I need to return one unique row with all the error columns highlighted. For example: ERROR CAR MODEL BODYTYPE SEATS LENGTH WARRANTY BODYTYPE JAGUAR V12XKE AUTO CONVERTIBLE 2 190 12 MONTHS OR 12000 MILES CAR JAGUAR V12XKE AUTO CONVERTIBLE 2 190 12 MONTHS OR 12000 MILES
I want BODYTYPE and CAR to be RED in a single line and would hide the ERROR column so there is only one row. CAR MODEL BODYTYPE SEATS LENGTH WARRANTY JAGUAR V12XKE AUTO CONVERTIBLE 2 190 12 MONTHS OR 12000 MILES
Originally posted by Mikey: Thanks, I have 110 columns to do and that looks like it will work! How can we do this in the Report Painter?
Well, after giving it a try, I would say that you can't.
You can create a DEFINE field "ERROR" easily enough in both InfoAssist and App Studio/Report Painter, but after that things get murky real fast...
If you are starting from scratch in InfoAssist, you can right-click on the "CAR" column, then select "More -> Traffic Light Conditions". You can then select the ERROR field and set "Equal to -> CAR". But I don't see how to GUI your way to getting a WHEN statement to generate. So that's useless.
If you are not starting from scratch, and have saved Francis' code in a FEX file, InfoAssist will not open up that FEX file in GUI mode. But App Studio/Report Painter opens up that same FEX file in GUI mode, and changes Francis' code to this:
TABLE FILE CAR
PRINT
ERROR
CAR.COMP.CAR
CAR.CARREC.MODEL
CAR.BODY.BODYTYPE
CAR.BODY.SEATS
CAR.SPECS.LENGTH
CAR.WARANT.WARRANTY
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
$
TYPE=DATA,
COLUMN=N2,
COLOR='RED',
WHEN=N1 EQ 'CAR',
$
TYPE=DATA,
COLUMN=N3,
COLOR='RED',
WHEN=N1 EQ 'MODEL',
$
TYPE=DATA,
COLUMN=N4,
COLOR='RED',
WHEN=N1 EQ 'BODYTYPE',
$
ENDSTYLE
END
In App Studio/Report Painter, you can left-click the CAR column, then click the "Appearance" menu choice at the top and a traffic light icon will appear next to a drop down list. In that list, you can select "Add/Edit Conditions". Interestingly, the FEX code that should be considered traffic light conditions isn't recognized. But you can create new traffic light conditions for the CAR column. After choosing to create a new condition, you can select field ERROR, relation "is equal to" and value "CAR". But that seems to be all that you can do. Again, no WHEN statement option. So that's useless as well.
I'm sure Francis is hard at work today trying to figure this out, so I will defer to him.
App Studio WebFOCUS 8.1.05M Windows, All Outputs
Posts: 594 | Location: Michigan | Registered: September 04, 2015
DEFINE FILE CAR
ERROR/A20='|BODYTYPE|CAR|';
END
TABLE FILE CAR
PRINT
ERROR
CAR.COMP.CAR
CAR.CARREC.MODEL
CAR.BODY.BODYTYPE
CAR.BODY.SEATS
CAR.SPECS.LENGTH
CAR.WARANT.WARRANTY
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=DATA, COLUMN=CAR , COLOR=RED, WHEN=ERROR LIKE '%|CAR|%' , $
TYPE=DATA, COLUMN=MODEL , COLOR=RED, WHEN=ERROR LIKE '%|MODEL|%' , $
TYPE=DATA, COLUMN=BODYTYPE, COLOR=RED, WHEN=ERROR LIKE '%|BODYTYPE|%', $
ENDSTYLE
END
I came up with a way to get the column number that has an error and place that in the first column, but now I need 2 title rows. I tried SUBHEAD, but it displays above the report header. Any way to get 2 title rows?
DEFINE FILE CAR
Error_Column/I3=IF SEATS EQ 2 THEN 1
ELSE IF SEATS EQ 4 THEN 3
ELSE 5;
END
TABLE FILE CAR
PRINT
Error_Column
CAR.COMP.CAR
CAR.CARREC.MODEL
CAR.BODY.BODYTYPE
CAR.BODY.SEATS
CAR.SPECS.LENGTH
CAR.WARANT.WARRANTY
HEADING
"Standard Report"
"ABC123 CAR"
"Company XYZ"
ON TABLE SUBHEAD
" <+0>1<+0>2<+0>3<+0>4<+0>5<+0>6"
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT EXL07
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = IBFS:/EDA/BIRS05/_EDAHOME/ETC/endeflt.sty,
$
TYPE=TABHEADING,
HEADALIGN=BODY,
$
ENDSTYLE
END