daust / JasperReportsIntegration

JasperReportsIntegration provides an interface to use the JasperReports reporting engine in an Oracle database application, specifically with Oracle Application Express (Oracle APEX).
BSD 3-Clause "New" or "Revised" License
55 stars 23 forks source link

WITH Clause Query not supported #100

Closed HAfsari closed 2 years ago

HAfsari commented 2 years ago

Example : with dept_costs as ( select dname, sum(sal) dept_total from emp e, dept d where e.deptno = d.deptno group by dname) select * from dept_costs where dept_total > 600;

HAfsari commented 2 years ago

How to add Same Configuration in JasperReportsIntegration https://community.jaspersoft.com/questions/969281/jasperserver-and-sql-query-using-clause

daust commented 2 years ago

Hhhm, are you sure it doesn't work and this is the cause of your problems?

I have just successfully tried a WITH query:

with sums as (select count(object_type) cnt_object_type,
                 object_type
            from user_objects
           group by object_type)
select uo.object_name, uo.object_type, sums.cnt_object_type
  from user_objects uo inner join sums on (sums.object_type=uo.object_type)
 where rownum<50
 order by 1

And I can execute it without problems.

Do you have an error message for me?

daust commented 2 years ago

Upon further research, it seems to work in JaspersoftStudio, but not in Jasper Server: https://community.jaspersoft.com/questions/969281/jasperserver-and-sql-query-using-clause

It is usually not part of the libraries and I do not enforce it in my code. Therefore, you shouldn't have any problems here.

daust commented 2 years ago

Please respond and verify it. I will close the ticket. You can always reopen it if you have issues. Best Dietmar.