Focal Point
CONDITIONAL STYLING
March 26, 2008, 02:07 AM
arvindCONDITIONAL STYLING
HI ppl,
In one of my reports , i have to conditionally highlight a row based on the condition if any of the specific three column values are equal to 'NULL'. This is possible when the position of the columns are not shuffled. But we are giving business users the privilige to change column positions in the report using checkboxes and textboxes in the input page. Once the column position is changed , this conditional highlighting macro throws an error because it does the conditional styling taking a particular column number ( For eg - N10) not by column name. Is there any alternative for conditional styling ???
please advice
arvind
WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
March 26, 2008, 03:31 AM
Tony AUse column name notation as opposed to column number e.g.
TYPE=DATA, COLUMN=COUNTRY, FOCEXEC=[somefex](Country=COUNTRY), $
as opposed to -
TYPE=DATA, COLUMN=N1, FOCEXEC=[somefex](Country=N1), $
Also, try downloading the "WebFOCUS Quick Reference card" DN4500671. There may be a later version than the one I have (DN4500671.1104) but it's still good.
Finally, get used to the search facility above. This subject has been covered many times before in various guises.
T
In FOCUS since 1986 | WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2 | | |
WebFOCUS App Studio 8.2.06 standalone on Windows 10 | |
March 26, 2008, 05:47 AM
arvindhi tony ,
thank you for your reply . but i already tried it and it highlights the particular column data only , not the complete row..i might be wrong but i checked the output,,yes i will use the search option above..
thank yo u , sir
WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
March 26, 2008, 06:00 AM
Tony AYou really are not helping yourself are you?
Work it out. If you have COLUMN=[column name] in your styling and only that column gets styled when the conditional statement is true then
Leave the COLUMN=[column name] out! it's perfectly simple to understand -
APP PREPENDPATH IBISAMP
TABLE FILE CAR
SUM RCOST
DCOST
BY CAR
BY MODEL
BY COUNTRY
ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE NOLEAD
ON TABLE SET STYLE *
TYPE=DATA, BACKCOLOR=RGB(220 220 255), WHEN=COUNTRY EQ 'ENGLAND', $
ENDSTYLE
END
T
In FOCUS since 1986 | WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2 | | |
WebFOCUS App Studio 8.2.06 standalone on Windows 10 | |
March 26, 2008, 10:53 AM
GuyYou might want to create a define that is "true" when any of your column conditions are met.
Then you use the conditional styling for the row when the define has the "true" value.
WebFOCUS 7.6.4
Windows XP against an Oracle Database mainly SCT Banner Higher Education ODS and EDW
Various output formats
Guy Brenckle
Budget Analyst
University of Northern Colorado
March 26, 2008, 04:35 PM
WazArvind do you have other styling on these columns/rows, if you put a conditional style on a row with other styling in place, you may only get some of the styling coming through. You may have to apply the conditional style to each column to highlight the row.
I agree with Guy, If you create a define field that is a flag to turn your style on, then it can be as complex as you want, then the styling can be relatively simple.
Waz...Prod: | WebFOCUS 7.6.10/8.1.04 | Upgrade: | WebFOCUS 8.2.07 | OS: | Linux |
Outputs: | HTML, PDF, Excel, PPT |
In Focus since 1984 |
Pity the lost knowledge of an old programmer! |
March 27, 2008, 01:14 AM
arvindhi guy , waz
thanks for your reply .. yes i have other stylinf formats for rows..but i tried the conditional styling on each column...it wasnt workin.. i will try the define method...
thank you very much
WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
March 27, 2008, 02:03 AM
arvindhi guys,
i have tried ur solution its not workin..i will explain you the situation..
i got three columns
Nextstepinstrucitons position - 6 in default report
next answer position - 7 in default report
notification position - 10 in default report..
and i have to highlight all the rows where any one of these column values is equal to 'NULL'
now the problem is we have provided an user input page..where the user can select or deselect the columns in the report.. If the user deselects any one of these columns then the macro defined throws an error..
I used your method of defining a flag in Define statement..it throws the same error..
Any other suggestions please???
thank you very much
WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
March 27, 2008, 03:50 AM
Tony AArvind,
To use the column name in a macro the column
must be present in the report. Try including the column anyway with a NOPRINT if the user has not selected it.
T
In FOCUS since 1986 | WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2 | | |
WebFOCUS App Studio 8.2.06 standalone on Windows 10 | |
March 27, 2008, 05:03 PM
Wazarvind, could you post the code including any define, table with the stylesheet. It will make it alot easier.
Waz...Prod: | WebFOCUS 7.6.10/8.1.04 | Upgrade: | WebFOCUS 8.2.07 | OS: | Linux |
Outputs: | HTML, PDF, Excel, PPT |
In Focus since 1984 |
Pity the lost knowledge of an old programmer! |
March 28, 2008, 12:21 AM
susannahI like what all the guys have said so far:
DEFINE FILE thing
FLAG/I1=IF Nextstepinstrucitons IS MISSING THEN 1
ELSE IF next answer IS MISSING THEN 1
ELSE IF notification position IS MISSING THEN 1 ELSE 0;
...
(define your NULL however you need to)
END
-RUN
TABLE FILE thing
PRINT FLAG NOPRINT
...let your users do whatever they want here
... you don't care, you've already measured the highlight condition
ON TABLE SET STYLE *
TYPE=DATA,BACKCOLOR=PURPLE,WHEN=FLAG IS 1,$
END
| In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID |