Any Example Code for Report Styling

19 views
Skip to first unread message

Madhukar Bansode

unread,
Aug 21, 2012, 10:32:35 AM8/21/12
to erpnext-dev...@googlegroups.com
report.beforerowprint = function(row){
  if(row.data[‘Amount’] > 20000) {
    row.style.color = ‘GREEN’;
  }
}
Please elaborate,,,,,, how to use it....? how to pass 'row' parameter how to get 'row'.. parameter???

Rushabh Mehta

unread,
Aug 22, 2012, 1:07:07 AM8/22/12
to erpnext-dev...@googlegroups.com
Madhukar,

You are working on a very old version :) - I am sure you can look up the framework code and figure / fix it. Use grep on "beforerowprint" 

Seems like this function is called from the report widget with the row parameter passed when the report is being rendered..

best,
Rushabh


W: https://erpnext.com
T: @rushabh_mehta

--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To unsubscribe from this group, send email to erpnext-developer...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/mm2O8iBPSmMJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages