ponguru1224 Regular Contributor.
Regular Contributor.
351 views

Add Colour

Hello All,

Could you please help me how to add a colour code in sql query.

Thanks,

Subbu.

 

0 Likes
2 Replies
Rich Y_1 Super Contributor.
Super Contributor.

Re: Add Colour

Below is some of my code..  Hope it helps

 

SELECT (select case when r.assigned_to_user_id is null then '<font color="#FF0000"><b>***Not Assigned***</b></font>' when '[SYS.USER_ID]' = r.assigned_to_user_id then '<font color="GREEN"><b>'||u.username||'</b></font>' else '<font color="BLUE"><b>'||u.username||'</b></font>' end from knta.knta_users u where u.user_id = case when r.assigned_to_user_id is null then 1 else r.assigned_to_user_id end) ASSIGN_TO
FROM knta.KCRT_REQUESTS r,
knta.kcrt_request_types c
where c.request_type_name = 'XYZ Request'
and c.request_type_id = r.request_type_id
and r.STATUS_CODE = 'IN_PROGRESS'

0 Likes
Derek Giedd Honored Contributor.
Honored Contributor.

Re: Add Colour

If you need to add a color code for a chart portlet, you can define a field in the datasource and give it a value as below.  If you name this field color, then just select the "Color" field for the Color Source in the portlet definition. This example sets the color of the wedge, line or bar based on the status. 

decode(upper(status_name), 'NOT SUBMITTED', 'Yellow', 'PENDING INITIAL ANALYSIS', 'Blue', 'PENDING MORE INFO', 'RED', 'PENDING CLOSURE', 'Light Red', 'Black')

-- Remember to give Kudos to answers! (click the KUDOS star)
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.