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
username/password@orcl" name="userid" size="100">
4- In the button action which will call the report write this code:
Map map = new HashMap();
map.put("parameter1", "value");
map.put("parameter2", "value");
map.put("report", "reportName.rdf");// name of the report
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("reportMap", map);
return "report";// report outcome
5- Good luck :)
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
username/password@orcl" name="userid" size="100">
4- In the button action which will call the report write this code:
Map map = new HashMap();
map.put("parameter1", "value");
map.put("parameter2", "value");
map.put("report", "reportName.rdf");// name of the report
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("reportMap", map);
return "report";// report outcome
5- Good luck :)




great post , sameh
ReplyDeleteyours
amr ismail
I recently came across your blog and have been reading along. I thought I would leave my first comment. I don't know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.
ReplyDeleteAlena
Diverticulitis Treatment Diverticulitis Diet
Thank you Alena.
DeleteThank 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
This comment has been removed by the author.
DeleteHi 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
I must appreciate your post which is helping us in such a great manner.
ReplyDeletefree 0800 numbers