Configuring BI Publisher Reports to Use Unifier Images

To add a dynamic Unifier image in BI Publisher report, we need to create a new data set in the Data Model (XDM) file, as explained below.

Note: The following instructions apply to reports that run on BI Publisher server, directly. The BI Publisher reports run via Unifier does not need to make these changes.

In the .XDM file:

<dataSet name="security_token" type="complex">

<sql>

<![CDATA[SELECT token_value sec_token from ( SELECT token_value,expired,ROW_NUMBER() OVER (ORDER BY expired desc) rn FROM sys_server_token WHERE token_type = 'img') where rn = 1]]>

</sql>

</dataSet>

<group name="security_token" label="security_token" source="security_token">

<element name="SEC_TOKEN" value="SEC_TOKEN" label="SEC_TOKEN" dataType="xsd:string" breakOrder="" fieldOrder="1"/>

</group>

Note: The purpose is to get the server token from database where "expired" is the maximum from all the rows.

In the report template that requires to have the image to be inserted, change the "Alt text" of the image to point to image retrieval URL.

To retrieve a Unifier image, use the URL: https://unifier-server-address /bluedoor/rest/image/<image_id>/<server_token>

The report parameter uuu_p_urlF can be created in Data Model (XDM) file with a default value, so at the runtime the Unifier server address-part of the URL can be changed appropriately:

<parameter name="uuu_p_urlF" defaultValue="https://unifier-server-address/bluedoor/rest/image" dataType="xsd:string" rowPlacement="8">

<input label="uuu_p_urlF" size="100"/>

</parameter>

The report template uses this URL in the "Alt text" of the image, as in: url:{concat($uuu_p_urlF,'/',DATA_IMAGE_ID,'/',//security_token/SEC_TOKEN[1])}

Where: uuu_p_urlF can be the template variable, for example: <?variable@begin:uuu_p_urlF;(.//uuu_p_urlF)[1]?>

The security token, retrieved from DB by the dataset is: //security_token/SEC_TOKEN[1]

The runtime data (image ID) is: DATA_IMAGE_ID

See Also

About Configuring BI Publisher for Primavera Unifier

Getting Started with BI Publisher Reports

Downloading BI Publisher

Configuring BI Publisher for Primavera Unifier Reporting

Configuring BI Publisher in Primavera Unifier

Setting Permissions for Custom Reports

Creating Data Views

Creating a BI Publisher Report in Unifier

Adding Permissions to Run BI Publisher Reports

Running the BI Publisher Report in Primavera Unifier

Copyright



Legal Notices | Your Privacy Rights
Copyright © 1998, 2020

Last Published Wednesday, December 16, 2020