by sapiens.bi

Dynamic Reports and Interactive Charts. A powerful tool for SuiteCRM report creation and data analytics. Includes a variety of chart types, detailed, summary and pivot tables. This Reporting Tool is very user-friendly, no need for technical knowledge or SQL. The Sapiens.BI tool comes with over 100 pre-built reports that are ready to be used on day one.

Free 30 day trial
Try it Now

#1044 - Problems with SuiteCRM Version 7.9.7

Closed Bug? created by BoXBo 6 years ago

If I try to create a Report from Opportunity module with results sorted by amount and show only top 10 results, then after every refresh the results are different. And I cannot select any summaries: problems.png

And if I create a new report with data from Opportunity and Accounts module, and try to group by amount and show only top 10 results, then I see no items. There is an error in the log file:

Thu Mar 22 11:49:27 2018 [26395][1][FATAL]  Query Failed: SELECT t0.`name`  AS `0_Opportunities_name`  , t0.`id`  AS `0_Opportunities_name_id`  , 'Opportunities'  AS `0_Opportunities_name_setype`  , t1.`name`  AS `1_Accounts_name`  , t1.`id`  AS `1_Accounts_name_id`  , 'Accounts'  AS `1_Accounts_name_setype`  , case when (t3.user_name not like "") then CONCAT(t3.first_name,' ',t3.last_name) end AS `0_Opportunities_assigned_user_id` , t3.`id`  AS `0_Opportunities_assigned_user_id_id`  , 'Users'  AS `0_Opportunities_assigned_user_id_setype`  , t0.`sales_stage`  AS `0_Opportunities_sales_stage`  , ROUND(t0.`amount`,2)  AS `0_Opportunities_amount`  FROM (SELECT * FROM `opportunities` WHERE `opportunities`.`amount` IN (SELECT * FROM (SELECT `t0`.`amount` FROM `opportunities` AS t0 LEFT JOIN `accounts_opportunities` AS `t2_accounts_opportunities` ON (`t2_accounts_opportunities`.`opportunity_id` = `t0`.`id` AND `t2_accounts_opportunities`.`deleted` = '0' ) LEFT JOIN `accounts` AS `t1` ON (`t1`.`id` = `t2_accounts_opportunities`.`account_id`)
LEFT JOIN users t3 ON t3.id = t0.assigned_user_id  WHERE (1=1 )  AND (1=1 ) GROUP BY `t0`.`amount` ORDER BY  ``.``  DESC LIMIT 10) AS tmp_limit_table) ) AS t0 LEFT JOIN `accounts_opportunities` AS `t2_accounts_opportunities` ON (`t2_accounts_opportunities`.`opportunity_id` = `t0`.`id` AND `t2_accounts_opportunities`.`deleted` = '0' ) LEFT JOIN `accounts` AS `t1` ON (`t1`.`id` = `t2_accounts_opportunities`.`account_id`)  LEFT JOIN users t3 ON t3.id = t0.assigned_user_id WHERE (1=1 )  AND (1=1 ) ORDER BY `0_Opportunities_amount` DESC LIMIT 0, 20: MySQL error 1054: Unknown column '' in 'order clause'

If I remove the show top number ("All") then it's working fine.

It looks like there is some bigger issue regarding the top X results in groups and sorting logic.

  1. sapiens-bi member avatar

    sapiens.bi Provider

    6 years ago

    Thank you for contacting us.

    In order to select to show summaries, you should also select at least 1 Aggregate under 'Aggregates' tab (in order to identify, what would you like to summarize).

    Best Regards, IT Sapiens Team

  2. BoXBo member avatar

    BoXBo

    6 years ago

    Indeed, with setting the aggregates it's working fine. Thanks for your help.

This case is public. Please leave out any sensitive information such as URLs, passwords, etc.
Saving Comment Saving Comment...