In a guided ad-hoc report where you don't know the sequence of selected elements (user will determine that at runtime) How can we add conditional formatting to a cell when we have no clue what the Nn will be example
DEFMACRO=COND0001, MACTYPE=RULE, WHEN=N3 EQ 'RED', can the when = be a guided ad-hoc parameter?
I tried a WHEN = N* that didn’t work, tried C* and that also wasn’t successful Respectfully,
WebFOCUS 7.6 Windows, All Outputs
May 11, 2012, 06:06 AM
Danny-SRL
You say "Guided Ad-Hoc". I suppose that means that the user provides the field names. In that case, you could use:
Daniel In Focus since 1982 wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF
May 11, 2012, 08:26 AM
roy
What if the field name is not selected by the user at run time will the fex run or will an error be generated?
That was a good idea but as user are fickle if they don’t select the field at runtime we end up with the error (FOC3202) BAD VALUE IN STYLESHEET FILE AT LINE 18: MACRO=COND0001 So that will not fit the Dynamic user ad-hoc kind of conditional formatting but is was worth a try and I thank you for your attention to this request for help.
WebFOCUS 7.6 Windows, All Outputs
May 11, 2012, 08:51 AM
j.gross
You can place all the unused choices at the end of the list of verb objects, with NOPRINT, and code TYPE=(as applicable), COLUMN=fieldname, ..., WHEN=fieldname EQ 'value', $
Both references to fieldname will then be syntactically valid. If fieldname is selected by the user and appears (earlier in the list) as a visible verb-object, the rule will be applied there (and both the selection and the condition will be taken as references to the printed column); otherwise the rule will refer to the NOPRINT verb object and will be valid but will have to no effect on rendition of the report.
This assumes that all the selectable verb objects are listed in a single segment of the synonym. If that is not so, there could be side-effects from the inclusion of the additional fields.This message has been edited. Last edited by: j.gross,
May 11, 2012, 09:30 AM
roy
That worked thank you...
Let me share Dynamic summaries from a guided parameter report with 7.6.4 where multiple BY is not recognized
might be a useful tip for someone.
-* Set up and strip the user parameter into usable code for the table file note I add NOPRINT to each &USERSELECT
in my world the SQL stuff that is the "MST" file then
TABLE FILE SQLOUT SUM FST &THESUMP BY &THEBY NOPRINT
This query has distinct records at the detail if (all) columns are selected
But if you selected a subset of the columns it looked like there were duplicates rows
By dynamically linking the user selection with the "by" any possible summary is possible this is probably a mute point with a higher version of web focus...