Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Conditional Column Styling

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Conditional Column Styling
 Login/Join
 
Gold member
posted
Hi!
In my report, i have to conditionally highlight the columns based on the condition, if the field NIGHT_IND is 'Y'.
In our report we have IN and OUT events for 7days.All the In and Out fields are coming from define file.
We already have a field called 'NIGHT_IND', with value 'Y' or 'N', to identify, whether that field needs to be highlighted or not.
I have tried to put the condition for 2 column, but its not working fine.

Please Help.

Thanks
Arpita

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 43 | Registered: October 04, 2010Report This Post
Virtuoso
posted Hide Post
Should work just fine, maybe you can show what you're trying to do?

A few things to check for:
- Is your NIGHT_IND column in your TABLE FILE? If it's only in the DEFINE FILE, then the stylesheet can't see it. You should at least PRINT or SUM the column, probably marked as NOPRINT, or your stylesheet won't pick it up.
- Are the columns you're trying to style part of an ACROSS? In that case you may have to refer to the NIGHT_IND column numerically (using N1, N2, or whatever number is applicable for you).


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
Wrap your code in CODE tags, not QUOTE tags Wink

I can't see any references to that macro, are you using it at all?
We don't really need all your code, just the relevant sections of the problematic DEFINE FILE, TABLE FILE and stylesheet would have sufficed I think.

I do suppose you checked that there are no errors printed in the resulting output?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
What is the problem?

The relevant bit of code seems to be:
 
TABLE FILE V_SPTR0001_TAB
SUM
  MAX.SUN_IN  AS 'In'
  MAX.SUN_OUT AS 'Out'

...

     DEFMACRO=DEF001,
     MACTYPE=RULE,
     BORDER-TOP-COLOR='SILVER',
     BORDER-BOTTOM-COLOR='SILVER',
     BORDER-LEFT-COLOR='SILVER',
     BORDER-RIGHT-COLOR='SILVER',
     BACKCOLOR='SILVER',
     WHEN=NIGHT_IND EQ 'Y',
$

...

TYPE=DATA,
     COLUMN=N10,
     FONT='ARIAL',
     SIZE=9,
     STYLE=NORMAL,
  MACRO=DEF001,
$
TYPE=DATA,
     COLUMN=N11,
     BORDER-TOP-COLOR='SILVER',
     BORDER-BOTTOM-COLOR='SILVER',
     BORDER-LEFT-COLOR='SILVER',
     BORDER-RIGHT-COLOR='SILVER',
     FONT='ARIAL',
     SIZE=9,
     STYLE=NORMAL,
  MACRO=DEF001,
$


What jumps out is that you repeated the border-styling in the style for column N11 (the macro should take care of that) and that your border-colours are the same as the cell background colour (is that intentional?).

Without knowing the problem, it's going to be hard to help you. If you're having trouble describing it, you may be able to whip up an example using one of the IBI sample databases (CAR, for example)?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
Sorry, you're being way too vague.


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
Vague: Yes. If you're having trouble using / understanding the use of MACROs in style sheets, then, perhaps you should check out the "WHEN", as used in style sheets...




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report This Post
Master
posted Hide Post
Using AlphaNumeric field under SUM will fetch last value within that group. On which you added conditional styling. Just remove the NOPRINT on 'V_SPTR0001_TAB.SEG01.NIGHT_IND' and see how the data looks for NIGHT_IND. For better understanding on this, refer to the below code.

DEFINE FILE CAR
CAR_IND/A1=IF BODYTYPE EQ 'SEDAN' THEN 'Y' ELSE 'N';
END
TABLE FILE CAR
SUM
CAR_IND
SALES
BY COUNTRY
BY BODYTYPE
ON TABLE SET STYLE *
TYPE=DATA, BACKCOLOR=GREY, WHEN=CAR_IND EQ 'Y', $
ENDSTYLE
END
-RUN

DEFINE FILE CAR
CAR_IND/A1=IF BODYTYPE EQ 'SEDAN' THEN 'Y' ELSE 'N';
END
TABLE FILE CAR
SUM
CAR_IND 
SALES
BY COUNTRY
-*BY BODYTYPE
ON TABLE SET STYLE *
TYPE=DATA, BACKCOLOR=GREY, WHEN=CAR_IND EQ 'Y', $
ENDSTYLE
END
-RUN



TABLE FILE CAR
PRINT
COUNTRY
CAR
END
-RUN



TABLE FILE CAR
SUM
COUNTRY
CAR
END
-RUN


TABLE FILE CAR
SUM
LST.COUNTRY
LST.CAR
END


 
Posts: 542 | Location: Dearborn, MI | Registered: June 03, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Conditional Column Styling

Copyright © 1996-2020 Information Builders