Filter

Hell Sir

            I have added following custom filter but it does not working for following query

Query:-
  select * from (select dsr.site_id,dsr.site_name,a.vendor_id,a.types_of_services,ifnull(v.no_of_employee,0),ifnull(a.present_vendor,0),ifnull((v.no_of_employee),0)-ifnull((a.present_vendor),0) as Short_Fall,dsr.name,a.modified from (select f.site_id,f.site_name,f.name,f.modified from (select site_id,site_name,max(modified) as maxtime from tabDaily Site Report group by site_id) as x inner join tabDaily Site Report as f on f.site_id=x.site_id and f.modified=x.maxtime) as dsr join tabDSR Vendor Detail Main as a  on a.parent=dsr.name join tabVendor Master Detail v on v.parent=dsr.site_id and v.types_of_services=a.types_of_services order by dsr.name) as z where z.Short_Fall=0 order by z.name 
 
Custom filter code:-
report.customize_filters = function() {
 this.add_filter({fieldname:‘Site Id’, label:‘Site Id’, fieldtype:‘Link’,parent:‘Site’,options:‘Site’});
}


Thanx and regards
Rohit



You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/YpJP70Cyn-MJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Can you send code samples using gist.github.com or pastebin?

Please follow formatting guidelines where ever you can. It makes the task of helping you easier.


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

On 12-Mar-2013, at 3:23 PM, Rohit Waghchaure <ro...@indictranstech.com> wrote:

Hell Sir

            I have added following custom filter but it does not working for following query

Query:-
  select * from (select dsr.site_id,dsr.site_name,a.vendor_id,a.types_of_services,ifnull(v.no_of_employee,0),ifnull(a.present_vendor,0),ifnull((v.no_of_employee),0)-ifnull((a.present_vendor),0) as Short_Fall,dsr.name,a.modified from (select f.site_id,f.site_name,f.name,f.modified from (select site_id,site_name,max(modified) as maxtime from `tabDaily Site Report` group by site_id) as x inner join `tabDaily Site Report` as f on f.site_id=x.site_id and f.modified=x.maxtime) as dsr join `tabDSR Vendor Detail Main` as a  on a.parent=dsr.name join `tabVendor Master Detail` v on v.parent=dsr.site_id and v.types_of_services=a.types_of_services order by dsr.name) as z where z.Short_Fall=0 order by z.name 
 
Custom filter code:-
report.customize_filters = function() {
 this.add_filter({fieldname:'Site Id', label:'Site Id', fieldtype:'Link',parent:'Site',options:'Site'});
}


Thanx and regards
Rohit



You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/YpJP70Cyn-MJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Hello Sir
I have added my code on following link .
Thanx and Regards
Rohit


On Tue, Mar 12, 2013 at 3:41 PM, Rushabh Mehta <rm...@gmail.com> wrote:
Can you send code samples using gist.github.com or pastebin?

Please follow formatting guidelines where ever you can. It makes the task of helping you easier.


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

On 12-Mar-2013, at 3:23 PM, Rohit Waghchaure <ro...@indictranstech.com> wrote:

Hell Sir

I have added following custom filter but it does not working for following query

Query:-
select * from (select dsr.site_id,dsr.site_name,a.vendor_id,a.types_of_services,ifnull(v.no_of_employee,0),ifnull(a.present_vendor,0),ifnull((v.no_of_employee),0)-ifnull((a.present_vendor),0) as Short_Fall,dsr.name,a.modified from (select f.site_id,f.site_name,f.name,f.modified from (select site_id,site_name,max(modified) as maxtime from `tabDaily Site Report` group by site_id) as x inner join `tabDaily Site Report` as f on f.site_id=x.site_id and f.modified=x.maxtime) as dsr join `tabDSR Vendor Detail Main` as a on a.parent=dsr.name join `tabVendor Master Detail` v on v.parent=dsr.site_id and v.types_of_services=a.types_of_services order by dsr.name) as z where z.Short_Fall=0 order by z.name

Custom filter code:-
report.customize_filters = function() {
this.add_filter({fieldname:'Site Id', label:'Site Id', fieldtype:'Link',parent:'Site',options:'Site'});
}


Thanx and regards
Rohit



You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/YpJP70Cyn-MJ.

For more options, visit https://groups.google.com/groups/opt_out.







You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.







You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 

Add condition of site id in the query like following format:
`site_id` LIKE '%(site_id)s%%'

Also, while adding filter, fieldname should not have any spaces, use any single word like "site_id"

Regards,
Nabin Hait

On 12-Mar-2013, at 4:12 PM, Rohit Waghchaure wrote:

Hello Sir
                I have added my code on following link .
Thanx and Regards
Rohit


On Tue, Mar 12, 2013 at 3:41 PM, Rushabh Mehta <rm...@gmail.com> wrote:
Can you send code samples using gist.github.com or pastebin?

Please follow formatting guidelines where ever you can. It makes the task of helping you easier.


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

On 12-Mar-2013, at 3:23 PM, Rohit Waghchaure <ro...@indictranstech.com> wrote:

Hell Sir

            I have added following custom filter but it does not working for following query

Query:-
  select * from (select dsr.site_id,dsr.site_name,a.vendor_id,a.types_of_services,ifnull(v.no_of_employee,0),ifnull(a.present_vendor,0),ifnull((v.no_of_employee),0)-ifnull((a.present_vendor),0) as Short_Fall,dsr.name,a.modified from (select f.site_id,f.site_name,f.name,f.modified from (select site_id,site_name,max(modified) as maxtime from `tabDaily Site Report` group by site_id) as x inner join `tabDaily Site Report` as f on f.site_id=x.site_id and f.modified=x.maxtime) as dsr join `tabDSR Vendor Detail Main` as a  on a.parent=dsr.name join `tabVendor Master Detail` v on v.parent=dsr.site_id and v.types_of_services=a.types_of_services order by dsr.name) as z where z.Short_Fall=0 order by z.name 
 
Custom filter code:-
report.customize_filters = function() {
 this.add_filter({fieldname:'Site Id', label:'Site Id', fieldtype:'Link',parent:'Site',options:'Site'});
}


Thanx and regards
Rohit



You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msg/erpnext-developer-forum/-/YpJP70Cyn-MJ.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 





You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

To post to this group, send email to er…@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

 

 




You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un...@googlegroups.com.

To post to this group, send email to er...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.