11gxe , apex 4.x
hi all ,
i created an interactive report , and i want to search in it through two text items and a button , so i created the two text items and the button ,
i want , when i click on the button , the report is updated with the data which satisfy the condition ,
for example :
the report for employees in the emp table ,
the text items are (ename,job) ,
- i enter "SMITH" IN THE "ENAME" FIELD , AND "CLERK" in the job field ,
the report displays the data of all employees named "SMITH" AND all employees working as "CLERK" .
I have looked at the default interface of the interactive report which has a text item and a button to search , but i could not figure how it is done , and
could not get into the code used ? how to see the code used and the way the task created ? ?
You need two page items Pxx_ENAME and Pxx_JOB. You'll need to include them in the where clause of your query:
where ename = nvl(:Pxx_ENAME, ename)
or job = nvl(:Pxx_JOB, job)
Next you need a button to set the session state for the page items and to refresh your interactive report. A submit button might be the simplest solution.
you need a button to set the session state for the page items
i am sorry , i do not understand the expression "session state" for the page items ? what does it mean ?
and to refresh your interactive report
is it possible to refresh specific item or region or button in the page -- just the item not all the page ??
A submit button might be the simplest solution.
i am also sorry , i have a conflict in my head because of the "Submit" operation , i really do not know what it is ?
is it sending a request of "save,update,or delete" operations to the servers , or it means somthing else or something in addition ??
Submit is indeed sending a request to the server. When you enter a value in a text field and then submit your page, the value will be stored in session state,which is a referece of all stored text fields during your current session (the period you are logged in to your application). You can use these stored values for reference in one page, or a cross pages in your application.
It is indeed possible to refresh only part of your page, say a region or a single field. It does however, cost a bit more work and understanding of apex. Given that you are new and familiarizing with apex, I'd wait with that for a bit.
Here you can find a picture of how your page layout should look with your page items and your button: