Vous êtes sur la page 1sur 8

XML Tags IMAGE RETRIEVE FROM DATABASE PLACE THE FORM FIELD AND RIGHT THE CODE THERE

<fo:instream-foreign-object content type="image/gif"> <xsl:value-of select="IMAGE"/> </fo:instream-foreign-object> SET PASSWORD THAT OUTPUT IS NOT SEEN IN PDF FROMAT 1) Open the .rtf 2) Go to File - > Properties Create a new custom property a) Name : xdo-pdf-open-password Type : text Value : Either Hard Code the vale / or get the value for xml data b) Name : xdo-pdf-security Type : text Value : true Concatenation tag: <?xdofx:rpad(FIRST_NAME||LAST_NAME),30,'x')?> <?value-of:concat(Payee/Address/City,, ,Payee/Address/State)?> If tag: <?IF:COMM=?>SRY<?END IF?><?IF:COMM!=?><?COMM?><?END IF?> Else if: <?xdofx:if COMM!='' then SAL+COMM else SAL end if?> DECODE TAG: <?xdofx:decode(COMM,,sry,COMM)?> <?xdofx:decode(COMM,,ENAME,COMM||, ||ENAME)?> CHR: <?xdofx:chr(65)?> <?xdofx: to_char(sysdate,'dd-mm-yyyy')?> ROUND: <?xdofx: round(9.6)?> SORT: <?for-each:G_EMPNO?><?sort:ENAME;ascending;data-type=char?> <?ENAME?> <?end for-each?> SUM: SUM:<?2+3?> <?xdoxslt:sum(SAL)+xdoxslt:sum(COMM)?>

<?sum(current-group()//SAL)?> //when ever we use double group it shows total sal for current group. PAGE BREAK <?split-by-page-break:?> (OR) <?for-each-group@section:G_EMPNO;DEPTNO?>//AUTOMATICALLY IT SPLIT DEPT WISE PAGE LAYOUT: IT DISPLAYS INFORMATION LIKE NOTE,TERMS ETC IN THE ODD OR EVEN PAGE. IN HEADERS AND FOOTERS REGION WE CAN DISPLAY GO TO FILE AND SELECT PAGE SETUP AND SELECT LAYOUT TAB THERE CHECK THE OPTIONS. <?section:force-page-count;'end-on-odd-layout'?> <?section:force-page-count;'end-on-even-layout'?> VARIABLE DECLARATION: <?xdoxslt:set_variable($_XDOCTX,A,20)?> <?xdoxslt:get_variable($_XDOCTX,A)?> <?xdoxslt:get_variable($_XDOCTX,A)+1?> TO_CHECK_NUMBER: <?xdofx:to_check_number(12345.67,1)?> <?xdofx:to_check_number(123,0)?> <?xdofx:to_check_number(12345.67,EUR,CASE_LOWER,DECIMAL_STYLE_WORDS )?> <?xdofx:to_check_number(12345.67,JPY,CASE_UPPER,DECIMAL_STYLE_WORDS)? > ADD & SHOW PAGE TOTAL: <?add-page-total:t;SAL?> <?show-page-total:t?> TEMPLATE HEADERS: <?template:header?> EMPLOYEE DETAILS <?end template?> //WRITE THESE IN HEADER FORM AND CALL IN THE WORKING <?call-template:header?> //WRITE THESE WHERE U NEED CHOOSE Ex: <?choose:?> <?when: DEPTNO=1610?> Abc <?end when?> <?when: DEPTNO=210?> Kas <?end when?> <?otherwise:?> Def

<?end otherwise?> <?end choose?> ARRAYS: <?xdoxslt:set_array($_XDOCTX, RAVI, 2, KANTH)?> <?xdoxslt:set_array($_XDOCTX,RAVI,1,NERELLA)?> <?xdoxslt:get_array($_XDOCTX, RAVI, 1)?> <?xdoxslt:get_array($_XDOCTX,RAVI,2)?> INSERT IMAGES: INSERT ANY IMAGE AS U WISH AND RIGHT CLICK ON IT SELECT FORMAT PICTURE IN THAT SELECT WEB TAB AND ENTER Ex: url:{'http://oracleapps88.blogspot.com/'} HYPERLINKS: Hi: it is hyperlink right click on hi and select hyperlink in that select browed pages enter web site at run time we can open it. SQL Statement or XSL Expression 2+3 2-3 2*3 2/3 2**3 3||2 lpad('aaa',10,'.')

Usage <?xdofx:2+3?> <?xdofx:2-3?> <?xdofx:2*3?> <?xdofx:2/3?> <?xdofx:2**3?> <?xdofx:3||2?> <?xdofx:lpad('aaa',10,'.')?>

Description Addition Subtraction Multiplication Division Exponential Concatenation The lpad function pads the left side of a string with a specific set of characters. The syntax for the lpad function is: lpad(string1,padded_length,[pad_st ring]) string1 is the string to pad characters to (the left-hand side). padded_length is the number of characters to return. pad_string is the string that will be padded to the left-hand side of string1 . The rpad function pads the right side of a string with a specific set of characters. The syntax for the rpad function is:

rpad('aaa',10,'.')

<?xdofx:rpad('aaa',10,'.')?>

rpad(string1,padded_length,[pad_s tring]). string1 is the string to pad characters to (the right-hand side). padded_length is the number of characters to return. pad_string is the string that will be padded to the right-hand side of string1 decode('xxx','bbb','cc c','xxx','ddd') <?xdofx:decode('xxx','bbb','c The decode function has the cc','xxx','ddd')?> functionality of an IF-THEN-ELSE statement. The syntax for the decode function is: decode(expression, search, result [,search, result]...[, default]) expression is the value to compare. search is the value that is compared against expression. result is the value returned, if expression is equal to search. default is returned if no matches are found. <?xdofx:Instr('abcabcabc','a' The instr function returns the ,2)?> location of a substring in a string. The syntax for the instr function is: instr(string1,string2,[start_positio n],[nth_appearance]) string1 is the string to search. string2 is the substring to search for in string1. start_position is the position in string1 where the search will start. The first position in the string is 1. If the start_position is negative, the function counts back start_position number of characters from the end of string1 and then searches towards the beginning of string1. nth appearance is the nth appearance of string2. <?xdofx:substr('abcdefg',2,3 The substr function allows you to )?> extract a substring from a string. The syntax for the substr function is:

Instr('abcabcabc','a', 2)

substr('abcdefg',2,3)

substr(string, start_position, [length]) string is the source string. start_position is the position for extraction. The first position in the string is always 1. length is the number of characters to extract. replace(name,'John',' <?xdofx:replace(name,'John The replace function replaces a Jon') ','Jon')?> sequence of characters in a string with another set of characters. The syntax for the replace function is: replace(string1,string_to_replace,[r eplacement_string]) string1 is the string to replace a sequence of characters with another set of characters. string_to_replace is the string that will be searched for in string1. replacement_string is optional. All occurrences of string_to_replace will be replaced with replacement_string in string1. to_number('12345') <?xdofx:to_number('12345') Function to_number converts ?> char, a value of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype containing a number in the format specified by the optional format model fmt, to a value of NUMBER datatype. <?xdofx:to_char('12345')?> Use the TO_CHAR function to translate a value of NUMBER datatype to VARCHAR2 datatype.

to_char(12345)

to_date

<?xdofx:to_date ( char [, fmt TO_DATE converts char of CHAR, [, 'nlsparam']] ) VARCHAR2, NCHAR, or NVARCHAR2 datatype to a value of DATE datatype. The fmt is a date format specifying the format of char. If you omit fmt, then char must be in the default date format. If fmt is 'J', for Julian, then char must be an integer. <?xdofx:sysdate()?> SYSDATE returns the current date and time. The datatype of the returned value is DATE. The

sysdate()

function requires no arguments. minimum maximum chr <?xdoxslt:minimum(ELEME Returns the minimum value of the NT_NAME)?> element in the set. <?xdoxslt:maximum(ELEM ENT_NAME)?> <?xdofx:chr(n)?> Returns the maximum value of the element in the set. CHR returns the character having the binary equivalent to n in either the database character set or the national character set. CEIL returns smallest integer greater than or equal to n. FLOOR returns largest integer equal to or less than n. ROUND returns number rounded to integer places right of the decimal point. If integer is omitted, then number is rounded to 0 places. integer can be negative to round off digits left of the decimal point. integer must be an integer. LOWER returns char, with all letters lowercase. char can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The return value is the same datatype as char. UPPER returns char, with all letters uppercase. char can be any of the datatypes CHAR, VARCHAR2, NCHAR, NVARCHAR2, CLOB, or NCLOB. The return value is the same datatype as char. The "length" function returns the length of char. LENGTH calculates length using characters as defined by the input character set. GREATEST returns the greatest of the list of exprs. All exprs after the first are implicitly converted to the datatype of the first expr before the comparison.

ceil floor round

<?xdofx:ceil(n)?> <?xdofx:floor(n)?> <?xdofx:round ( number [, integer ] )?>

lower

<?xdofx:lower (char)?>

upper

<?xdofx:upper(char)?>

length

<?xdofx:length(char)?>

greatest

<?xdofx:greatest ( expr [, expr]... )?>

least

<?xdofx:least ( expr [, expr]... )?>

LEAST returns the least of the list of exprs. All exprs after the first are implicitly converted to the datatype of the first expr before the comparison.

The following table shows supported combination functions: SQL Statement (2+3/4-6*7)/8 lpad(substr('1234567890',5,3),10,'^') decode('a','b','c','d','e','1')||instr('321', 1,1) XSL Equivalents The following table lists the BI Publisher simplified syntax with the XSL equivalents. Supported XSL Elements <xsl:value-of select= "name"> <xsl:apply-templates select="name"> <xsl:copy-of select="name"> <xsl:call-template name="name"> <xsl:sort select="name"> <xsl:for-each select="name"> <xsl:choose> Description Placeholder syntax Applies a template rule to the current element's child nodes. Creates a copy of the current node. Calls a named template to be inserted into/applied to the current template. Sorts a group of data based on an element in the dataset. Loops through the rows of data of a group, used to generate tabular output. Used in conjunction with when and otherwise to express multiple conditional tests. Used in conjunction with choose and otherwise to express multiple conditional tests Used in conjunction with choose and when to express multiple conditional tests Used for conditional formatting. BI Publisher Syntax <?name?> <?apply:name?> <?copy-of:name?> <?call:name?> <?sort:name?> <?for-each:name?> Usage <?xdofx:(2+3/4-6*7)/8?> <?xdofx:lpad(substr('1234567890',5,3),10,'^')?> <?xdofx:decode('a','b','c','d','e','1')||instr('321',1, 1)?>

<?choose?>

<xsl:when test="exp">

<?when:expression?>

<xsl:otherwise>

<?otherwise?>

<xsl:if test="exp">

<?if:expression?>

<xsl:template name="name"> <xsl:variable name="name">

Template declaration Local or global variable declaration

<?template:name?> <?variable:name?> <?import:url?> <?include:url?> <?namespace:x=url?>

<xsl:import href="url"> Import the contents of one stylesheet into another <xsl:include href="url"> <xsl:stylesheet xmlns:x="url"> Using FO Elements Include one stylesheet in another Define the root element of a stylesheet

You can use most FO elements in an RTF template inside the Microsoft Word form fields. The following FO elements have been extended for use with BI Publisher RTF templates. The BI Publisher syntax can be used with either RTF template method. The full list of FO elements supported by BI Publisher can be found in the Appendix: Supported XSL-FO Elements. FO Element <fo:page-number-citation ref-id="id"> <fo:page-number> BI Publisher Syntax <?fo:page-number-citation:id?> <?fo:page-number?>

<fo:ANY NAME WITHOUT ATTRIBUTE> <?fo:ANY NAME WITHOUT ATTRIBUTE?>

Vous aimerez peut-être aussi