Calling XML Publisher Report from OAF using the conc programs xml output
Hi all
I am trying to call a report from oa Framework. I have developed the Template in the Ms-Word and for Generating the xml data i used the view object defined in OAF, this approach is working for me...i used the following code to do this in the AM as mentioned in many places...
public XMLNode getEmpDataXML()
OAViewObject vo = (OAViewObject)findViewObject("EmpVO1");
XMLNode xmlNode = (XMLNode) vo.writeXML(4, XMLInterface.XML_OPT_ALL_ROWS);
return xmlNode;
now i want that instead of the view object i should use the xml generated by the report which is registered as concurrnet program with output as xml.
I am submitting the concurrent program and able to get the request id ...
Now from here what should i do.. please suggest...
Hi,
I am thinking of doing something very similar. What i was planning on doing is submitting the request, and then redirecting the user to the concurrent request page. They can then use the standard functionality to view output and get the xml to use the appropriate template.
i would be interested in how you get the concurrent request id from the submitted job.
Many thanks
Rupesh
Similar Messages
-
Call Xml Publisher report from Jdeveloper
Hi,
I am first time integrating XML publisher with Jdevloper.
I need to call xml publisher report from Jdeveloper.
I followed all steps from anilpassi link for sample
its showing error while tring to open pdf file
Error:
Adobe Reader could not find 'EmpReport[1].pdf' because it is either not a supported file type or because the file has been damaged.
Please help ,i m stuvk because of this error.
below is the code
EmpCO :
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAApplicationModuleImpl am =
(OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
am.invokeMethod("initEmpVO");
// am.invokeMethod("getEmpDataXML");
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
super.processFormRequest(pageContext, webBean);
OAApplicationModuleImpl am =
(OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
if ("GenerateReport".equals(pageContext.getParameter(EVENT_PARAM)))
System.out.println("event fired");
// Get the HttpServletResponse object from the PageContext. The report output is written to HttpServletResponse.
DataObject sessionDictionary =
(DataObject)pageContext.getNamedDataObject("_SessionParameters");
HttpServletResponse response =
(HttpServletResponse)sessionDictionary.selectValue(null,
"HttpServletResponse");
try
System.out.println("inside try");
ServletOutputStream os = response.getOutputStream();
// Set the Output Report File Name and Content Type
String contentDisposition = "attachment;filename=EmpReport.pdf";
response.setHeader("Content-Disposition", contentDisposition);
response.setContentType("application/pdf");
// Get the Data XML File as the XMLNode
XMLNode xmlNode = (XMLNode)am.invokeMethod("getEmpDataXML");
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
xmlNode.print(outputStream);
ByteArrayInputStream inputStream =
new ByteArrayInputStream(outputStream.toByteArray());
ByteArrayOutputStream pdfFile = new ByteArrayOutputStream();
//Generate the PDF Report.
TemplateHelper.processTemplate(((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getAppsContext(),
APP_NAME, TEMPLATE_CODE,
((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getLanguage(),
((OADBTransactionImpl)pageContext.getApplicationModule(webBean).getOADBTransaction()).getUserLocale().getCountry(),
inputStream,
TemplateHelper.OUTPUT_TYPE_PDF, null,
pdfFile);
// Write the PDF Report to the HttpServletResponse object and flush.
byte[] b = pdfFile.toByteArray();
response.setContentLength(b.length);
os.write(b, 0, b.length);
os.flush();
os.close();
catch (IOException e) {
System.out.println("Exception1"+e);
} catch (SQLException e) {
System.out.println("Exception2"+e);
} catch (XDOException e) {
System.out.println("Exception3"+e);
pageContext.setDocumentRendered(false);
EmpAMImpl:
public void initEmpVO() {
EmpVOImpl vo = getEmpVO1();
if (vo == null) {
MessageToken errTokens[] =
{ new MessageToken("OBJECT_NAME", "EmpVO1") };
throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", errTokens);
} else {
vo.executeQuery();
public XMLNode getEmpDataXML() {
OAViewObject vo = (OAViewObject)findViewObject("EmpVO1");
XMLNode xmlNode =
(XMLNode)vo.writeXML(4, XMLInterface.XML_OPT_ALL_ROWS);
return xmlNode;
Please help !!Hi,
I tried the way suggested by Anil in the above link as well today, but still am getting the same error while openning the pdf .
Dont know why it shows error that either the file is not a supported file type or because the file is damaged.
Please suggest way to solve this error or some other way of calling xml report from OAF page.
Edited by: user13573749 on Apr 10, 2011 9:59 PM -
How to invoke XML publisher report from APPS 11i forms
I have a requirement in oracle application forms menu where I need to call the XML publisher report when user clicks the menu item.
I am using following two API's
fnd_request.add_layout
fnd_request.submit_request
But I am getting the error message
java.sql.SQLException: No corresponding LOB data found :SELECT L.FILE_DATA FILE_DATA.......
your help is truly appreciated.
Thanks
SivaI have registered the report using admin responsibility and ran the reprt form SRS and completed successfully. Eeven from the forms it is submitting the request but the request completed as warning with above message. I can see the out put by clicking the View XML button but it unable to publish output.
Thanks guru your quick response.
Thanks
siva -
Displaying xml publisher report from adf page.
I am using jdev 10.1.3.3
I have an requirment of displaying an xml publisher report on click of command button.
any suggestion.how this can be achived.
according to my understanding.
if we create a folder in our web server which oc4j in our case.and we transfer the xml report through FTP in that folder.can we able to pick the report from that folder.
can we display or call that report.please let me know??
Is that possible.????????????
any help would be helpfullReally appreciate your response. Can you pls give little more details.
1] Are there any standard API's which I can use to submit XML publisher report from the JSP pages
2]Is there any sample code snippet for any of the options that I can refer to..or pls let me know the API's, I will check on them
Appreciate any help -
Invoking XML Publisher Report from PL/SQL
Hi,
I have a PL/SQL procecedure which invokes the Concurrent Request for the XML Publisher Report. This one finishes with a warning and I get 'Unable to publish output' when I try to view the output. Exact Error: "Unable to find the published output for this request "
But if I run the same report using Concurrent program, the Report executes with no error. Also the desired output is coming. I am not sure where I am doing wrong in code.
My code which invokes the XML Publisher Report (from PL/SQL package)is something like this:
declare
x boolean;
l_no_of_copies varchar2(45);
l_printername varchar2(45);
l_print_style varchar2(45);
l_result boolean;
y number;
begin
x := fnd_request.add_layout (template_appl_name => 'XXTMG', template_code => 'XXT_5001_BOL_T', template_language => 'EN', template_territory => 'US', output_format => 'XML');
l_no_of_copies := fnd_profile.VALUE ('XXTMG_SH_BOL_REPORT_NO_OF_COPIES');
l_printername := fnd_profile.VALUE ('XXTMG_SH_BOL_REPORT_PRINTER');
l_print_style := NULL; --For setting the Printer Options
l_result := fnd_request.set_print_options (l_printername, l_print_style, l_no_of_copies, TRUE, 'N');
l_result := fnd_request.add_printer (l_printername, 0);
y := fnd_request.submit_request ('XXTMG', 'XXT_5001_BOL', '', TO_CHAR (SYSDATE, 'YYYY/MM/DD HH24:MI:SS'), FALSE, 'CH-120079') ;
end;
Please let me know where I might be going wrong
ThanksHi Sumit,
You can try with this code:
exec dbms_application_info.set_client_info(org_id)
exec fnd_global.APPS_INITIALIZE(user_id,resp_id,appl_id);
declare
x boolean;
l_no_of_copies varchar2(45);
l_printername varchar2(45);
l_print_style varchar2(45);
l_result boolean;
y number;
begin
x := fnd_request.add_layout ('XXTMG' --template_appl_name
,'XXT_5001_BOL_T' --template_code
,'en' --template_language
,'US' --template_territory
,'XML' --output_format
if (x=TRUE) then
y := fnd_request.submit_request (
'XXTMG' --application
,'XXT_5001_BOL' --program
,SYSDATE --start_time
,FALSE --sub_request
,'CH-120079' --argument1 (Program's Parameter)
if y>0 then
dbms_output.put_line('Request ID '||y);
end if;
end if; --if (x=TRUE) then
end;
Make sure that program has only one input parameter. If program has other parameters then you can pass those parameters like argument1, argument2... etc.
Now you can see this submited request in your application using your user id. If you able to see your request in concurrent request then you can add printer parameters in this programs.
You don't need to pass all 100 parameters.
I am executing many programs/reports using this code.
Thanks
Ravi
[email protected]
Message was edited by:
Ravi Tripathi -
How to generate XML Publisher report from PLSQL Stored Procedure in APPS
Hi,
I have concurrent program of type PLSQL Stored procedure.I need to generate XML Publisher report from the same.I have changed the output of the concurrent program as "XML" but when I tried running it,the XML tags are not generated.Due to this I am unable to create the template.Its a urgent issue.
Please help me out .
Thanks in advance.
KaveriHi Kaveri
Sadly there is nothing magic about that output field. The only program type that you can flip it to XML and then magically get XML is for Oracle Reports. For plsql you will need to recode the plsql to generate XML rather than text that you have now.
You have some options, best option first:
1. Move the sql to a data template - check the user guide and blog for help or
2. Use SQL XML or XMLGEN (not great for large datasets) or
3. Use dbms_output.put_line and write the XML file manually - not performant at all
Regards, Tim -
Submitting a XML Publisher Report from JSP page
Hello,
We have need to submit a XML Publisher report from Quoting/iStore module in Oracle Ebusiness. The out put should be viewable in PDF format and user should be able to print. can anyone pls help on how this can be achieved.
TIAReally appreciate your response. Can you pls give little more details.
1] Are there any standard API's which I can use to submit XML publisher report from the JSP pages
2]Is there any sample code snippet for any of the options that I can refer to..or pls let me know the API's, I will check on them
Appreciate any help -
Crystal report from JSP using the JRC
Hi, I am trying to call crystal report from JSP using the JRC.
But i am getting the Error as 'Logon Failed'. my web.xml entry is
<env-entry>
<env-entry-name>jdbc/Test</env-entry-name>
<env-entry-value>!oracle.jdbc.driver.OracleDriver!jdbc:oracle:thin:{userid}/{password}@//10.0.0.1:1521/TestDB</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
i am setting the userid and password in the code. Please see the below code for your reference. Please help me to solve the issue.
<%@ page language="java" contentType="text/html;charset=UTF-8"%>
<%@ page import="com.crystaldecisions.report.web.viewer.CrystalReportViewer"%>
<%@ page import="com.crystaldecisions.sdk.occa.report.data.*"%>
<%@ page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSourceFactory" %>
<%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSourceFactory2" %>
<%@ page import="com.crystaldecisions.sdk.occa.report.reportsource.IReportSource" %>
<%@ page import="com.crystaldecisions.reports.reportengineinterface.JPEReportSource" %>
<html>
<head>
<title>Crystal Report with Database Logon information</title> </head>
<body bgcolor="#ffffff">
<%
try
String report = "/TEMPLATE.rpt";
IReportSourceFactory2 rptSrcFactory = new JPEReportSourceFactory();
JPEReportSource reportSource = (JPEReportSource) rptSrcFactory.createReportSource(report, request.getLocale());
CrystalReportViewer viewer = new CrystalReportViewer();
viewer.setReportSource(reportSource);
viewer.setHasRefreshButton(true);
IConnectionInfo newConnInfo = new ConnectionInfo();
newConnInfo.setUserName("TEST");
newConnInfo.setPassword("TEST");
ConnectionInfos newConnInfos = new ConnectionInfos();
newConnInfos.add(newConnInfo);
viewer.setDatabaseLogonInfos(newConnInfos);
viewer.setEnableLogonPrompt(false);
viewer.setOwnPage(true);
viewer.setOwnForm(true);
out.println("Connection Information: "+viewer.getDatabaseLogonInfos().getConnectionInfo(0).getAttributes().toString());
viewer.processHttpRequest(request, response, getServletConfig().getServletContext(),null);
viewer.dispose();
catch(Exception e)
throw new JspException( e);
%>
</body>
</html>I never really had much luck with this approach.
Mind you I was using Crystal Reports 10, and as far as I recall it didn't allow setting/changing of database at this level.
Things to check
- can you create a database connection on your page with this URL/username/password?
- what server are you using? Tomcat? WebLogic?
I found this in your other post:
Connection Information: {Server Name=ee6rpt, Connection String=DSN=s(ee6rpt);User ID=s(ee62test);Password=;UseDSNProperties=b(false), Database Name=, Database DLL=crdb_odbc.dll}That would indicate it is using odbc to connect to the database (crdb_odbc.dll). ODBC is a bad idea with java.
The way I have got it to work for me (after much trial and error) was to in Crystal Reports to connect using the Oracle Driver, and specifying a tnsname - eg define REPORT_DS in tnsnames.ora.
When running through the JRC, it looked for a JNDI datasource under that same name "REPORT_DS".
Don't know if that will help you or not.
Good luck,
evnafets -
Calling bi publisher report from apex.
good morning all,
I have a situation at hand, i want to be able to call bi publisher report from a dropdown list in apex. what i did was to create a table in the oracle db with the report name and url as columns, from apex all i did was to create a list item which queries the table a should display the report using the url. but the report is not showing properly, what do you thinl i can do.
i am using the following verion:
bi publisher: 11g (11.1.1)
apex: 4.2.1.00.08
oracle database: 11.2.0.1.0
Thanks.
AbdurRahmanHopefully, that could be helpful for you,
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/prod/install/apexinst/apexinst_prod.htm
http://dgielis.blogspot.jp/2007/12/call-bi-publisher-report-from-apex.html
https://blogs.oracle.com/xmlpublisher/entry/apex_integration_with_publishe
Edited by: Weibing.Xia on 2013-5-20 下午5:40 -
Running custom BI (XML) publisher report from BPEL
We would like to run a custom BI publisher (XML publisher) report from BPEL process and the resultant PDF report output needs to be FTPed to specific location. BPEL can pass on the XML content required for the report.
Is this possible or any workaround for this ?Any light on this ?
-
Calling a XML Publisher report from FND_SUBMIT_REQUEST
Hi,
I need to submit a XMLP report from FND_SUBMIT_REQUEST.
The report will have say, 4 templates for 4 seperate languages.
Now, when i call the report from submit request, i need to give the name of a template that will get attached.
Does anybody have any idea which parameter in the submit request parameter list takes the name of a template?
Please let me know if anybody has any info on this.
Can mail me at [email protected]
Regards,
SatrajitHi,
You can use FND_REQUEST.SUBMIT_REQUEST for submitting the report. The syntax is as follows:
function FND_REQUEST.SUBMIT_REQUEST
(application IN varchar2 default NULL,
program IN varchar2 default NULL,
description IN varchar2 default NULL,
start_time IN varchar2 default NULL,
sub_request IN boolean default FALSE
argument1,
argument2, ..., argument99,
argument100) return number;
Here is the code that I used for submitting XML Report Publisher from within my Oracle Report's AfterReport trigger. The parameters are explained.
a:=FND_REQUEST.SUBMIT_REQUEST('XDO', 'XDOREPPB','Varun XML Report Printing', NULL, FALSE, :P_CONC_REQUEST_ID , 'MYONT','MY_PREPACK_XML','en-US' ,'N', 'RTF', :p_output_format,NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL );
srw.message(123,'Value of New Request : ' || a ||' Output Format :'||:p_output_format);
Hope it helps.
Thanks
Varun -
Calling a xml publisher report from Ebs - question
Hi,
I know how to call a xml report from ebs using concurrent manager. But i want to open it from a form in application.
My situation is this:
There is a form in the payables modelue, where i search for all the invoices.
There is also a button action in this form wich take the id of the row in wich it is my position and open a rtf raport with this id.
What i need to do is to call my xml report in this button . To pass my raport the id of the row in wich i am and open my report with paramateres.
Can this be done? Has anyone tried this before?
Thanks in advance,
Best regardsHi,
You can use FND_REQUEST.SUBMIT_REQUEST for submitting the report. The syntax is as follows:
function FND_REQUEST.SUBMIT_REQUEST
(application IN varchar2 default NULL,
program IN varchar2 default NULL,
description IN varchar2 default NULL,
start_time IN varchar2 default NULL,
sub_request IN boolean default FALSE
argument1,
argument2, ..., argument99,
argument100) return number;
Here is the code that I used for submitting XML Report Publisher from within my Oracle Report's AfterReport trigger. The parameters are explained.
a:=FND_REQUEST.SUBMIT_REQUEST('XDO', 'XDOREPPB','Varun XML Report Printing', NULL, FALSE, :P_CONC_REQUEST_ID , 'MYONT','MY_PREPACK_XML','en-US' ,'N', 'RTF', :p_output_format,NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,NULL );
srw.message(123,'Value of New Request : ' || a ||' Output Format :'||:p_output_format);
Hope it helps.
Thanks
Varun -
Printing BI Publisher report from OAF Page
We have a requirement to display a BI Publisher Report on the invoke of a Button/Link from a OAF Page. One way to achieve this without invoking a concurrent program is by following the method described in the link below :-
http://apps2fusion.com/at/51-ps/260-integrating-xml-publisher-and-oa-framework
In the current scenario, we already have developed Data Definition (XML) and Template (RTF) for the report and is used too. We want to use the same Data Definition and Template but invoke from a OAF Page. Is there a way to achieve this?
In the method mentioned in the above link, we would have to create many VO's to generate the XML, since the XML needed in our case is a detailed one, we would need to create many VO's to achieve this. Hence looking out for a way in which we can invoke the Data Definition (XML) already registered in the BI Publisher.
Any inputs to achieve this would be helpful.
Regards
NaveenNaveen,
You need to read the documentation here:
http://www.oracle.com/technetwork/middleware/bi-publisher/documentation/xmlpdocs-084437.html
All of the information you need is in these:
Administration and Developer's Guide
Report Designer's Guide
JavaDocs
With the BI publisher (XML publisher) Java APIs, you can call a data template with parameters and get the XML from that.
For an example that should be very close to what you need to do, see the comments section of this page:
http://apps2fusion.com/at/ps/294-bi-publisher-document-viewer-common-region-embeded-report-output-in-oa-framework-page-part-2
Find the comment titled: "Alternative: BlobDomain from data template"
The great thing about using a Data Template is that, while you are NOT concurrent program dependent, you can still set up a concurrent program to run it for other purposes if you wish. Data Templates offer a lot more flexibility.
Kurz -
XML Publisher Report:how to disappear the column if no data found
Hi,
I have a XMl publisher report requirement , the format is tabular lets say with the structure of 4 columns and 10 rows.requirement is to if suppose there is no data for row number 6 the row itself should not appear over the report and the immediate next row should come in place.
please help me if any one of u has implemented the same.
AnkitAnkit,
This is almost hard to work although NOT impossible to achieve on the template.
A little big of PL/SQL genius where all the columns are selected into variables may be used to achieve this, although you will have to manage them accordingly.
I don't any other way round it.
Rgds -
Call BI Publisher report from PL/SQL
Hi,
I was looking for a solution to "download" a PDF report from BI Publisher in a PL/SQL procedure. After the download, I need to insert it into a table.
I can't believe noone ever done this, but I can't find a good solution.
Thanks,
Janintersting...
look at java api
so as idea you can try to use java for working with report in database then wrap it by plsql and use
look at Oracle&reg; Fusion Middleware Developer's Guide for Oracle Business Intelligence Publisher 11g Release 1 (11.1.1) - …
7 Using the BI Publisher Java APIs
8 Using the Delivery Manager Java APIs
Maybe you are looking for
-
thanks. i downloaded the driver from Drivertoolkit Software it has seen the printer and driver is working but it is not printing. my question is do i need to choose my particular Port where the Usb Printer is located on my laptop? i am using usin
-
How can i find my ipod touch 5th g that has been stole (it does have icloud but it says that it needs internet connection) i dont know what to do now plz help
-
Splitting multiple IDoc XML files into single IDoc messages for R/3
Hi all. I have a problem splitting IDoc XML files coming in to XI. I currently have an interface that takes in single store sale IDoc transactions (type WPUBON01) in an IDoc XML file. I then have some complex graphical mapping on the IDoc before send
-
I'm trying to export my InDesign document to PDF, but even though i select all the pages, it only exports the last page. What can i do?
-
Chaining 2011 MBA to Seagate GoFlex Thunderbolt to DVI monitor
Hello Chaps, I'm currently using a macbook air with an adapter to connect my LG 24" LCD panel. What I am wondering is if I can take advantage of the thunderbolt port for my external drive using the Seagate dock (GoFlex Desk STAE127) then chain onward