✆+971 58 5616 616  ✉  info@insightcubes.com

Advanced method of exporting reports to PDF, Excel & CSV with SAP Analytics Designer

How to use advanced exporting of reports to Excel, CSV, & PDF with SAP Analytics Designer

In this blog we will be discussing an advanced, and more detailed method of exporting data in the widgets within the analytics application to Excel, CSV and PDF that provides further options to end users to configure the content of the output. We discussed the simple way of exporting in another blog called Exporting Reports To Excel, CSV, And PDF With SAP Analytics Designer.

Now, lets get started with this more detailed and advanced way to configure our exports with advanced settings.

Upon clicking the Advanced Settings button from the “Export To” button, a popup with three tabs is visible:

  • PDF
  • Excel
  • CSV

We will be listing the components of each tab subsequently in detail.

The first tab is Export to PDF, including all the advanced options needed to export the report to a PDF file as needed. The advanced settings tab for PDF includes Exporting File Name, Orientation, Paper Size, Page Number location, Date location under General Settings. Header Text input field with an On/Off switch . Footer Text input field with an On/Off switch. Switch to allow or prohibit Comments. Appendix On/Off Switch and an Switch option to include the entire Table. Last is the Export to PDF button and we will be listing how to configure them in the same order shown in the snippet below.

Add this line of code to the “Exported File Name” input field onChange fx: ExportToPDF.setFileName(this.getValue());

You will find this input field referenced in two other locations, one in the Advanced Export to PDF button starting (Line 8), and one in the Utils._Model-onInit (Line 9). You will find them later in this blog.

Manually fill the Orientation dropdown as shown below

Then add the below code to the Dropdown onSelect fx

Manually input the Paper Sizes to the dropdown as shown below

Then add the below code to the onSelect fx event of the dropdown

Manually input the Page Number Location to the dropdown as shown below

And add the below code to the Page Number location dropdown onSelect fx

Manually input the locations for the date in the PDF to the dropdown Designer

Write the following code to the Date Location dropdown onSelect fx

Add the following code to the Header Text input field onChange fx

And the following to the Header switch onChange fx

Do the same for the Footer Text input field. Add this line of code to the Footer Text input field onChange fx: ExportToPDF.setFooterText(Footer_Input.getValue());

And this line to the Footer Text switch onChange fx: ExportToPDF.setFooterVisible(this.isOn());

Comment switch onChange fx: ExportToPDF.setCommentsVisible(this.isOn());

Appendix first switch onChange fx: ExportToPDF.setAppendixVisible(this.isOn());

Appendix Full Table switch onChange fx

As mentioned in the beginning of this PDF section we have to create a Script Object, call it Utils_Model and add a Script Function called “onInit”, with a Return Type: void. Without switching on Set as Array and no Arguments to set the Export file name for PDF (Line 9), Excel and CSV (Lines 8, 10) Exporting File name fx.

Refer to this snippet of the Script Object fx to set the FileName for Excel and CSV too, (Lines 8, 10)
Figure 1.1

Lastly for the PDF Export is the “Export to PDF” button. Add the following code to the buttons’ onClick fx, and you are ready to Export reports to PDF files.


The second tab is Export to Excel, including all the advanced options available in the backend of the Analytics Designer. These options can be used in the simple export method but are fixed and cant be changed on the run application. We have configured the settings to be available for users in the run application for an advanced end-level ease of use. The Export to Excel advanced settings tab includes Exported File Name, Include Table Metadata, Include Number Formatting, and Keep Hierarchical Indentation for the Data Labels switches and we will be listing how to configure them in the same order shown in the snippet below.

On the “Exported File Name” input field onChange fx add this line of code: ExportToExcel.setFileName(this.getValue());

Refer to Figure 1.1 for the other code needed to set the “FileName” in the “Utils_Model” “onInit” (Line 8). And on the “Advanced Export to Excel” button onClick fx starting (Line 3).

Add the following code to the “Include Table Metadata” Switch onChange fx: ExportToExcel.setAppendixIncluded(this.isOn());

The following to the “Include Number Formatting” Switch onChange fx: ExportToExcel.setExportFormattedValues(this.isOn());

Last add this code to the “Keep Hierarchal Indentation for the Data Labels” Switch onChange fx: ExportToExcel.setIndentedHierarchy(this.isOn());


The third tab is Export to CSV, like the export to Excel Tab it includes all the advanced options available in the backend of the Analytics Designer. These options can be used in the simple export method but are fixed and cant be changed on the run application. We have configured the settings to be available for users in the run application for an advanced end-level ease of use. The Export to CSV advanced settings tab includes Exported File Name, Scope, Include Number Formatting, and Show Hierarchal in separate columns switches and we will be listing how to configure them in the same order shown in the snippet below.

On the “Exported File Name” input field onChange fx add this line of code: ExportToCSV.setFileName(this.getValue());

Refer to Figure 1.1 for the other code needed to set the “FileName” in the “Utils_Model” “onInit” (Line 10). And on the “Advanced Export to CSV” button onClick fx starting (Line 3).

Add the following code to the “Scope” Dropdown onSelect fx

Figure 1.2

The following to the “Include Number Formatting” Switch onChange fx: ExportToCSV.setExportFormattedValues(this.isOn());

Last add this code to the “Show Hierarchy in Separate Columns” Switch onChange fx: ExportToCSV.setHierarchyLevelsInIndividualCells(this.isOn());

For the “Show Hierarchy in Separate Columns” Switch you will find two more lines of code (Line 4, and 8) on the Scope Dropdown onSelect fx called “DD_ExportCSVOptions_POV” in Figure 1.2.

Now you can export you reports with advanced options from SAP Analytics Designer.

Recent Posts

Get in Touch

Learn more and ask us About Our Cloud Consolidation Solution

Share This Post

Share this Page!

Share this with your network.

Want to Know More?

Get In Touch

Feel free to contact us, and we will be more than happy to answer all of your questions.