Stapes to create and register the report
===============================>
Stop1 :- create a .RDF report
Stop2 :- move to the needed \top in server
Step3 :- register the concurrent program
Step4 :- after run the concurrent xml tag generate
Step5 :- store the file in .xml
Stop6 :-go to MS-WORD
this screen is there Used ths screen to load the data
Stop7 :-create a template and store Rtf
Step8 :-
1)Goto the XML Publisher Administrator Responsibility 2)Select Data Definations form Enter Data Defination Name = Enter Any Name Code = Concurrent Program Short Name Application = Any application startdate = Current Date 3)Copy the DataDefination name we have to add this to the Templete 4)Open the Templete Form Enter Templete Name : Any Name DataDefination : enter data defination whatever we have created Code : Concurrent Program Short Name Type : rtf application : any Application File : Upload the .rtf file Laguage : English Territory : United States 5)Select Apply button After register the .rtf file submit concurrent Program from SRS window system will automatically pick the .rtf file and generates the Output. If we want to customze the .rtf file we have to download by using templete , Customize then upload the .rtf templete
SCREENSHOTS
====================>
3. Create a new concurrent program SampleXmlReport that will call the SampleXmlReport executable declared above. Make sure that output format is placed as XML.
Go to Application Developer Responsibility -> Concurrent ->Program
4. Make sure we declare the parameters for the procedure.
5. Add this new concurrent program with Receivables request group. Either using the following code or through below application screen.
DECLARE
BEGIN
FND_PROGRAM.add_to_group
(
PROGRAM_SHORT_NAME =>’CUST_XML_SAMPLE’
,PROGRAM_APPLICATION =>’AR’
,REQUEST_GROUP => ‘Receivables All’
,GROUP_APPLICATION =>’AR’
) ;
commit;
exception
when others then
dbms_output.put_line(‘Object already exists’);
END ;
/
Go to System Administrator Responsibility ->Security ->Responsibility->Request
6. From the receivables responsibility (depends on which responsibility we added our concurrent program here it is receivables)
From the menu View->Requests->Submit A New Request->Single Request
Note: The layout field is blank as we haven’t attached any Template or layout to this concurrent program yet.
By submitting the above request we get the output in xml (depending on procedure) as follows:
<?xml version="1.0" ?>
- <CUSTOMERINFO>
- <P_CUSTOMER>
<CUSTOMER_NAME>UNIV OF CHICAGO HOSP</CUSTOMER_NAME>
<CUSTOMER_ID>1119</CUSTOMER_ID>
- <P_INVOICES>
<CUSTOMER_TRX_ID>929476</CUSTOMER_TRX_ID>
<CUSTOMER_ID>1119</CUSTOMER_ID>
<INVOICE_NUMBER>2484403</INVOICE_NUMBER>
<AMOUNT_DUE_ORIGINAL>8000</AMOUNT_DUE_ORIGINAL>
</P_INVOICES>
- <P_INVOICES
<CUSTOMER_TRX_ID>929374</CUSTOMER_TRX_ID>
<CUSTOMER_ID>1119</CUSTOMER_ID>
<INVOICE_NUMBER>2484267</INVOICE_NUMBER>
<AMOUNT_DUE_ORIGINAL>380.68</AMOUNT_DUE_ORIGINAL>
</P_INVOICES>
- <P_INVOICES>
<CUSTOMER_TRX_ID>806644</CUSTOMER_TRX_ID>
<CUSTOMER_ID>1119</CUSTOMER_ID>
<INVOICE_NUMBER>2421373</INVOICE_NUMBER>
<AMOUNT_DUE_ORIGINAL>615.96</AMOUNT_DUE_ORIGINAL>
</P_INVOICES>
</P_CUSTOMER>
</CUSTOMERINFO>
7. Save the above code as SampleXmlReport.xml
Note: Before saving the XML string in notepad remove the dashes -
8. Create Template/Layout for the report using Template Builder. Here is a sample template.
Note the following:
The data fields that are defined on the template
For example: Customer Name, Customer Id
The elements of the template that will repeat when the report is run.
For example, Customer trx id , Invoice Number and Original Amount Due. All these fields on the template will repeat for each Employee that is reported.
9. Mark up your template layout.
Like a mail-merge document there’s placeholders for the data you’re going to add, and then you can add whatever formatting you like.
10. Now the next step is to select Data > Load XML Data from the toolbar menu, then pick up the XML data a file ie.SampleXmlReport.xml. Once the data is loaded, a "Data Loaded Successfully" dialog box comes up and you can then start adding data items to the template.
11. To add data items from the XML file into your report, you locate in the document the placeholder for the field you’re going to add, highlight it and then select Insert > Field from the toolbar. A dialog box comes up with all of the available data items, you select the one you want and click insert as shown below:
12. You can add repeating rows into your document by selecting Insert > Table/Form from the toolbar. This brings up a different dialog box that lets you drag a parent node – in this case, "P Invoices" – into the middle section, which becomes your repeating rows.
13. Calculate the average for amount due original. Select Insert->Field from the Add Ins toolbar. Then select the tag that calculates the average for that particular field.
14. Once we are done with adding up all the fields in the template save it as an rtf which looks as below:
To confirm the output from the template we build. Click on preview and select the type in which format the output is required.
15. Adding the Template to ORACLE Application.
In order to add the template to application the user should have the responsibility XML Publisher Administrator assigned.
In this step we do 2 processes, registering concurrent program as Data Definition in template manager
And register the template using the data definition created.
Go to XML Publisher Administrator->Data Definitions->Create Data definition.
Here we fill all the details to create data definition
NOTE: Make sure the code of the data definition must be the same as the short name of the Concurrent Program we registered for the procedure. So that the concurrent manager can retrieve the templates associated with the concurrent program
We can add our xml file SampleXmlReport.xml in data definition here:
16. Now create the template with the help of template manager
At the runtime the concurrent managers request interface will present the list of available templates with respect to the data definition registered. We will upload the rtf template file created here. We will select the language and territory.
We can upload different templates for different languages and territories.
17. Now run the concurrent program to get the desired output.
From the receivables responsibility, use the submit request form to run the concurrent request.
The default layout is displayed which we can change as per the requirement. For changing the template click on options to look for all templates register with that concurrent program.
Here in the above example my template is SampleXmlReport which is displayed in layout field.
And once the request is submitted we will get the output in PDF as
This is the final output as desired in the PDF format.
No comments:
Post a Comment