It might help if we could see your queries. Have you run your query in the SQL Commands window to see what the result is there. That's how I debug "recalcitrant" queries.
What are the actions for the report button?
Post the queries which get executed upon the button click. Let's see how do you pass the values.
I have tested the query in the Source Query testing area which is similar to SQL Command Window and its work fine their. for this testing i perform the following steps.
- Go to MyApplication(HR) > Shared Components > Report Queries > MyReportQuery > Edit Source Query > Set Bind Variables >
- Enter 7839 in Bind variables field
- Click Test Query Button.
you can also perform this by logging into my workspace
Action is Redirect to URL.
URL is f?p=&APP_ID.:0:&SESSION.:PRINT_REPORT=MyReportQuery
select EMP.EMPNO as EMPNO, EMP.ENAME as ENAME, EMP.JOB as JOB, EMP.MGR as MGR,EMP.HIREDATE as HIREDATE
from EMP EMP
WHERE EMPNO =:P2_X_PARAMETER
P2_X_PARAMETER is the number field on my Report Page.
you can also see the query by logging into my workspace
Hmm. I can see the application. But without an account with Developer access, I can't see how the code is set up that is being executed.
For my examples I set up a demo account (password is also "demo") to which I give Developer access.
Hi Kashif(?) , without actually seeing the code behind the application, redirects will not set the item value in session state. Items get set in session state when you submit. Alternatively, you can use a dynamic action to set it in session state and then redirect.
Sorry i did not provide the workspace name. for developer access my workspace name is kashif0777, username firstname.lastname@example.org, password is 123456. i try to set Action When Button Clicked to Submit Page and set the buttton request field to the URL of the Report Query but it did not work. can you please explain or make changes in the application.
I looked at the application.
Do you want it to go to the report page after the report button is clicked? If that's it, then your button should submit the page. Then you need a branch to go to that URL. By submitting the page, your value should be set in the session.
Thanks Kofi for the help. If you please perform these steps for me i will be very grateful to you. I have never created branches and i dont know what to set in the Action When Button Clicked area of the button properties. I will study Branches tomorrow in office.
what i want is when button pressed
- the number field value should be passed to Report Query. It would be perfect if there is a print image against each record and on clicking that image page should be submitted to Report Query instead of number field and button GUI.
- the Report Query Source Query should extract the records based on the parameter passed to it.
1 person found this helpful
See Page 3 on your application. Look at the branches.
I also defaulted item Value P3_X_PARAMETER in a before header process so this set in session.
I also created Page 0.
Everything should work well.
thank you very much Kofi. you practically answered my question.
to improve GUI can we put a print image against each record and on clicking that image relevant report should be generated. it will be great if you please advise or add this functionality in page 3.
What I suggest is to go through some of the packaged apex applications and documentation. If you don't get a handle on the basics, you're going to hit a roadblock sooner or later that someone might not have time to help you resolve.