Nonbreaking space. Inverted exclamation point. General currency sign. Broken vertical bar. Section sign. Spacing diaeresis. Feminine ordinal. Left angle quotes.
Registered trademark. Macron accent. Plus or minus sign. Superscript 2. Superscript 3. Acute accent. Micro sign Greek mu. Paragraph sign. Superscript 1. Masculine ordinal. Right angle quotes. One-fourth fraction. One-half fraction.
Three-fourths fraction. Inverted question mark. Olivier de Rivoyre Olivier de Rivoyre 1, 1 1 gold badge 18 18 silver badges 24 24 bronze badges. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog.
Podcast Making Agile work for data science. Stack Gives Back Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually.
Linked Related This is useful for documents such as checks, invoices, or purchase orders on which you may want the content such as the check or the summary in a specific place only on the last page. Create a section break in your template to ensure the content of the final page is separated from the rest of the report. Any content on the page that occurs above or below these two tags will appear only on the last page of the report.
Also, note that because this command explicitly specifies the content of the final page, any desired headers or footers previously defined for the report must be reinserted on the last page.
This example uses the last page only feature for a report that generates an invoice listing with a summary to appear at the bottom of the last page. The template for this is shown in the following figure:. Insert a Microsoft Word section break type: next page on the first page of the template. For the final page, insert new line characters to position the summary table at the bottom of the page.
The summary table is shown in the following figure:. Any content above or below this statement will appear on the last page only. The content above the statement is regarded as the header and the content below the statement is regarded as the footer.
If your reports contains headers and footers that you want to carry over onto the last page, you must reinsert them on the last page. For more information about headers and footers see Defining Headers and Footers.
You must insert a section break type: next page into the document to specify the last page layout. It is important to note that if the report is only one page in length, the first page layout will be used. If your report requires that a single page report should default to the last page layout such as in a check printing implementation then you can use the following alternate syntax for the "Last Page Placeholder" on the last page:.
Substituting this syntax will result in the last page layout for reports that are only one page long.
If your report has different odd and even page layouts, you may want to force your report to end specifically on an odd or even page. Or, you may have binding requirements to have your report end on an even page, without specific 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:.
BI Publisher supports several different types of hyperlinks. The hyperlinks can be fixed or dynamic and can link to either internal or external destinations. Hyperlinks can also be added to shapes. To insert static hyperlinks to either text or a shape, use your word processing application's insert hyperlink feature:.
Use the right-mouse menu to select Hyperlink ; or, select Hyperlink from the Insert menu. The following screenshot shows the insertion of a static hyperlink using Microsoft Word's Insert Hyperlink dialog box. If your input XML data includes an element that contains a hyperlink or part of one, you can create dynamic hyperlinks at runtime.
In the Type the file or Web page name field of the Insert Hyperlink dialog box, enter the following syntax:. The following figure shows the insertion of a dynamic hyperlink using Microsoft Word's Insert Hyperlink dialog box.
This link may render as:. Use the right-mouse menu to select Hyperlink ; or select Hyperlink from the Insert menu. Follow your word processing application's procedures for inserting a table of contents. BI Publisher also provides the ability to create dynamic section headings in your document from the XML data. You can then incorporate these into a table of contents. Enter a placeholder for the heading in the body of the document, and format it as a "Heading", using your word processing application's style feature.
You cannot use form fields for this functionality. For example, you want your report to display a heading for each company reported. Now format the text as a Heading. If you have defined a table of contents in your RTF template, you can use your table of contents definition to generate links in the Bookmarks tab in the navigation pane of your output PDF. The bookmarks can be either static or dynamically generated.
For information on creating the table of contents, see Table of Contents. You can include a check box in your template that you can define to display as checked or unchecked based on a value from the incoming data.
Position the cursor in your template where you want the check box to display, and select the Check Box Form Field from the Forms tool bar shown in the following figure.
In the Form Field Help Text dialog, enter the criteria for how the box should behave. This must be a boolean expression that is, one that returns a true or false result. Enter the following in the help text field:.
Note that you do not have to construct an "if" statement. The expression is treated as an "if" statement. BI Publisher allows you to use the drop-down form field to create a cross-reference in your template from your XML data to some other value that you define in the drop-down form field. You can then display the name in your published report.
Position the cursor in your template where you want the value from the drop-down list to display, and select the Drop-Down Form Field from the Forms tool bar shown in the following figure.
Add each value to the Drop-down item field and the click Add to add it to the Items in drop-down list group. The values will be indexed starting from one for the first, and so on. For example, the list of continents will be stored as follows:.
Now use the Help Text box to enter the XML element name that will hold the index for the drop-down field values. Using the check box and drop-down list features, you can create a report to display population data with check boxes to demonstrate figures that reach a certain limit.
An example is shown in the following figure:. Conditional formatting occurs when a formatting element appears only when a certain condition is met.
BI Publisher supports the usage of simple "if" statements, as well as more complex "choose" expressions. For example, you can specify that if reported numbers reach a certain threshold, they will display shaded in red. Or, you can use this feature to hide table columns or rows depending on the incoming XML data. Use an if statement to define a simple condition; for example, if a data field is a specific value.
This example is displayed in the figure below. Note that you can insert the syntax in form fields, or directly into the template.
To achieve this requirement, you must use the BI Publisher context command to place the if statement into the inline sequence rather than into the block the default placement. Note: For more information on context commands, see Using Context Commands. To specify that the if statement should be inserted into the inline sequence, enter the following:.
BI 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. If the value is greater than , show the word "Higher"; if it is less than , show the word "Lower"; if it is equal to , show "Equal":. Use the choose, when, and otherwise elements to express multiple conditional tests.
If certain conditions are met in the incoming XML data then specific sections of the template will be rendered. This is a very powerful feature of the RTF template. In the template, however, you can actually use visual widgets in the conditional flow in the following example, a table.
Otherwise, the row of data will render with no shading. In the following figure, the form field default text is displayed. The form field help text entries are shown in the table following the example. You can conditionally show and hide columns of data in your document output. The following example demonstrates how to set up a table so that a column is only displayed based on the value of an element attribute.
Notice the type attribute associated with the items element. For the "public" version of the list we do not want to show the quantity column in the output, but we want to develop only one template for both versions based on the list type. The following figure is a simple template that will conditionally show or hide the quantity column:.
The conditional column syntax is the "if" statement syntax with the addition of the column clause. It is the column clause that instructs BI Publisher to hide or show the column based on the outcome of the if statement.
If you did not include the column the data would not display in your report as a result of the if statement, but the column still would because you had drawn it in your template. Note: The column clause is an example of a context command. For more information, see Using Context Commands. BI Publisher allows you to specify formatting conditions as the row-level of a table.
Examples of row-level formatting are:. This is demonstrated in the following sample template. This example demonstrates how to set a background color on every other row. The template to create this effect is shown in the following figure:. In the preceding example, note the "format;" field.
It contains an if statement with a "row" context row. This sets the context of the if statement to apply to the current row. This will result in the following output:. Note: For more information about context commands, see Using Context Commands. The following example demonstrates how to conditionally highlight a cell based on a value in the XML file. The template lists the accounts and their credit and debit values.
In the final report we want to highlight in red any cell whose value is greater than The "if" statement is testing if the debit value is greater than If it is, then the next lines are invoked. Notice that the example embeds native XSL code inside the "if" statement. The xdofo:ctx component is an BI Publisher feature that allows you to adjust XSL attributes at any level in the template.
In this case, the background color attribute is changed to red. To change the color attribute, you can use either the standard HTML names for example, red, white, green or you can use the hexadecimal color definition for example, FFFFF.
BI Publisher allows you to display calculated page totals in your report. Because the page is not created until publishing time, the totaling function must be executed by the formatting engine. Note: Page totaling is performed in the PDF-formatting layer.
Note: Note that this page totaling function will only work if your source XML has raw numeric values. The numbers must not be preformatted. Because the page total field does not exist in the XML input data, you must define a variable to hold the value.
When you define the variable, you associate it with the element from the XML file that is to be totaled for the page. Once you define total fields, you can also perform additional functions on the data in those fields.
To declare the variable that is to hold your page total, insert the following syntax immediately following the placeholder for the element that is to be totaled:. Oracle-number-format is the format you wish to use to for the display, using the Oracle format mask for example: C9GD The following example shows how to set up page total fields in a template to display total credits and debits that have displayed on the page, and then calculate the net of the two fields.
Note that on the field defined as "net" we are actually carrying out a calculation on the values of the credit and debit elements. Now that you have declared the page total fields, you can insert a field in your template where you want the page totals to appear. Reference the calculated fields using the names you supplied in the example, ct and dt.
The syntax to display the page totals is as follows:. Therefore to complete the example, place the following at the bottom of the template page, or in the footer:.
Many reports require that a page total be maintained throughout the report output and be displayed at the beginning and end of each page. Note: The totaling for the brought forward and carried forward fields is performed in the PDF-formatting layer.
At the end of the first page, the page total for the Amount element is displayed as the Carried Forward total. At the top of the second page, this value is displayed as the Brought Forward total from the previous page. At the bottom of the second page, the brought forward value plus the total for that page is calculated and displayed as the new Carried Forward value, and this continues throughout the report.
This functionality is an extension of the Page Totals feature. The following example walks through the syntax and setup required to display the brought forward and carried forward totals in your published report. The following sample template creates the invoice table and declares a placeholder that will hold your page total:.
To display the brought forward total at the top of each page except the first , use the following syntax:. This is an optional property that takes one of the following values:.
In this example, display-condition is set to "exceptfirst" to prevent the value from appearing on the first page where the value would be zero. This property is optional, but if you want to supply a format mask, you must use the Oracle format mask.
For more information, see Using the Oracle Format Mask. Insert the brought forward object at the top of the template where you want the brought forward total to display. If you place it in the body of the template, you can insert the syntax in a form field. If you want the brought forward total to display in the header, you must insert the full code string into the header because Microsoft Word does not support form fields in the header or footer regions.
BI Publisher will recognize any content above the defined body area as header content, and any content below as the footer. This allows you to use form fields. See Multiple or Complex Headers and Footers for details. Place the carried forward object at the bottom of your template where you want the total to display. The carried forward object for our example is as follows:.
The display-condition is set to exceptlast so that the carried forward total will display on every page except the last page. The show-carry-forward element is used to show the carried forward value. It has the same properties as brought-carried-forward, described above. The variable functionality see Using Variables can be used to add a running total to your invoice listing report.
This example assumes the following XML structure:. Using this XML, we want to create the report that contains running totals as shown in the following figure:.
To create the Running Total field, define a variable to track the total and initialize it to 0. The template is shown in the following figure:. You can sort a group by any element within the group. Insert the following syntax within the group tags:.
To sort a group by multiple fields, just insert the sort syntax after the primary sort field. To sort by Supplier and then by Invoice Number, enter the following. In your report layout, you may want to specify a different behavior depending on the presence of the element and its value.
The following examples show how to check for each of these conditions using an "if" statement. The syntax can also be used in other conditional formatting constructs.
With this feature, your template does not have to follow the hierarchy of the source XML file. You are therefore no longer limited by the structure of your data source.
To demonstrate the for-each-group standard, the following XML data sample of a CD catalog listing will be regrouped in a template:. Using the regrouping syntax, you can create a report of this data that groups the CDs by country and then by year.
You are not limited by the data structure presented. You can then refer to the elements of the group to display the values desired.
At runtime, BI Publisher will loop through the occurrences of the new groupings, displaying the fields that you defined in your template.
Note: This syntax is a simplification of the XSL for-each-group syntax. If you choose not to use the simplified syntax above, you can use the XSL syntax as shown below.
The XSL syntax can only be used within a form field of the template. The following figure shows a template that displays the CDs by Country, then Year, and lists the details for each CD:.
The following table shows the BI Publisher syntax entries made in the form fields of the preceding template:. Regrouping by an expression allows you to apply a function or command to a data element, and then group the data by the returned result. To demonstrate this feature, an XML data sample that simply contains average temperatures per month will be used as input to a template that calculates the number of months having an average temperature within a certain range.
You want to display this data in a format showing temperature ranges and a count of the months that have an average temperature to satisfy those ranges, as follows:. You can then display a count of the members of each grouping, which will be the number of months having an average temperature that falls within each range. The floor function is an XSL function that returns the highest integer that is not greater than the argument for example, 1.
This will generate the following values from the XML data: 1, 1, 1, 2, 3, 3, 3, 3, 2, 2, 1, and 0. These are sorted, so that when processed, the following four groups will be created: 0, 1, 2, and 3.
The expression concatenates the value of the current group times 10 with the value of the current group times 10 plus This allows you to create many new features in your templates that require updateable variables. In a multi-threaded environment there may be many transformations occurring at the same time, therefore the variable must be assigned to a single transformation.
See the section on Running Totals for an example of the usage of updateable variables. You can pass runtime parameter values into your template. These can then be referenced throughout the template to support many functions.
When the report generated in RTF, the programmer supposes to show a lot of information in titles, footnotes, body, and column headers. There are various techniques available to embed the special characters in the clinical study reports and they will be discussed in this blog. The output is as same as using Super, Sub, and dagger scripts. Using the byte function is an alternative approach to the script.
0コメント