Adding Headers and Footers
Use a 3-column table in the header and footer of your template to allow for a uniform adjustment of items such as titles, logos, and page numbers. Use Microsoft Help to learn how to add the first page to your document that does not include Header or Footer.
Adding Images from Unifier
Note: Microsoft Word does not support form fields in the header and footer. If need to add an image to the header or footer of your Custom Report and you want the image to repeat on each page, see the "Adding BI Fields to the RTF Header or Footer" section.
To add an image (examples: Company logo, Shell image, or image picker from a BP record: jpg, gif, or png) from Unifier into your Custom reports, use the Sample XML file (Sample Data) that you have created and exported.
Note: Company logo cannot be displayed in Unifier interface. Create a company-level business process to place your Company logo.
The following shows the procedure by using an example:
- Open the XML file.
- On top, identify the XML elements that are blank (shown in bold in the following code).
<?xml version="1.0" encoding="UTF-8"?>
<DATA_DS>
<uuu_p_reportByF></uuu_p_reportByF>
<uuu_p_timeZoneF></uuu_p_timeZoneF>
<uuu_p_diffMinutesF>0</uuu_p_diffMinutesF>
<uuu_p_sysyTimeZoneID></uuu_p_sysyTimeZoneID>
<uuu_p_searchConditionF></uuu_p_searchConditionF>
<uuu_p_urlF></uuu_p_urlF>
<uuu_p_sessionIdF></uuu_p_sessionIdF>
<uuu_p_companyRegistryF></uuu_p_companyRegistryF>
<inv>
<PROJECT_ID>1012</PROJECT_ID>
<INV_ID>1</INV_ID>
<INV_RECORD_NO>INV-001</INV_RECORD_NO>
<INV_TITLE>Lumber Contract - Initial Invoice</INV_TITLE>
<INV_STATUS>Approved</INV_STATUS>
Note: At runtime, these blank elements are fully populated with information about the server base URL, the User's session ID, and the company registry.
- Using the included parameters, plus the ID of a specific image (the image that you want), construct a URL of the format:
<uuu_p_urlF>CompanyRegistry=<uuu_p_companyRegistryF>&sessionId=<uuu_p_sessionIdF>&id=<image_ID>
Note: To build a similar URL in your BI Publisher/Oracle Analytics Publisher report, ensure that you have the Image ID because the other three parameters have already been identified.
- Access the Image ID of the image that you want and:
Note: If applicable, you can find the Company logo Image ID in the companylogo column of the table sys_company_info.
- JOIN the information into your existing Data Views.
or
- Add the information as a new Data View, which you can add as a Sub-Report View to any Custom Report. The SQL to create a Data View:
SELECT companylogo
FROM sys_company_info
WHERE companyregistry = 'unifier';
- JOIN the information into your existing Data Views.
- Define the variables:
After you have an Image ID, you must define the variables needed to build the image URL by hiding the variables in a Data Field:
- Add a data field somewhere at the top of your report. This can be any field. You only need a placeholder for your variables.
- Double-click the newly added data field and click the Advanced tab. Delete the text in the code box, if any.
- Add the following text into the code box:
<?variable@begin:uuu_p_urlF;(.//uuu_p_urlF)[1]?> <?variable@begin:uuu_p_companyRegistryF;(.//uuu_p_companyRegistryF)[1]?>
<?variable@begin:uuu_p_sessionIdF;(.//uuu_p_sessionIdF)[1]?>
<?variable@begin: image;(/DATA_DS/co/COMPANYLOGO)?>
Notes:
- If you are adding a Shell image or Image Picker Data Element, you do not need that last line. Add the last line only if you have created a Company log Data View (If applicable, you can find the Company logo Image ID in the companylogo column of the table sys_company_info).
- The example code presumes that you added an unlinked Sub Report View with the Data Set Tag "co" (for Company). You can change the Data Set Tag "co" (for Company) to the value that you have in the last column of Company Logo row in the Views used as data sets table on the Views tab of the Custom Report dialog.
- If you want to insert the Project Shell ID, you must access that variable. Depending on where you are in your grouping, the variable can be:
<?variable@begin:image;(SHELLIMAGE)[1]?>
To access the Project or Shell Image ID:
- Go to table: unifier_shell_info.
- Identify the shellimage column of the table. The Project or Shell Image ID is in the shellimage column.
You can JOIN this table to your main report view based on the unifier_shell_info.pid column, which contains the project ID.
After you defined your variables, you can add an image. The BI Publisher/Oracle Analytics Publisher leverages the Alternative Text of an image to dynamically set the image source. For more information, refer to the Report Designer's Guide for Oracle Business Intelligence Publisher or the Using Oracle Analytics Publisher in Oracle Analytics Server guide.
To add a dummy image:
- Create an image (for example, Dummy_Image.jpg) and size it appropriately (for example, 300 x 200 px).
- Right-click the image and select Size…
- Click the Alt Text tab of the Size dialog.
- Paste the following into the Alternative Text box:
url:{concat($uuu_p_urlF,'companyRegistry=',$uuu_p_companyRegistryF,'&sessionId=',$uuu_p_sessionIdF,'&id=',$image)}
Note: The last parameter ($image) was set as a variable to either the Company logo or the Project or Shell image. You must adjust the parameter if you want to include both images. Ensure that you use separate variable names for each.
To test an image:
The three parameters that you used to build your URL to the image are not downloaded as part of the sample data:
uuu_p_urlF
uuu_p_sessionIdF
uuu_p_companyRegistry
You must upload your RTF template to Unifier, publish the Custom Report, and then run the report to ensure that your image was inserted successfully.
Last Published Tuesday, December 12, 2023