6

Export the Analytic Application to PDF

 1 year ago
source link: https://blogs.sap.com/2022/10/06/export-the-analytic-application-to-pdf/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
October 6, 2022 4 minute read

Export the Analytic Application to PDF

Author: Geetha Madhuri Bobbili
LinkedIn Profile: https://www.linkedin.com/in/geetha-madhuri-bobbili-971268184/

Introduction:

We can use the Export to PDF component and its script APIs to export an analytic application to a PDF file. By default, the export settings we defined in the Export to PDF panel cannot be modified during the application run time by the users.

In this example, to offer application users the flexibility to customize the export settings, I have designed a new settings dialog by leveraging relevant APIs.

The following properties can be set during the application runtime and export the Analytic Application to PDF.

  • Name of the technical object
  • Orientation of the exported file: Landscape or Portrait
  • Location of page number: Header, Footer or None
  • Exported file name, header and footer texts
  • Whether to export the appendix
  • Whether to export the comments
Screenshot-2022-10-06-211045.png

Step 1:

In the Scripting section of the Outline, select “+” right next to “Export to PDF” to create a technical object. It will open the side panel with a default name ExportToPDF_1.

1-18.png

Step 2:

Create a Popup and name it as POPUP_EXPORT.

1-39.png

In the Builder panel switch on Enable header & footer. Create buttons for Export & Cancel.

1-31.png

Add the below script by selecting edit scripts option next to POPUP_EXPORT.

1-32.png

Step 3: Name of the technical object

Create an Input Field (IF_FILE) and select the data Source Type as Manual Input. Switch on the Display Hint and enter the text “Enter name for the Exported PDF file…”.

1-24.png

Select the Input Filed (IF_FILE) from the Popup section of the outline, Add the below script by selecting edit scripts option next to IF_FILE.

1-25.png

Step 4: Orientation of the exported file – Landscape or Portrait

Create a Radio Button Group (RB_OR) to select the Orientation and select the Horizontal layout from the Display option in Styling panel.

1-26.png

Add the below script by selecting edit scripts option next to RB_OR.

1-27.png

Step 5: Location of page number: Header, Footer or None

Create a Radio Button Group (RB_PN) to select the Location pf page number and select the Horizontal layout from the Display option in Styling panel.

1-29.png

Add the below script by selecting edit scripts option next to RB_PN.

1-30.png

Step 6: Exported file name, header and footer texts

Create two Switches (S_HEADER & S_FOOTER) to enable and disable the header, footer. Create two Input Fields (INF_HEADER & INF_FOOTER) to enter name for header, footer.

1-33.png

Add the below script by selecting edit scripts option next to S_HEADER, S_FOOTER, INF_HEADER & INF_FOOTER.

1-35.png
1-36.png

Step 7: Whether to export the appendix

The appendix will be exported as separate page. Create a Switch (S_APP) to enable or disable the Appendix. Add the below script by selecting edit scripts option next to S_APP.

1-37.png

Step 8: Whether to export the comments

The comments will be exported as separate pages. Comments on invisible widgets won’t be exported. Create a Switch (S_COMM) to enable or disable the Appendix. Add the below script by selecting edit scripts option next to S_COMM.

1-38.png

Step 9:

Insert an Image in Canvas, name it as IMAGE_PDF and add the below script by selecting edit scripts option next to IMAGE_PDF.

1-21.png

Step 10: Save and Run the Analytic Application

Application users can export whatever appears on the application running page via clicking the image created in Step 9 and select the required properties, click Export.

1-40.png

Please note that only visible contents in your application can be exported to PDF. The below invisible elements won’t be exported:

  • Invisible part in scrollable charts, tables or tab strips
  • Collapsed table cells
  • Lazy rendered widgets
  • Comments on invisible data cells
  • Custom widgets and web page widgets

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK