跳至内容
菜单
此问题已终结
1 回复
5096 查看

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

形象
丢弃

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

编写者

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

最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
1
3月 15
4183
1
3月 15
5340
0
3月 15
3469
2
3月 15
8784
1
3月 15
5891