Can't apply style to cells

(2 posts) (2 voices)

Tags:

No tags yet.

  1. bushraj, Member

    I want to apply CSS to cells depending on the value. for example here i want to show cells in green color when the SIT_MAN field is null but I m not able to do so . Procedure is as follows :

    DROP PROCEDURE IF EXISTS sp_DBR_ProjectManDays
    $$
    CREATE PROCEDURE sp_DBR_ProjectManDays()
    Begin

    Select 'dbr.title','Project ManDays';

    select 'dbr.cellstyle', 'value', 'style';

    select
    SIT_Actual_MAN as '[value]',
    if SIT_Actual_MAN is null ,'color:red','color:green') as '[style]',APP_NUMBER as ID`
    from wf_project_tracker.project_tracker_master;

    end
    $$

    Do help please.

  2. myDBR Team, Key Master

    Are you trying to color the cell value in or the cell background?

    If the value is null, nothing is displayed in the cell so there is nothing to apply the color to. if you set background color instead (using background-color), the cell will be colored even when it is empty.

    --
    myDBR Team


Reply

You must log in to post.