Rep 05 -28 Bind Parameters

Preview:

DESCRIPTION

Rep 05 -28 Bind Parameters

Citation preview

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 2/23

………………………………………………………………………………..

See other relevant topics

No relevant added yet. Give us sometime to get this right!

Bind Parameter: – Bind Parameter is a parameter which holds the single value at runtime.

Bind Parameter can be created with ‘:’ symbol in data model.Bind Parameter can be used in both SQL and PL/SQL.Bind Parameter is used in all Clauses except ‘FROM’ clause.

We are creating data model manually and layout model by using wizard.

So, first create data model for example as shown below, create a new report manually and start.

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 3/23

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 4/23

Write a query in SQL Query Statement shown below

SELECT * FROM empWHERE deptno=:p_deptno/*it is bind parameter which holds value*/

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 5/23

Now it will ask for Database Connection. Then provide proper username, password, Database

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 6/23

Click on ‘Connect’

Then it will show message like ‘Query<query name> has created the bind parameter ‘<parameter name>’’which is shown below

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 7/23

Then Click on ‘OK’

Now data model looks like

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 8/23

When ever we create a bind parameter one user parameter will create which we can see in data modelwhich is shown below.

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 9/23

Now create lay out using wizard method. For that go to data model and give right click on ‘Q_1’ and select‘Report Wizard’ which is shown below

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 10/23

then Select ‘Style’ tab in that select ‘Tabular’ style which is shown below

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 11/23

Click on ‘NEXT’

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 12/23

Click on ‘NEXT’

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 13/23

Click on ‘NEXT’

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 14/23

Click on ‘NEXT’

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 15/23

Click on ‘NEXT’

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 16/23

Click on ‘NEXT’

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 17/23

Click on ‘NEXT’

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 18/23

Click on ‘FINISH’

Now it will ask for parameter. What ever parameter we will give that corresponding parameter records goingto retrieve from database and display those records which is shown below

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 19/23

Here we are providing ‘10’ as parameter . so, only 10 department employees display which is shown below

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 20/23

Now, here we can see only ‘10’ department employees displayed in the out put which is shown below

9/2/13 Rep|05| -28 Bind Parameters

newtonapples.com/oracle-report-bind-parameters/ 21/23

<< Report With Simple Parameter Form

Lexical Parameter>>

This post has been viewed 1244 times

About the Author: Venkat

(15 votes, average: 5.00 out of 5)

Loading ...

Disclaimer: Contents expressed in this post are viewpoints of independent authors/contributors and are not reviewed for correctness or accuracy by

NewtonApples.com. Any opinions, comments, solutions or other commentary expressed by post authors/contributors are not endorsed or

recommended by NewtonApples.com or any vendor. If you feel a post is inappropriate, click here to let us know and we will take the appropriate

action

Comments:

Recommended