Search code examples
oracle-databasesql-viewjaspersoft-studio

How to get View from Oracle to Jaspersoft Studio?


I have created the following view in Oracle:

 CREATE OR REPLACE FORCE VIEW "TEST_ASSIGNMENT"."VPRODUCTCATALOG" ("PRODUCTCODE", "GROUPCODE", "PRODUCTGROUPPATH") AS 
 select "code" as productCode, 
        func_groupCode("code") as groupCode,
        func_productPath("code") as productGroupPath
from "Products";

I want to create a report in Jaspersoft Studio which will have information from this View.

How can I get this View into Jaspersoft? It seems to me that Jaspersoft only have ordinary SELECT for option.

image


Solution

  • Firstly, a "View" is not PL/SQL code, it's a standard SQL object.

    You have to write a normal SQL query like:

     SELECT * FROM "TEST_ASSIGNMENT"."VPRODUCTCATALOG"`
    

    If you want to execute PL/SQL code you must select PL/SQLlanguage from the language list, but it is a more advanced topic and not required in your requirement.