Showing posts with label XML (BI Publisher) Reports. Show all posts
Showing posts with label XML (BI Publisher) Reports. Show all posts

Tuesday, January 13, 2015

How to create a Multilingual reports in Oracle XML Publisher

There are two options for adding translated templates to your report definition:
       Create a separate RTF template that is translated (a localized template)
This option is useful if the translated template requires a different layout for each language.
       Generate an XLIFF file from the original template (at runtime the original template is applied for the layout and the XLIFF file is applied for the translation)
If the layout of the report is same for all languages and if we only require translation of the text strings of the template layout, use the XLIFF option.
1. Localized Template Approach
       Enable the languages that we need the translation for(System Administrator> Install >
Languages)
       Create different templates for languages with different layouts. E.g. one for English and one for
Arabic.
       Register the template in Oracle with the same name and short name as the concurrent
program. ( XML Publisher Administrator>Templates)
       Click on Add File and then browse to file location.
       Select the file and corresponding language.
       We need to add as many files as there are to be translations.
2. XLIFF File Approach
a)     XLIFF (XML Localization Interchange File Format) : format for exchanging localization data.
b)    XML­based format that enables translators to concentrate on the text to be translated.
c)     We use this option when we want to use the same layout and apply specific translation.
Creating an XLIFF file from an RTF template
       Open the template in Microsoft Word with the Template Builder for Word
       Select Tools > Translations > Extract Text.
       BI Publisher extracts the translatable strings from the template and exports them to
an XLIFF (.xlf) file.
       This XLIFF file can then be sent to a translation provider, or using a text editor, we
can enter the translation for each string.
Sample translations list for XLIFF file
       A separate XLIFF file is created for every language translation we need.
       If we are going to translate the base source tags into 2 languages, Say French and
Spanish. So that when we run the report for French and Spanish the report will be
translated as per the language.
       The assumption is that these language packs are already installed in Oracle.
       Following is a sample list of all the translations of the tags is shown in the below table.
Uploading a translation in Oracle Apps E – Business Suite
       Go to the responsibility XML Publisher Administrator ­­> Home ­­> Templates
       Create Template and Select the Upload Translations button.
       From the Upload Translations page, browse the translated file in your local file system
and save the changes.
       Click the Enable button to enable a translation. Only enabled translations are available
to the Concurrent Manager. Both complete and incomplete translations can be enabled.
       To download a translation file, select its Export translation icon to download the XLIFF file for editing.

Friday, December 5, 2014

What are user exits in oracle reports

User exits in oracle reports:
A User Exit is an API, which provides a way to pass control from Reports Builder to a 3GL program that performs some function, and then returns control to Reports Builder.
Using these we can integrate Oracle reports with Oracle apps AOL, and run them as concurrent programs.
Following are the user exits available in Oracle Reports that makes the AOL integration:
FND SRWINIT
FND SRWEXIT
FND FORMAT_CURRENCY
FND FLEXIDVAL
FND FLEXSQL
When the concurrent manager runs an Oracle Report concurrent request, it passes the concurrent request id in the P_CONC_REQUEST_ID parameter. When you call the FND SRWINIT user exit in the report’s Before Report trigger, the user exit uses the passed request id to query the Oracle Applications context that the concurrent request was submitted in (via the FND_CONCURRENT_REQUESTS table) and then log on with that context. 
This allows you to use operating specific views, access profile option values, etc within your report. You should also call the FND SRWEXIT user exit in the After Report trigger.
If you try calling the FND SRWINIT user exit in your report without the P_CONC_REQUEST_ID parameter defined as a user parameter on your report, the user exit will fail.

Monday, April 14, 2014

Consult the OPP service log for details

Problem:

+------------- 1) PUBLISH -------------+
Beginning post-processing of request 30182078 on node AUOHHSKKINC03 at 14-APR-2014 09:43:43.
Post-processing of request 3440182078 failed at 14-APR-2014 09:43:43 with the error message:
One or more post-processing actions failed. Consult the OPP service log for details.
+--------------------------------------+

Solution:

Check the RTF Template, Look for each and every field which should not use <?ref:xdo0034?>. Instead it should be holding appropriate column name. 

It will work...

Thanks.

Wednesday, April 2, 2014

XML/BI Publisher Template/Report Migration UNIX Scripts

Here are the simple steps to migrate BI Publisher Report objects ( Data Defn, Layout Template, Concurrent Programs etc ) from one instance to another instance.


  • Download Data Template/Layout template metadata defn into file .ldt
FNDLOAD apps/ apps 0 Y DOWNLOAD $XDO_TOP/patch/115/import/xdotmpl.lct <Defn_Name>.ldt XDO_DS_DEFINITIONS APPLICATION_SHORT_NAME=<Custom_Application> DATA_SOURCE_CODE=<DataDefn_Code> TMPL_APP_SHORT_NAME=<Custom_Application> TEMPLATE_CODE=<TemplateDefn_Code>
  • Download Concurrent Program defn into file .ldt
FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct <Conc_prog_name>.ldt PROGRAM CONCURRENT_PROGRAM_NAME=<Conc_Prog_Name> APPLICATION_SHORT_NAME=<Custom_Application_Name>
  • Download the Layout template physically from the instance. Please note after the command is run successfully output will be the file stored in the current directory from where the command is run.
java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD \
-DB_USERNAME apps \
-DB_PASSWORD apps \
-JDBC_CONNECTION pra.host.com:1527:<SID> \
-LOB_TYPE TEMPLATE \
-APPS_SHORT_NAME <Custom_Application> \
-LOB_CODE <TemplateDefn_Code> \
-LANGUAGE en \
-TERRITORY US
  • Download the data template physically(If you have one) from the instance. Please note after the command is run successfully output will be the file stored in the current directory from where the command is run.
java oracle.apps.xdo.oa.util.XDOLoader DOWNLOAD \
-DB_USERNAME apps \
-DB_PASSWORD apps \
-JDBC_CONNECTION pra.host.com:1527:<SID> \
-LOB_TYPE DATA_TEMPLATE \
-APPS_SHORT_NAME <Custom_Application> \
-LOB_CODE <DataDefn_Code> \
-LANGUAGE en \
-TERRITORY US



COPY THE FILES TO THE TARGET ENV USING FTP AND THEN UPLOAD.



Uploading to an Environment
  • Upload AOL Defn of Data/Layout templates and the Concurrent program using below commands
FNDLOAD apps/ apps 0 Y UPLOAD $XDO_TOP/patch/115/import/xdotmpl.lct  <Defn_Name>.ldt
FNDLOAD apps / apps 0 Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct <Conc_prog_name>.ldt
  • Upload physical rtf template
java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \
-DB_USERNAME apps \
-DB_PASSWORD apps \
-JDBC_CONNECTION pra.host.com:1527:<SID> \
-LOB_TYPE TEMPLATE \
-APPS_SHORT_NAME < Custom_Application > \
-LOB_CODE < TemplateDefn _Code> \
-LANGUAGE en \
-TERRITORY US \
-XDO_FILE_TYPE RTF \
-FILE_CONTENT_TYPE ’application/rtf’ \
-FILE_NAME <Template_File_Name>.rtf \
-NLS_LANG ENGLISH_UNITED STATES.WE8ISO8859P1
  • Upload physical Data Template if you have one.
java oracle.apps.xdo.oa.util.XDOLoader UPLOAD \
-DB_USERNAME apps \
-DB_PASSWORD apps \
-JDBC_CONNECTION pra.host.com:1527:<SID> \
-LOB_TYPE DATA_TEMPLATE \
-APPS_SHORT_NAME <Custom_Application> \
-LOB_CODE <DataDefn_Code> \
-LANGUAGE en \
-TERRITORY US \
-XDO_FILE_TYPE XML \
-FILE_NAME <DataDefn_File_Name>.xml \

Sunday, July 28, 2013

Refer LOGO Location From XML

Follow the below steps for ‘Refer LOGO location from XML’
  1. Insert a dummy image in template.
  2. In the format picture dialog box select the web tab.  
  3. Enter the following syntax in the Alternative text region to reference the image URL:



url: {IMAGE_LOCATION}

Where IMAGE_LOCATION is an element from our XML file that holds the full URL to the image .
We can also build a URL based on multiple elements at run time.
Just use the Concat function to build the URL string.

For example:


url: {concat(SERVER,’ / ‘,IMAGE_DIR,’ / ‘,IMAGE_FILE)}
This method can also be used with the OA_MEDIA reference as follows:


url: {concat{‘${OA_MEDIA}’ , ‘ / ‘,IMAGE_FILE)}

Inserting A Static/Dynamic LOGO in Header

The Logo in the rtf template can be included as a Static image (or) as a Dynamic image.
1.) The Logo in the RTF template can be included as a static image as follows.
Place the cursor in the place where you need to insert the logo. Select the image from your desktop by selecting the option
Insert -> Picture from the menu.









Browse for the Image which you want to display and select the image.












After selecting image you can see the image which you are selected, the below figure shows the example which displays Newton Apples logo:-





This is how you can include a Static Logo.
2.)    Inserting the Logo Dynamically.
As of today business the logo may change periodically for a company. If the LOGO has been inserted as a static object then the developer needs to go through each of the RTF template and needs to change the same.
But with the help of this method the logo can be reflected in the entire RTF templates by changing it in one place.
The logo can be inserted dynamically with the help of a URL.
The URL may be the path in the server (or) web address where the LOGO has been placed.
This can be done as follows

?
1
2
url:{’${OA_MEDIA}/ORACLE_LOGO.gif’}
Insert a dummy image at the place where you need to have a logo.



















Select the image and go through the format Picture -> Alt Text  and mention the URL in description.