biExport for Design Studio Blog

How to choose which tabs to export from Lumira Designer / Design Studio

created: 09.01.2018

In my last blog post “How to export all tabs of your SAP Lumira Designer or SAP Design Studio Dashboard (http://www.designstudio-export.com/blog/how-to-export-all-tabs-of-your-lumira-designer-design-studio-dashboard-) I demonstrated how you can export all contents of your reporting application. In my example I had serveral tabs and the user was able to export the contents of all tabs with just one click!

In today’s post I want to enhance this example with a user dialogue. There the user can individually select, which parts to export.

Let’s first have a look at how this looks like:

Now let’s have a look at the implementation:

We are reusing the application from my previous post:

http://www.biexcellence.com:80/mimes/designstudio_export/LumiraDesigner/LumiraDesigner_11.PNG

You can see that I added POPUP_1 which shall give the user the option to select the tabs to be exported:

http://www.biexcellence.com:80/mimes/designstudio_export/LumiraDesigner/LumiraDesigner_12.PNG

The button “Plain PDF” simply calls POPUP_1.open() in order to make the export popup visible.

The URL parameter Array and the onStartup script that we created in the previous posts are reused.

Also the “Alternative Export Application” property of the biExport extension:

http://www.biexcellence.com:80/mimes/designstudio_export/LumiraDesigner/LumiraDesigner02.PNG

The definition of URL parameters in the biExport extension, though, has to be changed. We will set them dynamically via script. Remember the static definition for values “0;1;2” in the previous post:

http://www.biexcellence.com:80/mimes/designstudio_export/LumiraDesigner/LumiraDesigner03.PNG

Now we create a script for the onSelect event of the checkboxes CHECKBOXGROUP_1. Whenever a checkbox is selected, we want to change this property.

This is the coding we add for onSelect:
var lvalues = "";
CHECKBOXGROUP_1.getSelectedValues().forEach(function(element, index) {
  lvalues = lvalues + element + ";";
});
var lparam = OPENBIEXPORT_1.createUrlParameter2("","", "XTABNO", true, lvalues);
var lparams = [lparam];
OPENBIEXPORT_1.setUrlParameterArray(lparams);

Using getSelectedValues() we first iterate over all selected values of CHECKBOXGROUP_1. We concatenate the values separated by “;”. Then we create a URL parameter XTABNO with the concatenated values using the method createUrlParameter2(). In the last step, we set the property Url Parameter Array of the OPENBIEXPORT_1 component.

That’s it! Quite simle, isn’t it?

In one of my next posts I will enhance this example again so you can export all contents of the tabs for different regions at the same time! Stay tuned!