Saturday, April 3, 2010

XML Publisher functions

add page total
-------------------




xdofx function
-------------------

1000?>red


Repeating frame or loop
------------------------





Placeholder
-------------------



For each alternate row, the background color attribute is set to gray for the row.
--------------------------------------------------


lightgray


If statement to display the row only if the element SALES has a value greater than 5000.
----------------------------------------------

5000?>



The placeholder for the quantity element surrounded by the "if" statement
-----------------------------------------




The opening of the if statement to test for the attribute value "PRIVATE". Note that this syntax
uses an XPath expression to navigate back to the "items" level of the XML to test the attribute. For
more information about using XPath in your templates, see XPath Overview, page 2-121.
------------------------------------------






=====

1000 then 'Higher'
else
if AMOUNT < 1000 then 'Lower' else 'Equal' end if?>



To create links for a dynamic table of contents: Enter the syntax:
--------------------------------------






====







To end on an even page with layout:
-------------------------------------------------
Insert the following syntax in a form field in your template:
-----------------------------------------------------------------




To end on an odd page layout:
-------------------------------




If you do not have layout requirements for the final page, but would like a blank page
ejected to force the page count to the preferred odd or even, use the following syntax:
------------------------------------------------------------------------------------------


or




Last Page Only Layout
--------------------------




Insert the following syntax on the final page:
-------------------------------





Intial Page
-------------------



Page break
--------------




Page Level calculation
------------------------



where TotalFieldName is the name you assign to your total (to reference later) and
'element' is the XML element field to be totaled. You can add this syntax to as many fields as you want to total.
Then when you want to display the total field, enter the following syntax:
--------------------------------------------------------------------------------------------




where
TotalFieldName is the name you assigned to give the page total field above and
Oracle-number-format is the format you wish to use to for the display, using the
Oracle format mask (for example: C9G999D00). For the list of Oracle format mask


Brought Forward/Carried Forward Totals
--------------------------------------------


Brought Forward:



********
Init PTs



Declares "InvAmt" as the placeholder that will hold the page total.FE



Begins the INVOICE group.10001-1



Placeholder for the Invoice Number tag. 1-Jan-2005



Placeholder for the Invoice Date tag.100.00



Placeholder for the Invoice Amount tag.InvAmt



Assigns the "InvAmt" page total object to the INVAMT element in the data.EFE



Closes the INVOICE group.End PTs



Closes the "InvAmt" page total.To
***************


Sorting
-----------------



OR




Checking for Nulls
----------------------

• To define behavior when the element is present and the value is not null, use the following:
----------------------------------------------------------------------------------------------
desired behavior


• To define behavior when the element is present, but is null, use the following:
---------------------------------------------------------------------------------------
desired behavior

• To define behavior when the element is not present, use the following:
--------------------------------------------------------------------------------------
desired behavior


Regrouping the XML Data
----------------------------



For example, to regroup the CD listing by COUNTRY, enter the following in your
template:2-84 Oracle XML Publisher Report Designer's Guide
----------------------------------------------------------------------------------




OR

To establish nested groupings within the already defined group, use the following syntax:
-------------------------------------------------------------------------------------



For example, after declaring the CD grouping by COUNTRY, you can then further group by YEAR within COUNTRY as follows:
----------------------------------------------------------------------------------------------------------------------



**** IMP ******

Group by TmpRng
-----------------

Range
------------

Months
-------------

End TmpRng
-----------------







Using Variables
-------------------

Use the following syntax to declare/set a variable value:
------------------------------------------------------------------



Use the following syntax to retrieve a variable value:
------------------------------------------------------------------



You can use this method to perform calculations. For example:
------------------------------------------------------------------


This sets the value of variable 'x' to its original value plus 1, much like using "x = x +1".


Defining Parameters
------------------------




where
PARAMETERNAME is the name of the parameter
DEFAULT is the default value for the parameter (the select statement is optional)
xdofo:ctx="begin" is a required string to push the parameter declaration to the
top of the template at runtime so that it can be referred to globally in the template.
The syntax must be declared in the Help Text field of a form field. The form field
can be placed anywhere in the template.


Dynamic Data Columns
----------------------------

• Dynamic Column Header
------------------------------------------------


Use this tag to define which group to split for the column headers of a table.

• Dynamic Column
-------------------------


Use this tag to define which group to split for the column data of a table.

• Dynamic Column Width
---------------------------------

or



Use one of these tags to define the width of the column when the width is described
in the XML data. The width can be described in two ways:
• An XML element stores the value of the width. In this case, use the syntax

,

where name is the XML element tag name that contains the value for the width.
• If the element defined in the split-column-header tag, contains a width
attribute, use the syntax



to use the value of that attribute


Group:TestScores
-----------------


Test Category
------------------



Column Header and Splitting
---------------------


%

Content and Splitting
------------------------------



end:TestScores
---------------------


No comments:

Post a Comment