Oracle XML Publisher Reports Part-2
How to Display Star dynamically based on your Data.
This example demonstrates how to set up a template that will generate a star-rating based on data from an incoming XML file. Assume the following incoming XML data:This is the sample xml Data.
Notice there is a USER_RATING element for each CD.Using this data element and the shape manipulation commands,we can create visual representation of the ratings so that the reader can compare them at a glance. A template to achieve this is shown in the following figure:
This is the Below code you have to use as below.
Sample Output as Below:-
How to Insert Page Breaks in Report Output:-
Page Breaks
To create a page break after the occurrence of a specific element use the "split-by-page-break"alias. This will cause the report output to insert a hard page break between every instance of a specific element. To insert a page break between each occurrence of a group, insert the "split-by-page-break" form field within the group immediately before the<?end for-each?>tag that closes the group. In the Help Text of this form field enter the syntax: <?split-by-page-break:?>.
In the template samples how in the following figure, the field called Page Break contains the split-by-page-break syntax:
Some reports require that the initial page number be set at a specified number. For example, monthly reports may be required to continue numbering from month to month.
XML Publisher allows you to set the page number in the template to support this requirement.
Use the following syntax in your template to set the initial page number:
<?initial-page-number:pagenumber?>
where pagenumber is the XML element or parameter that holds the numeric value. Example 1 - Set page number from XML data element
If your XML data contains an element to carry the initial page number. For example:
Creating an RTF Template 2-45
<REPORT>
<PAGESTART>200<\PAGESTART>
.... </REPORT>
Enter the following in your template:
<?initial-page-number:PAGESTART?>
Your initial page number will be the value of the PAGESTART element, which in this case is 200.
Example 2 - Set page number by passing a parameter value
If you define a parameter called PAGESTART, you can pass the initial value by calling the parameter. Enter the following in your template: <?initial-page-number:$PAGESTART?> Note: You must first declare the parameter in your template. See Defining Parameters in Your Template, page2-79.
3 comments:
Excellent blog I visit this blog it's really awesome. The important thing is that in this blog content written clearly and understandable. The content of information is very informative.
¬Oracle Fusion HCM Online Training
Good blog,Very useful article,Thanks for sharing this information.
Oracle Fusion HCM Online Training | Oracle HCM Cloud Training Online
really nice blog thank you
Oracle Fusion HCM Online Training
Post a Comment