Hello ADF Developers,
In my previous post http://sameh-nassar.blogspot.com/2010/07/call-oracle-reports-from-your-adf.html I explain a way to call oracle report but this way has a problem. The problem is the report parameters appear in the URL. In this post I will explain another way to call oracle report without displaying report parameters in URL.
to call oracle report follow this steps:
1- Make a new .jsp page (for example the page name is report.jsp).
2- In faces-config.xml make a navigation rule to report.jsp with outcome "report".
3- Write this code inside the report.jsp page
4- Create ADF page (.jspx or .jsf page) then add button (this button will call the report) and in the button action write this code:
In my previous post http://sameh-nassar.blogspot.com/2010/07/call-oracle-reports-from-your-adf.html I explain a way to call oracle report but this way has a problem. The problem is the report parameters appear in the URL. In this post I will explain another way to call oracle report without displaying report parameters in URL.
to call oracle report follow this steps:
1- Make a new .jsp page (for example the page name is report.jsp).
2- In faces-config.xml make a navigation rule to report.jsp with outcome "report".
3- Write this code inside the report.jsp page
great post , sameh
ReplyDeleteyours
amr ismail
Thank you Alena.
ReplyDeleteThank you , Sameh
ReplyDeleteVery nice topic.
Mahmoud Ahmed
I like it so much
ReplyDeleteSameh Thank you very much for post it works perfectly. I have a question though, how to open the report in a new page or tab and not the same one as the application.
ReplyDeleteAny help please
Hi Mohamed,
Deleteyou can add a af:clientListener inside the button call a script method. as :
af:commandButton text="runReport" id="cb1">
af:clientListener method="newWindow" type="action"/>
newWindow is a script method like:
function newWindow()
{
document.getElementById("yourFormId").target = "_blank;targetfeatures=toolbar=no location=no directories=no menubar=no";
}
Regards
where to write this function code?
DeleteI must appreciate your post which is helping us in such a great manner.
ReplyDeletefree 0800 numbers
hi thanks for u post
ReplyDeletei have question for
how call rdf from jsf not jsp ?
Hi,
Deletejsp is just page for calling report. Your main pages is .jsf but you have only one .jsp for just calling the report
Can use this toturial in JSPX page?
ReplyDeleteYour ADF application will has .jspx, .jsf, .jsff pages no problems, but the created jsp page just for calling oracle report
DeleteGood Work Sameh,
DeleteIs there a way to path the report server name through the map
You can put server url in a variable in sessionScope and you can read this variable in report.jsp page as:
Delete- In the button action after you create a map and put it in sessionScope you can add this
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("serverUrl", "write_server_Url");
- In report.jsp get this variable from session as:
form action=${sessionScope.serverUrl} method="post" id="form1"
Thank you Sameh. Very nice.
ReplyDelete