Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Below are the steps to call a stored procedure to build a report using iReport 4.5/4.5.1 JasperReport</p> <ol> <li>In your iReport designer go to Tools --> Options --> and in the Classpath Tab click Add JAR and add the OJDBC14.jar to the classpath.</li> <li>Go to Query Executer tab and set the following Language: plsql Query Executer Factory: com.jaspersoft.jrx.query.PlSqlQueryExecuterFactory Fields Provider Class: com.jaspersoft.ireport.designer.data.fieldsproviders.SQLFieldsProvider</li> <li>Select Database JDBC Connection</li> <li>Select Oracle as the JDBC Driver as shown in the image below and verify the connection by clicking the Test button (Make sure you check the Save Password check box)</li> <li>Create a blank report by giving a report name and save it.</li> <li>Open the report in the designer and right click on the report name and click on Edit Query</li> <li>Set the query language to plsql</li> <li>Call your procedure with in { } a. {call PUBLISHER_AND_BOOKS(&amp;P(P_PUBLISHER_ID), &amp;P(ORACLE_REF_CURSOR))} Note: P_PUBLISHER_ID is of type string and ORACLE_REF_CURSOR is of type java.sql.ResultSet data type custom parameter. You can create this by clicking the New Parameter button. If you have more input parameters use ‘,’ as your delimiter as shown in the above example.</li> <li>Click Ok and proceed with the report design.</li> <li>In the designer window right click on Fields and add click Add Fields and make sure all the field name matches the column name in your stored procedure</li> <li>Now right click on the parameters and add the parameters matching the stored procedure NOTE: make sure you uncheck the "Use for Prompt" in the property for your out parameter in our example its ORACLE_REF_CURSOR is the out parameter.</li> <li>Drag and drop the fields in the report detail band as shown below</li> <li>Click preview to run the report you will be prompted with the input parameter</li> </ol> <p>All the steps are captured in detail with images and available in the below link hope this helps...</p> <p><a href="http://meezageekyside.blogspot.com/#!/2012/04/jasper-reports-ireport-45-using-oracle.html" rel="nofollow">http://meezageekyside.blogspot.com/#!/2012/04/jasper-reports-ireport-45-using-oracle.html</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload