ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Error in colouring Script reports


I am trying to add colour to the text of each cell. I am using the following code :

"formatter":function (row, cell, value, columnDef, dataContext, default_formatter) {
		value = default_formatter(row, cell, value, columnDef, dataContext);
			 if( == "Status"){
				value = "<span style='color:blue;font-weight:bold';>" + value + "</span>";
		return  value;

Im getting this error:

[Tutorial] Add Color to Cells in Query Report
How to change color of select field?

It seems you are applying color changes in custom report. Is it script report ??
And where you included the above code ??


Yes, It is a script report. I have included it in my script report’s js file.


Could you share screenshot or code of JS ?