3 August 2024

Using @INLINES in your BI Publisher RTF Template

Advised Solutions - Business Analytics Series

Understanding @INLINES Syntax in Oracle BI Publisher RTF Templates

Oracle BI Publisher’s RTF templates support powerful markup commands to control data rendering, formatting, and logic in output documents. One advanced and useful feature is the @INLINES context command, which controls where and how certain calculations, conditional logic, or subtemplate results appear in your document layout.

What is @INLINES?

The @INLINES context in BI Publisher RTF syntax ensures that the output of a template command, such as a conditional if, a calculation, or a call to a subtemplate, is rendered inline—directly at the position of the command in the template. This is crucial when you want to keep dynamic results or formatted text on the same line as adjacent content, preventing unwanted line breaks or spacing.

Typical Use: Inline Subtemplate Results

Suppose you have a different address or formatted message defined, you can call them from a subtemplate. To render its result seamlessly within a paragraph or cell, use @INLINES:

				
					<?choose:?>
  <?when:(EMP_REGION='REGION_EMEA')?><?call-template:EMEA?><?end when?>
  <?when:(EMP_REGION='REGION_MENA')?><?call-template:MENA?><?end when?>
  <?when:(EMP_REGION='REGION_AMERICAS')?><?call-template:AMERICAS?><?end when?>
<?end choose?>
				
			

Including @inlines in your call ensures that the computed interest displays right where the call command is placed—inline with other content.

Conditional Statements

You can also use @inlines with if logic to keep conditional output inline:

				
					<?xdofx:if@inlines: AMOUNT > 1000 then 'High' else 'Low' end if?>
				
			

This prevents the conditional result from forcing a new line in the output, maintaining a compact format for display.

Why Is @INLINES Important?

  • Maintains clean formatting especially within tables, paragraphs, and lists.

  • Enables display of results on the same line as surrounding text—crucial for documents like invoices, contracts, or statements.

  • Avoids unnecessary whitespace and line breaks, leading to more readable documents.

Best Practices

  • Use @INLINES when output must be tightly integrated with surrounding text.

  • Pair @INLINES with subtemplate calls, conditionals, and complex formatting logic.

  • Test your template to confirm expected inline rendering, especially with dynamic or multilingual content.

The @INLINES context command is an essential RTF markup tool for Oracle BI Publisher users seeking precise output control. Leverage it to keep your conditional data, calculations, and subtemplate results well formatted and professional, right inline with the rest of your content.

Need some assistance?

Ready to bring clarity to customer, supplier and employee communications? With BI Publisher, we specialise in customising customer, supplier, and employee-facing documents such as invoices, purchase orders, payslips, and statements to meet your exact branding, compliance, and operational needs. From layout design to data logic enhancements, we help you deliver clear, consistent, and impactful outputs across your organization. Contact us today to discover how our expertise in BI Publisher can streamline your document processes and elevate your business communications.