Skip to Content

Getting Started

Since Design Studio 1.3, we have the ability to print a WYSIWYG copy of our application at runtime. To see this in action, check out the interactive tutorial @ SAP LearnBI (http://scn.sap.com/docs/DOC-55517).

Printing_01.png

E.g. Place this code snippet inside an objects “On Click” event.

Let’s give it a try! Here is our demo application BEFORE we click the [Print] button.

Printing_02.png

Here is our demo application in Print Preview mode AFTER we click the [Print] button.

Printing_03.png

Two noticeable issues:

1. Background colour is not visible in our Header and Footer.

2. The popup menu remains during the print.

Issue #1 – Background Colour is Not Visible

Each browser may render the initial view slightly differently. Refer to the Design Studio Guide – Printing an Analysis Application (http://help.sap.com/businessobject/product_guides/AAD14/en/ds14_user_en.pdf) for a summary of print settings for each browser.

In our case we are using Google Chrome, checking “Background graphics” fixes our initial issue.

Printing_04.png

Issue #2 – Popup Menu is Visible while Printing

This initially caused some confusion as our “On Click” event had script to set the Panel components visibility to false before the APPLICATION.print() was invoked, but it looks as though our code is executed simultaneously.

Printing_05.png

To resolve this issue, simply update your CSS to leverage the @media rule which allows us to stipulate a different style for specific media (in this case, print). For more information about @media, check out W3 Schools (http://www.w3schools.com/css/css_mediatypes.asp).

Printing_06.png

The popup menu is no longer visible when printed 🙂

Printing_07.png

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Alfred Lee

    Hi Taygan,

    Thank you for providing the tips!

    I am facing a similar issue. Since DS 1.5, we can export application to pdf. I want to make a watermark visible before exporting and hide it after exporting. However, the pdf exportation component has its own build-in “OK” button, whose on-click script is not exposed. Thus, I am not able to hide the watermark. Do you have any idea for this?

    Thank you!

    Best regards,

    Alfred

    (0) 
  2. E. Lokenberg

    When you put the following line in you stylesheet you can exclude every object you want by filling in ‘noPrint’ in the CSS Class.

    @media print {.noPrint {display: none;}}

    (0) 

Leave a Reply