GROUP BY in Smartobject Query

  • 19 November 2008
  • 2 replies
  • 14 views

Badge +3

Hello,


 We are now working to create advanced reporting utilizing K2's Report Builder and modifying RDL in Visual Studio for republish.  In both the Report Builder and VS, I am unable to perform the "Group By' clause within my smartobject query.  In theory, the SmartObject should query just like SQL, right? 


 Is this functionality missing from Smart Objects and if so, what options exist to perform data specific aggregate functions like SUM and AVG?  Please note that I am not talking about simple AVG and SUM functions where all of the data is combined into a final average or sum, but am instead referring to the ability to group mulitple like columns and get the breakdown by like columns.


 


2 replies

Badge +3

Hi Jason


SmartObjects do not support aggregation functions of any sort.  I raised this with K2 some months ago and they confirmed this.  I can't remember if they said that this would be a future enhancement or not.


Because of this "limitation" I had to create custom queries that pulled out data from my own tables with that of the inherent K2 tables.  I put together a paper on this http://www.k2underground.com/blogs/articles/archive/2008/06/10/how-to-combine-your-own-custom-data-with-k2-process-information.aspx


Cheers


Robin 


 

Badge +9
The Sort feature has been logged as an enhancement but probably not the group by clause as it can be quite complex to implement (if you consider all the aggregate functions).  But if it is a key requirement on your side, submit an enhancement request and the labs team can take a look to see if it is possible.

Reply