Showing posts with label Reports. Show all posts
Showing posts with label Reports. Show all posts

Responsibilities using Concurrent Program

We know to use any Concurrent Program first it needs to be added to the Request Group and Request Group needs to be attached to Responsibility. Then we can able to submit the program using program request form.

One program can be attached to many Request Groups. Again Request Group can be attached to many Responsibilities. Because of One-Many-Many relationship, it is very difficult to find out responsibilities using particular concurrent program in UI forms.

But we can get the list from database using the following SQL...

SELECT
FRS.responsibility_key
,FRS.responsibility_name
,FRG.request_group_name
,FCP.concurrent_program_name
,FCP.user_concurrent_program_name
FROM
fnd_concurrent_programs_vl FCP
,fnd_request_group_units FRU
,fnd_request_groups FRG
,fnd_responsibility_vl FRS
WHERE FCP.concurrent_program_name = (Program_Name)
AND FRU.request_unit_id = FCP.concurrent_program_id
AND FRG.application_id = FRU.application_id
AND FRG.request_group_id = FRU.request_group_id
AND FRS.group_application_id = FRG.application_id
AND FRS.request_group_id = FRG.request_group_id

Submitting XML Publisher Report Concurrent Program from PL/SQL

XML Publisher template will be attached as layout when we submit concurrent program using request form based on the program short name. Whereas, if we submit the program using FND_REQUEST.submit_request API then we will find only XML output, template won’t be used.

To avoid this issue, program layout needs to be set using FND_REQUEST.add_layout API with template application, code, language, territory and output format before submit request.

XML Publisher Report: Few Tips

Here are few useful tips to design XML Publisher RTF Templates.

1. Printing Report Parameters
In report, we need to print Report Parameters and might need to use it multiple times. To declare the parameter, create new field at beginning of the report with help text <xsl:param name="<ParameterName>" xdofo:ctx="begin"/>
. Create one more new field with help text <?$new_field?> to print wherever parameter needs to be printed.

For example, assume P_EMPLOYEE_NAME is one of the report parameter. To use that in RTF, create new filed named P_EMP_NAME with help text <xsl:param name="P_EMPLOYEE_NAME" xdofo:ctx="begin"/>
. To print this parameter value create one more new field with name <?$P_EMP_NAME?> as help text.

2. Fit into single page
Oracle Report Layout has “Fit to Page” property. If we set this to “Yes” then if the page is not enough to fit the content then entire content will be printed in next page. This is known and wildly used property. Is this possible in RTF Template?

Yes. First identify contents that need to fit into a page. Insert a table with only one row and column. Keep the identified contents inside this table. Select Table Property. Navigate to “Row” tab. Uncheck “Allow Row to break across Pages’ check box if it is checked. This will make sure the contents won’t split across pages.

3. Font Support
You might have noticed some time Report Output won’t match with RFT Template Font. This is because PDF Engine will support only specific fonts. If you use fonts that are not supported by PDF Engine then engine will use it is default font. So try to use fonts that are PDF engine supports.

Some time we have to use specific fonts that PDF engine didn’t support. Best example is company name, logo etc. Mostly we use these in report headers. Simple workaround is copy the logo or name or any text that we want it in specific font. Convert into to image and use that image wherever we need. Of course it will affect the performance if we use too many images in a template.

- XML Publisher Report in EBS -

Oracle XML Publisher is a new Java based product available within the technology stack of the EBS. It provides users with a template-based, easy-to-use publishing solution based on standard well-known technologies and tools. So users can take advantage of it easily to rapidly develop and maintain report formats.

This document helps for buddies who developing his first XML Publisher Report. Follow these steps to register your XML Publisher Report in EBS.

  1. Attach "XML Publisher Administrator" responsibility to APPS User
  2. Develop simple report; register it in EBS like standard concurrent program. Make sure that the Output Format is set as 'XML'. Pls note that Oracle Reports will be obsolete in coming EBS versions. So it is advisable to use Data Templates rather than Oracle Reports. If you use Data Templates then no need to have Report Concurrent Program. Refer Developer’s guide for more details.
  3. Add this program to the responsibility; Run the report and download the concurrent program output (XML file) to desktop. This XML will be used as Sample for Template development.
  4. Download patch 5027437 (p5027437_11i_MSWIN.zip) from Metalink and install it in the Desktop OR identify the patch for EBS version that you have and install it.
  5. Open Ms Word. You can see new Template Builder toolbar
  6. Click 'Load XML Data' in Data menu. Give the XML output file that you downloaded from Report Concurrent Program
  7. Use Table/Form wizard to build template to build the layout
  8. Save the file in Rich Text Format (RTF)
  9. Preview the report output from MS Word.
  10. Define new Data Definition (Navigation: XML Publisher Administrator - Data Definitions - Create Data Definition)
    Enter Name, Application, Code, Preview Data (sample XML output file) and Start Date. Make sure the Code and Report Concurrent Program Short Name are same
  11. Define new Template (Navigation: XML Publisher Administrator - Templates - Create Template)
    - Enter Name, Code, Application, Type (make it RTF), Data Definition (select the one you created)
    - Enter the File as the RFT file created
    - Enter Language and Territory

Now XML Publisher Report is registered in EBS and ready to function. This report can be executed in two ways

  • Run the Report concurrent program, note the request ID. Then run the XML Report Publisher concurrent program with the above request id and template as parameter
  • Change Concurrent Program Format to XML and submit the request. Program will pickup the template abd generate the output.

Note that XML Publisher Report strategies and setups are kept on changing. So please refer Oracle XML Publisher Administration and Developer's Guide and Oracle XML Publisher Report Designer's Guide documents with respect to your EBS version if you face any problem to register/run the report.

Reference