The oracle applications is continuously evolving with the use of new technologies.
It is shifting from a traditional form based application to a self service web based application using Oracle Applications Framework (OAF) .
Every application requires a seamless integration with the reporting tools.
OA Framework seamlessly integrates with XML Publisher to fulfill the Oracle Applications reporting requirement.
In this article we will discuss in detail the integration of OA Framework and XML Publisher with an example.
It is assumed that the reader has basic understanding of OA Framework and XML Publisher.
The article has the following section
1) XML Publisher Architecture
2) Designing the OAF BC4J Data Model.
3) Designing the OAF Page and generating the Data XML
4) Designing the RTF Template using Data XML
5) Registering the Template with Oracle Applications.
6) Integrating the OAF page With XML Publisher.
7) Invoking the report from OAF
Step 1 : XML Publisher Reporting Architecture
An XML publisher report consist of a report template designed in RTF or PDF Formatand a Data XML file. The template contains the report layout. During execution the Data XML File is merged with the template to generate a PDF, HTML, EXCEL or RTF report.
SELECT empno,ename,job,mgr,hiredate,comm,deptno FROM emp
The Jdevloper should look like this
Step 3 : Generating the XML for Template Design
Design a OAF Page EmpPG with the Following Code in the Controller EmpCO.
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 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();
}
}
{
try {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
OAViewObject vo = (OAViewObject)findViewObject("EmpVO1");
((XMLNode) vo.writeXML(4, XMLInterface.XML_OPT_ALL_ROWS)).print(outputStream);
System.out.println(outputStream.toString());
}
catch(Exception e)
{
throw new OAException (e.getMessage());
}
}
<EmpVORow>
<Empno>7369</Empno>
<Ename>SMITH</Ename>
<Job>CLERK</Job>
<Mgr>7902</Mgr>
<Hiredate>1980-12-17</Hiredate>
<Deptno>20</Deptno>
</EmpVORow>
<EmpVORow>
<Empno>7499</Empno>
<Ename>ALLEN</Ename>
<Job>SALESMAN</Job>
<Mgr>7698</Mgr>
<Hiredate>1981-02-20</Hiredate>
<Comm>300</Comm>
<Deptno>30</Deptno>
</EmpVORow>
<EmpVORow>
<Empno>7521</Empno>
<Ename>WARD</Ename>
<Job>SALESMAN</Job>
<Mgr>7698</Mgr>
<Hiredate>1981-02-22</Hiredate>
<Comm>500</Comm>
<Deptno>30</Deptno>
</EmpVORow>
</EmpVO>
Install the Oracle XML Publisher Desktop available via patch 5887917. Open the Microsoft word. You should be able to see the following menus and toolbars.
Using the Table Wizard as below to create the 'Table Report Format' with all the columns of EMP.
Login with a user having "XML Publisher Administrator" Responsibility.Navigate to Home --> Data Definition and define the data definition.
Design the EmpPG page to appear as shown below.
Set the Action Type and Event property of the Tourch Image Item to FireAction and GenerateReport respectively. Modify the Controller and ApplicationModule as below
Imports :
import oracle.xml.parser.v2.XMLNode;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import oracle.apps.xdo.XDOException;
import oracle.apps.xdo.oa.schema.server.TemplateHelper;
import oracle.cabo.ui.data.DataObject;
import oracle.jbo.XMLInterface;
EmpCO :
private static final int DEPTH = 4;
private static final int APP_ID = 20035;
private static final String APP_NAME = "XXIGS";
private static final String TEMPLATE_CODE = "Emp_Template";
private static final int BUFFER_SIZE = 32000;
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
super.processRequest(pageContext, webBean);
OAApplicationModuleImpl am= (OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
am.invokeMethod("initEmpVO");
}
{
super.processFormRequest(pageContext, webBean);
OAApplicationModuleImpl am= (OAApplicationModuleImpl)pageContext.getApplicationModule(webBean);
String event = pageContext.getParameter("event");
if("GenerateReport".equals(event))
{
// 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 {
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(Exception e)
{
response.setContentType("text/html");
throw new OAException(e.getMessage(), OAException.ERROR);
}
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();
}
}
{
OAViewObject vo = (OAViewObject)findViewObject("EmpVO1");
XMLNode xmlNode = (XMLNode) vo.writeXML(4, XMLInterface.XML_OPT_ALL_ROWS);
return xmlNode;
}
Run the EmpPG page and click on the tourch icon. The File Download window appear. Click on the Open Button to view the report.
Comments
Good Article. I believe we can levarage this approach to view the output of XMLP report with the user desired output format like Excel/HTML/PDF.
By providing a LOV to select the output format and change the PFR to set that output to TemplateHelper. processTemplate
Using this approach we can overcome the restriction to default output (PDF) from SRS.
Thanks for sharing.
Awesome article. I had been requesting Anil to publish something on this integration for a long time.
Did you not leverage the XDOCommonRN in your integration?
T his one is actually a better way I think, it provides more flexibility.
R itu
Indeed you and others requested this in past.
But given that I myself had learnt this technique from Prabhakar, I wanted Prabhakar to publish this himelf.
For those who don't know, when Prabhakar was in Oracle Corp, he had developed various complicated XMLP reports that could be invoked from OAF in realtime.
Chee rs,
Anil Passi
Ritu, XDO Common region in my understanding should be used when one want to give the end user some data filtering options. Like you can have two regions.
Region 1 :
A search Region where u can have UI components to enter the search criteria
Region 2:
XDO Common region where you display the report. The report data will be based on the search criteria
If one wants to get the content of a page say invoice page into a report, then he can use the logic shown in the article.
I will shortly publish a article for the XDO Common Region
Thanks
Prabhakar.S
Import the class oracle.apps.xdo .oa.schema.serv er.TemplateHelp er in the controller. This will be available in $JAVA_TOP/oracl e/apps/xdo/oa/s chema/server. I would advise you to copy the xdo directry from the $JAVA_TOP and create a zip file and add it to the Project Libraries.
Tha nks,
Prabhakar. S
pl s Explain it step by step ?
and
iam not able to run this xdo page from Jdeveloper itslelf.
can you help me out to achieve that ?
I want to create a pdf template instead of rtf template for my report, and make some fields as editable.
The generated pdf output should have some fields as editable which anyone can fill and save through adobe reader.
I tried creating such pdf template through adobe acrobat but facing issues. When I create a template through xml publisher admin responsibility and attach my template, it errors out. Also, if I create a rtf template with pdf form fields in it, it generate a static pdf output.
Any help is greatly appreciated.
T hanks,
Dev
'could not open because it either not a supported file or because the file has been damaged(for example , it was sent as an email attachement and wasnt correctly decoded)'
Woul d be glad if you help me debug this error message.
Thanks
Jyo
I did all the above listed steps .
I made it in ak module so i changed private static final int APP_ID = 601;
I get prompted to open/save the pdf file . I click on Open, gives me the follwoing error :
'could not open because it either not a supported file or because the file has been damaged(for example , it was sent as an email attachement and wasnt correctly decoded)'
Would be glad if you help me debug this error message.
Thanks
Jyo
The step where you are getting your XML Data source, would it be possible to define another data source for it that is now part of the page definition? (For example, a Concurrent Request where the output is in XML). Thanks, Danny
I try to call a report with data. When I use template and data in English there is no problem. But Template in Turkish containing some characters different from Engilish I can see only the empty template. What can be the reason?
Thsnks.
when I try open the PDF file
could not open because it either not a supported file or because the file has been damaged(for example , it was sent as an email attachement and wasnt correctly decoded
Please advice what shoud I do?
Thanks
Sur esh
If the template needs two different queries(some fields in report may be repeated), how can I combine two xml data produced by different queries(diifere nt view objects)?
Thank s in advance.
Eve n I am getting the same error as some above
when I try open the PDF file
could not open because it either not a supported file or because the file has been damaged(for example , it was sent as an email attachement and wasnt correctly decoded
Please advice what shoud I do?
Thanks,
Dean
i'm a new user of ur site
can u help me on that topic
i want record in GL
'''''' undefined accounting periods in the current accounting calendar '''''''''''
help me
thanks
What exactly use of this code and where do i get a sessionParamete rs for assigning to this.
Is it automatically populated,or we have to write some code for this.
Could you please advice me.how to get these values.
// Get the HttpServletResp onse object from the PageContext. The report output is written to HttpServletResp onse.
DataObject sessionDictiona ry = (DataObject)pageContext.getNamedDataObject("_SessionParameters");
HttpServletResp onse response = (HttpServletResp onse)sessionDictiona ry.selectValue(null,"HttpServletResp onse");
I am also getting the same error as "not a supported file or file has been damaged".
when I try open the PDF file
could not open because it either not a supported file or because the file has been damaged(for example , it was sent as an email attachement and wasnt correctly decoded
Please advice what to do?
Regards--
Pra thapreddy.
for the same code I tried to generate HTML type report.
it is showing the below mentioned error message and query
No corresponding LOB data found :SELECT L.FILE_DATA FILE_DATA,DBMS_ LOB.GETLENGTH(L .FILE_DATA) FILE_LENGTH, L.LANGUAGE LANGUAGE, L.TERRITORY TERRITORY, B.DEFAULT_LANGU AGE DEFAULT_LANGUAG E, B.DEFAULT_TERRI TORY DEFAULT_TERRITO RY,B.TEMPLATE_T YPE_CODE TEMPLATE_TYPE_C ODE, B.USE_ALIAS_TAB LE USE_ALIAS_TABLE , B.START_DATE START_DATE, B.END_DATE END_DATE, B.TEMPLATE_STAT US TEMPLATE_STATUS , B.USE_ALIAS_TAB LE USE_ALIAS_TABLE , B.DS_APP_SHORT_ NAME DS_APP_SHORT_NA ME, B.DATA_SOURCE_C ODE DATA_SOURCE_COD E, L.LOB_TYPE LOB_TYPE FROM XDO_LOBS L, XDO_TEMPLATES_B B WHERE L.APPLICATION_S HORT_NAME= :1 AND L.LOB_CODE = :2 AND L.APPLICATION_S HORT_NAME = B.APPLICATION_S HORT_NAME AND L.LOB_CODE = B.TEMPLATE_CODE AND (L.LOB_TYPE = 'TEMPLATE' OR L.LOB_TYPE = 'MLS_TEMPLATE') AND ( (L.LANGUAGE = :3 AND L.TERRITORY = :4) OR (L.LANGUAGE = :5 AND L.TERRITORY = :6) OR (L.LANGUAGE= B.DEFAULT_LANGU AGE AND L.TERRITORY= B.DEFAULT_TERRI TORY ))
Also I have a Doubt that where we are assigning the data to the "pdfFile"?
Regards--
P rathapReddy
I am tried to generate a .Pdf file.It is generating,but without data.
could you please help me out,where i am wrong.
Thanks & Regards
Sreeram a Vaskuri
I found some sample to call the concurrent programm in the OAF Page.
I have some doubts, below is the details.
When I try to call the Concurrent program from my controller class it is showing the following error message
oracle.apps.fnd.cp.request.RequestSubmissionException: Cannot submit concurrent request for program POSReport
below is t code I used to call the Concurrent program.
OAException oaexception1 = null;
Number number = 123;
OADBTransaction oadbtransaction = am.getOADBTrans action();
Vector vector = new Vector();
vector.addEleme nt(String.value Of(number));
try
{
ConcurrentReque st concurrentreque st = new ConcurrentReque st(oadbtransaction.getJdbcConnection());
int i = concurrentreque st.submitRequest("AK", "POSReport", "", null, false, vector);
oadbtransaction .commit();
It is exactly giving the error at the calling of the *concurrentreque st.submitRequest*
Pls advise me how to overcome this.
Also where can we find the JavaDoc for all these classes?
Also will it shows the report of the concurrent request after execution?
Im trying to run this to generate a report.
I have registered the report In the Apps.
I want to call that report in the OAF page.
Regards--
Pra thapReddy
I am trying to initantiate a Datatemplate using oracle.apps.xdo .oa.util.Datate mplate for a Data Definition that I have defined earlier.
Later I have imported xdo directory and included it in the library (using Project settings). Then I was getting an error for oracle.apps.fnd .i18n
I have imported the same onto my system and included in the library .
Now I am getting an error saying java.lang.NoSuc hMethodError, msg=oracle.apps .fnd.i18n.commo n.text.resource s.CalendarResou rceAccessor.get EraResources()
What could be the reason for this error.
And apart from the xdo package what other libraries should we import
At present i am wokring EAM Module. Here i need to call one XML Publisher report.
In my OAF Page one button is there. After clicking this button i need to fire one report(The name of the report is "Maintenance Picking Slip Issued Report").
Please help me how to call report? I don't have any idea how to proceed for this.please explain clearly.
Than ks in advance..
Than ks,
Somasekhar.
Thnaks,
Soma sekhar
The PDF report is openiing perfectly.
The problem is we need to add all the fnd and xdo classes in the classes folder when we are trying with JDeveloper, then it is working fine.
Now my question is can we able to open the PDF Report directly, instead it prompts us for save or open options.
I think this can be done by modifying the parameters for TemplateHelper. processTemplate method.
I tried and I am unable to get it. Can you help me regarding this.
Regards --
PrathapReddy
How will we print output in XML from OAF page.
As i cant get the OAF files from the server, what should i do to get output in XML from instance as u said "System.out.pri ntln".
I have Access to XML publisher administrator can i do anything there??\
Regra rds,
Chanu
I am able to prepare a xml publisher PDF report with single VO(select query) with the help of above steps where as in my requirement I required to write more then one VO(select querys). Can you give some ideas how to proceed?
--
Gs rC
have anyone found the specific reason for this.
I uninstalled the Adobe reader, then the page showed me the real reason why it was not working. I was getting the error because I had written the method "getEmpDataXML" in the controller and was trying to call it from AM just like how the code here is doing. Once I got the exact error, I fixed the error and installed adobe reader and issue was resolved!
I have a custom xml publisher report already developed which is being run from the SR window. Now the client requirement is to call the same xml publisher from a self service page. The existing code is a PL/SQL code which queries and generates the xml tags for a appraisal_id (Primary key for the whole data) that is passed. Is there a way to reuse the same code, that is create callable statement and execute that procedure to get the xml data. What are the classes that are to be used to get such data from the procedure and convert it to XMLNode in the controller of the page?
Excellent article !!!
I have an query regarding the above test program. I tried following steps as detailed above and am stuck at Step 5
Step 5:
Code = EmpDataDefiniti on
Is "EmpDataDefiniti on" a concurrent program or VO name ? If not a concurrent program where to deploy it and how to register it ?
My goal to try to use OAF-VO instead of rdf reports for data-model in XMLP. Can this be done ?
Cheers,
Setu
I am new in OAF. I am trying create OAF to call xml publisher.
Coud l you send to me all source of steps above.
Many thanks for your helps
Is there a way in OA Framework such that when the user clicks a link,a pdf file contaning the output of report or concurrent program should get fired. The pdf file path will be stored in unix and can find out the path from a table.
Any suggestions....
Please help me out
Even I am getting the same error as some above
when I try open the PDF file
could not open because it either not a supported file or because the file has been damaged(for example , it was sent as an email attachement and wasnt correctly decoded
Please advice it's very urgent.
if any one got solution plz send me my mail id: rohit15vyahoo.com
Eve n I am getting the same error as some above. When I try to open the pdf file "could not open because it either not a supported file oor because file has been damaged..."
Ple ase advice, it is very urgent. If you have any solution, please send me through email: hieulc_2004yahoo.com
Doc ID: 429990.1 How to Submit a Concurrent Request Using a Self-Service Page
Doc ID: 334847.1
Subjec t:How to add a report to a 11i Self Service Menu
One More Way,
It seems to Submit Active Users, we can add a button(Create a New Item) to a any page using personalization and call FNDCPPROGRAMPAG E,
Destination URI: OA.jsp?akRegion Code=FNDCPPROGR AMPAGE&akRegion ApplicationId=0 &programApplNam e=FND&programNa me=FNDSCURS
Pro mpt: Active Users Report
Tha nks for such a nice article. We have followed this and worked on a prototype of a project and everything worked fine. We then enhanced this to actual project, which is based based two queries (master/detail) . It is producing two independent xml documents. What we need is root elements which includes these two xml documents. We tried to add two string variables and concatenate them to outputstreams but were unsuccessful (may be due our limited knowledge of the java classes).
Could you advise what we can do to get desired output? I request Prabhakar, Anil and all Jdeveloper experts in the forum to suggest what we can do and appreciate all your inputs.
Thanks ,
Venkat
I can able to generate the pdf file from one view object but in my case I have to generate the pdf file from multiple VOs .
can any one suggest me how to do?
thanx
Rama putchakayala
when I try open the PDF file
could not open because it either not a supported file or because the file has been damaged(for example , it was sent as an email attachement and wasnt correctly decoded
Please advice what to do? or send it to my email
thx
khalifa
i did wha you tell me but the i still got "could not open because it either not a supported file or because the file has been damaged " when the PDF file opens
i really don't know what to do
thx
khalifa
can anyone help me i follow the previos steps and the PDF was generated but when i tried to open it an error message appear " file has been damaged"
althou gh i have XDO folder in my classes folder
did anyone solve this problem or it because version of jdeveloper
my email is eng.heba2006yahoo.com
thx
heba
i want to know if i can use the previous code to generate report based on multipule view objects meaning that the report will be in form of master detail
or is there any other way to do that ??
my email is h.khalifahotmail.com
thx
khalifa
public XMLNode getpayDataXML()
{
ByteArrayOutput Stream outputStream = new ByteArrayOutput Stream();
ByteArrayOutput Stream outputStream1 = new ByteArrayOutput Stream();
MainVOImpl mv = getMainVO1();
Leave_BalanceVO Impl lb = getLeave_Balanc eVO1();
XMLDocument doc = new XMLDocument();
Element root = doc.createEleme nt("root");
Element per= null;
Element sal= null;
Element deduction= null;
Element tpay = null;
Element tded = null;
Element total = null;
Element days_present = null;
Element leave_balance = null;
Double paym = 0.0;
Double ded = 0.0;
Element dummy = null;
mv.executeQuery ();
while(mv.hasNex t())
{
//System.out.pr intln("4");
per = doc.createEleme nt("PersonRow") ;
String ch = "";
Row p1= mv.next();
String s[] = p1.getAttribute Names();
int c = p1.getAttribute Count();
//System.out.pr intln("Count =" + c);
for (int i=0;i
I have an RDF Report which generates the XML data and XML template registered in BI publisher.
Req uirement is to fire the custom existing report instead of standard report.
The standard controller seems to generate XML and generate OA framework report as shown in your example.
But I want to extend the existing controller / overwrite the standard to call my custom report.
Can you tell me how to do this?
Thanks & Regards
Raj
Please guide in this case. Have been sturggling with this error for almost 4 days..
I need to call a concurrent program using OAF personalization . I got this working fine but I need to know how to pass parameter values to the concurrent program. Please suggest a way to do this.
Regards,
Girish.
sub mitRequest("AP" , "APXSOBLX ", "Supplier Open Balance Letter", null, true, params); // arguments vector
Please check the Comments section og following Blog entery for futher details on the same question.
Subm itting BI Publisher Concurrent Program from PL/SQL
http://www.adivaconsulting.com/adiva-blog/item/8-bip_concurrent_program_plsql
-Raj
www.adivaconsulting.com
I assume, you want a master detail relationship between VOs. just add thechild VO as View Link and execute the Master VO. When you invoke the master VO to write the xmlNode and write file stream, It will write the xml for all viewlink as well.
-Raj
www.adivaconsulting.com
I got the same error and in the text that is dumped into the PDF (the PDF contains a complete dump of the error page it seems) i could see that it is because of the file path.
The file path in JDeveloper is built with windows "\" separator for the folders, while it should be the unix "/" off course.
After installing the page on the server everything worked fine for me.
Instead of a PDF.. I set the output for html, so I could read the error message. Their was an error message "No corresponding LOB data.." BLAH BLAH. Come to find out, it could not find my template. Through some trial and error, I set the TEMPLATE_CODE = and the error message went away. Set it back to PDF.. and success... it is working beautifully.
Not sure why, I'm just a beginner in all this.
How can i build xdo library from xdo directory on oaf server to my jdeveloper client
thanks
I am also getting this error
Error: file type is not supported or file is damaged
while trying this example.
Pleas e provide the solution for it,i have gone thorugh the comments above, tried to acchieve,but unable to suceed.
:(
Ple ase help!!
I am also getting the error as mentioned above. I am working on R12.
Please suggest something . I am not able to proceed further.
~Rich a
My requirement is as below
I have a master page which has a simple search region.
For eq
If i query the master page it gives me 5 records
Clickin g on any of the records takes me to the details of that record.
I have a button which generates the PDF output for that detail record.
I want the functionality that when the user clicks the button the PDF output should directly be printed
Currently the user has to open the PDF output and then Click on the Print in PDF output to print the record
My next requirement is that to bring the PDF button(on the detail Page) to the master page so that on one click i should be able to Print all the PDF report records.
Pleas e help me with this
Thanks
Do you think it could be possible to bypass the pop up window "File download security Warning"
and go directly to the PDF file
Thanks
It was a nice a nice article, I have added few properties to make it work.
Now I have a big issues we have developed this XML report based on a view, but when I modify the view like adding a column or removing a column it is throwing some errors.
can you please suggest me what to do if VO objects base query that is based on VIEW modified?.
Tha nks in Advance.
Srini vas
Then create the tmp folder in your local system where jdeveloper is installed.This will fix the issue.
suppose if ur jdeveloper is present in D drive ,then create the tmp folder in D drive.
It will fix the error.
Than ks,
Praveen Sudhati.
public XMLNode[] getDataXML()
{ int r = 0;
XMLNode NodeList[] = new XMLNode[15];
try {
ByteArrayOutput Stream outputStream = new ByteArrayOutput Stream();
XxisbtYbnOzlukV OImpl vo = getXxisbtYbnOzl ukVO1();
XxisbtYbnTertay VOImpl tvo = getXxisbtYbnTer tayVO1();
XxisYbnEgitimVO Impl evo = getXxisYbnEgiti mVO1();
XxisHrYbnCezaBi lgileriVOImpl cvo = getXxisHrYbnCez aBilgileriVO1() ;
XxisbtYbnTumPer formansVOImpl pvo = getXxisbtYbnTum PerformansVO1() ;
TesekkurBilgile riVOImpl tevo = getTesekkurBilg ileriVO1();
YakinmaBilgiler iVOImpl yvo = getYakinmaBilgi leriVO1();
XxisYbnOdulBilg ileriVOImpl ovo = getXxisYbnOdulB ilgileriVO1();
XxisHrHyoToahVO Impl hvo = getXxisHrHyoToa hVO1();
NodeList[0] = (XMLNode)vo.wri teXML(4, XMLInterface.XM L_OPT_ALL_ROWS) ;
((XMLNode)vo.wri teXML(4, XMLInterface.XM L_OPT_ALL_ROWS) ).print(outputS tream);
if(tvo.first()! =null){
NodeList[1] = ((XMLNode)tvo.w riteXML(4, XMLInterface.XM L_OPT_ALL_ROWS) );
((XMLNode)tvo.w riteXML(4, XMLInterface.XM L_OPT_ALL_ROWS) ).print(outputS tream);
System.out.prin tln(outputStrea m.toString());
}
if(evo.first()! =null){
NodeList[2] = ((XMLNode)evo.w riteXML(4, XMLInterface.XM L_OPT_ALL_ROWS) );
((XMLNode)evo.w riteXML(4, XMLInterface.XM L_OPT_ALL_ROWS) ).print(outputS tream);
}
if(cvo.first()! =null){
NodeList[3] = ((XMLNode)cvo.w riteXML(4, XMLInterface.XM L_OPT_ALL_ROWS) );
((XMLNode)cvo.w riteXML(4, XMLInterface.XM L_OPT_ALL_ROWS) ).print(outputS tream);
}
if(pvo.first()! =null){
NodeList[4] = ((XMLNode)pvo.w riteXML(4, XMLInterface.XM L_OPT_ALL_ROWS) );
((XMLNode)pvo.w riteXML(4, XMLInterface.XM L_OPT_ALL_ROWS) ).print(outputS tream);
}
if(tevo.first() !=null){
NodeList[5] = ((XMLNode)tevo. writeXML(4, XMLInterface.XM L_OPT_ALL_ROWS) );
((XMLNode)tevo. writeXML(4, XMLInterface.XM L_OPT_ALL_ROWS) ).print(outputS tream);
}
if(yvo.first()! =null){
NodeList[6] = ((XMLNode)yvo.w riteXML(4, XMLInterface.XM L_OPT_ALL_ROWS) );
((XMLNode)yvo.w riteXML(4, XMLInterface.XM L_OPT_ALL_ROWS) ).print(outputS tream);
}
if(ovo.first()! =null){
NodeList[7] = ((XMLNode)ovo.w riteXML(4, XMLInterface.XM L_OPT_ALL_ROWS) );
((XMLNode)ovo.w riteXML(4, XMLInterface.XM L_OPT_ALL_ROWS) ).print(outputS tream);
}
if(hvo.first()! =null){
NodeList[8] = ((XMLNode)hvo.w riteXML(4, XMLInterface.XM L_OPT_ALL_ROWS) );
((XMLNode)hvo.w riteXML(4, XMLInterface.XM L_OPT_ALL_ROWS) ).print(outputS tream);
}
}
catch(Exception e)
{
throw new OAException (e.getMessage() );
}
return NodeList;
}
Controller:
byte buf[] = "".getBytes();
outputStream.wr ite(buf);
XMLNode Nodes[] = new XMLNode[10];
Nodes = AM.getDataXML() ;
for(int i = 0;i
byte buf[] = "".getBytes();
outputStream.wr ite(buf);
XMLNode Nodes[] = new XMLNode[10];
Nodes = AM.getDataXML() ;
for(int i = 0;i
can u tell me the code to be written in the co file for go button if the requirement is like if we give the emplno in emp table then d whole details of that empno should be displayed
for eg if 7369 is typed and go button is pressed then the oputput must show all its details like ename,job,mgr etc
pzzz do help me
Anyway s, a big thanks to the author to help me learn the integration. Truly appreciate his effort and the site's initiative in making these kind of things available to developers like me.
Payslip report has 3-4 queries in it.
How to use those 3-4 queries so that I will get XML with groups in it
Tha nks for the wonderful guide.
I was able to successfully generate a PDF in my local machine. However, after deploying the changes in our Dev instance, the PDF generated in the Dev instance is corrupted.
The file size generated in my local is 100KB. In the Dev instance, the file is significantly less, about 65KB only.
Have you encountered this error?
Thanks,
Donard
Quote:
Does anyone know a solution to this problem?
Tha nk you so much for the great tutorial. But I have a wierd requirement. I would be really thankfull if you can provide some inputs.
When the button is clicked on the self service page, the PDF has to go to the printer without previewing it. Is there anyway to achieve this? PLEASE HELP...
Thanks ,
Narender
can anyone help me, i followed the previous steps and the PDF was generated but when i tried to open it an
error message as below
"Adobe Reader could not open because it either not a supported file or because the file has been damaged(for example , it was sent as an email attachment and wasn't correctly decoded"
even i have XDO folder in my classes folder
Did anyone solve this problem, Please advice what to do?
or send it to my email ganeshg.lerpgmail.com
XMLNode xmlnode1 = null;
XMLNode xmlnode2 = null;
if(!isNull(as[2 ]) && "Y".equalsIgnor eCase(as[2]))
{
HeaderTemplateV OImpl headertemplatev oimpl = getHeaderTempla teVO();
headertemplatev oimpl.setWhereClauseParam(0, as[8]);
headertemplatev oimpl.executeQuery();
headertemplatev oimpl;
xmlnode1 = (XMLNode)headertemplatev oimpl.writeXML(3, 0L);
}
The above code
XMLNode xmlnode = (XMLNode)header voimpl.writeXML (6, 0L);
xmlnode1 = (XMLNode)headertemplatev oimpl.writeXML(3, 0L);
WriteXML( 6,0L) and writeXML(3, 0L) What are why those are using icant understand that thngs and
6, 0L what is the meaning of those thimgs.
please help me
I want to display the output using different html tags to beautify the output in pdf. Your demo works great but when my data contains the html tags inside the xml template, it's only displaying the tags directly instead of displaying the formatted data.
Any suggestions on how to deal with this?
Thank You
Raj
learn Oracle OAF through Online for Details Please go through the Link
Oracle OAF Online Training with free demo in INDIA | GERMANY | USA | UK
This Will Helps you aalot.
We are unable to view the images in your articles.
Please share images.
Thank you.
İ am getting this error "xml-20108 (fatal error) start of root element expected" Is it version problem or bug? please help me
RSS feed for comments to this post