1) ‘IF ELSE’ condition in XML
publisher
XML Publisher supports the common programming construct
“if-then-else”. This is extremely useful when you need to test a condition and
conditionally show a result. For example:
IF X=0 THEN
Y=2
ELSE
Y=3
END IF
You can also nest these statements as follows:
IF X=0 THEN
Y=2
ELSE
IF X=1 THEN
Y=10
ELSE Y=100
END IF
Use the following syntax to construct an if-then-else
statement in your RTF template:
For example, the following statement tests the AMOUNT
element value. If the value is greater than 1000, show the word “Higher”; if it
is less than 1000, show the word “Lower”; if it is equal to 1000, show “Equal”:
1000 then 'Higher'
|
|||||
if AMOUNT < 1000 then 'Lower'
|
|||||
Else
|
|||||
'Equal'
|
|||||
end if?>
|
|||||
2) How to get SYSDATE in the
header section dynamically when we run the report
You cannot
insert form fields in the Header section, but you can just insert the code to
achieve this. For example: insert this in the header section to view the
sysdate: You could format the date as you would like..
3)
What are the XML publisher tables?
PER_GB_XDO_TEMPLATES
XDO_DS_DEFINITIONS_B
XDO_DS_DEFINITIONS_TL
XDO_DS_DEFINITIONS_VL
XDO_LOBS
XDO_TEMPLATES_B
XDO_TEMPLATES_TL
XDO_TEMPLATES_VL
XDO_TEMPLATE_FIELDS
XDO_TRANS_UNITS
XDO_TRANS_UNIT_PROPS
XDO_TRANS_UNIT_VALUES
XDO_DS_DEFINITIONS_B
XDO_DS_DEFINITIONS_TL
XDO_DS_DEFINITIONS_VL
XDO_LOBS
XDO_TEMPLATES_B
XDO_TEMPLATES_TL
XDO_TEMPLATES_VL
XDO_TEMPLATE_FIELDS
XDO_TRANS_UNITS
XDO_TRANS_UNIT_PROPS
XDO_TRANS_UNIT_VALUES
4)
How to write a loop in rtf template design?
……………………..
5) How to design sub templates in rtf layout?
Using following tags..
This
is Last Page
6) How to call a header or footer?
Using
this tag
and
We have to
use header section and footer section of the page.
7) How to break the page in specific condition?
8) How to use section break?
9) How to create multi layouts in XMLP?
Your template….
Your template….
Your
template….
10)
How to submit a layout in the backend?
we have to write a procedure for this using the below code
FND_REQUEST.ADD_LAYOUT ( TEMPLATE_APPL_NAME => 'application name',
TEMPLATE_CODE => 'your template code',
TEMPLATE_LANGUAGE => 'En',
TEMPLATE_TERRITORY => 'US',
OUTPUT_FORMAT => 'PDF'
);
11)
How to display the images in XMLP?
url:{'http://image location'}
For example, enter:
url:{'http://www.oracle.com/images/ora_log.gif'}
url:{'${OA_MEDIA}/image
name'}
12)
How to pass the page numbers in rtf layout?
....
13) 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 . Create one more new field with help text 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 . To print this parameter value create one more new field with name as help text.
14. Fit into single pageOracle 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.
15. 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.
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
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
14. Fit into single pageOracle 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.
15. 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.
No comments:
Post a Comment