This feature is only available for Ambience v4.6.3 & above.
Configuring Excel Print Headers from etc\application.conf
- In the etc\application.conf file of your Ambience installation, add in the following lines:
elixir.rml.xlsx.print-header = "Sample Print Header"
elixir.rml.xlsx.print-footer = "Sample Print Footer"
-
Restart the Ambience Server.
-
Render the RML template in XLSX format.
A sample RML template can be downloaded at the end of this entry -
From the XLSX output, open it in “Print Preview”
-
Output should be as follows:
^ Top of XLSX output
^ Bottom of XLSX output
Configuring Excel Print Headers using OnRenderBegin script of the RML template
-
In the sample RML template, open the Report Template properties & click on the “Scripts” tab.
Click on “Report” tab, right-click on Report name and click “Properties”
-
Add the following lines in “On Render Begin”:
var rd=this.getRenderDetails("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet");
rd.setParameterValue("PrintHeader","DemoH#DemoHCenter#");
rd.setParameterValue("PrintFooter","Left#Centre#Right");
-
Save the RML template & render as XLSX output.
-
From the XLSX output, open it in “Print Preview”.
-
Output should be as follows:
^ Top of XLSX output
^ Bottom of XLSX output
Sample RML template:
sample-report.zip (1.6 KB)