This question has been flagged
1 Reply
4059 Views

I'm using ERP v.5, and I'm trying to use the module base_report_creator.

When I add a field as "COUNT" or "SUM", for example, it still appears in the "group by" part of the sql request. And thus, the request doesn't works.

I searched for information, but I only found other people asking more or less the same, but without a clear answer.

Any help? Thank you

Avatar
Discard

select st.target_value, cl.user_id,he.name_related, count(cl.user_id) as achieved, round(((cast(count(cl.user_id) as decimal(2))/st.target_value)*100)) as val from
salesman_target st, hr_employee he, res_users ru, resource_resource rr, crm_lead cl where ru.id=rr.user_id and rr.id=he.resource_id and st.employee_id=he.id and cl.user_id=ru.id and cl.type='opportunity' and cl.state='draft' and cl.section_id='1' and date_open>='%s' and date_open<=now() + interval '30 days' group by st.target_value, cl.user_id,he.name_related try like that it's really working

Author

Thank you gpkarthick,

but I still have the same problem. The module "base report creator" doesn't let edit the SQL text. I just can pick the field of some table, and it's the module who builds the SQL. I don't know how to use that to make a really simple query, like, for example, counting hoy many customers are in each city.

Regards

you want that query for creating report i already created a report with query city based salesman target with group by you just give me your mailid i will send you just refer it, it may help you

actually what you are doing explain clearly

Best Answer

you want that query for creating report i already created a report with query city based salesman or customer target with group by you just give me your mail Id, i will send you just refer it, it may help you

Avatar
Discard