Venkatachalam P Posted January 7, 2014 Share Posted January 7, 2014 Hi,I'm the new bee of the iReport.I've created a report with the following fileds EMP_ID, EMP_NAME, DEPT_NAME, MANAGER_NAME. And the above data are grouping (Reeport Group) by the MANAGER_NAME filed. Its give the proper result.Once I edit the grooup expression as DEPT_NAME (or delete this group and create new group for DEPT_NAME). Its not grouping the data. It show every record under the DEPT_NAME.NOTE: My environmnet is iReport 5.5.0, Windos 7 os...ThanksVK Link to comment Share on other sites More sharing options...
Solution Ankur Gupta Posted January 7, 2014 Solution Share Posted January 7, 2014 Hi, In order to sucessfully group, you need to use ORDER BY with the same field by which you want to group your data in the SQL Query(or which ever query you are using) This happens beacause if you do not order the records retrieved by the query according to the grouping field it will not order the data, and when iReport group expression encounters the records coming from the query it still finds the similar kind of ordering as found in the MANAGER_NAME and not DEPT_NAME . So my advice is which ever field you want to group your data according to the records must ordered/sorted by the same field.Hope that this helpsThanksAnkur Guptahttp://ankurthetechie.blogspot.in/ Link to comment Share on other sites More sharing options...
Venkatachalam P Posted January 7, 2014 Author Share Posted January 7, 2014 Thanks Ankur Gupta. In the "Report Query" editior having "Sorting option". I have given the sorting column name in that...Because I'm using oracle database So if we give order by in the query means it may cause some performance issue. Link to comment Share on other sites More sharing options...
Ankur Gupta Posted January 7, 2014 Share Posted January 7, 2014 Hi,Well ordering by is the only method by which you can retrieve exact grouping, for optimization you can use indexing and other methods whichever caters the performance , Hope that this helps.Thanks,Ankur Guptahttp://ankurthetechie.blogspot.in/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now