Thursday 20 August 2015

Ability to Color cells based on cell value Reports

Here is my code,
You can put this code in js file of report.
Code:


"formatter":function (row, cell, value, columnDef, dataContext, default_formatter) {
                    value = default_formatter(row, cell, value, columnDef, dataContext);
            if (columnDef.id == "Debit") {
                                   if(dataContext.Debit>1){
                                    value = "<span style='color:blue;font-weight:bold'>" + value + "</span>";
                                    }
                        msgprint(dataContext.Debit)

            }


            if (dataContext.Debit) {
            }

            return value;
        }
 
 
 

No comments:

Post a Comment