Skip to Content
Technical Articles

Ad-Hoc reporting in SAP Analytic Cloud Analytic Designer with table and Navigation Panel

Dear SAP Analytic Cloud Community members,

In this blog we will be looking into providing end-user with the power to create their custom reports and save in tables using Navigation Panel and Bookmarking feature in Analytic Designer.

 

Step 1:  Facilitating the custom reporting

We will need a table and a button to open the Navigation Panel. Navigation Panel can be used only with Tables.

Below is the script to open navigation panel. We will add this on click of the button.

Table_1.openNavigationPanel();

This will Open the navigation Panel as above.

Navigation Panel allows end users to select the Dimension in rows and columns. Users can reorder the Dimensions in rows and Columns. Also user can Select the required Measures to be added in the table.

Next Step is to add Filter line to allow users to filter the Dimensions in the Data source at runtime.

This Combination allows user to create the custom report based on their requirement.

General Functions like Sorting, export to excel or csv is available on the table.

Step 2: Integrating Bookmark to Save reports

As Users can now create their own reports, now we will include the facility to save the custom reports.

This will Require an Input Field to enter the bookmark name, Button to Save Bookmark and Dropdown to Select the bookmark to open.

To create bookmark we should create a Bookmark Set (Eg: BookmarkSet_1) and include the table component.

When the user have created the desired table structure, they can enter the report/bookmark name in the input field and click on the Button to create bookmark. Script to create bookmark as below.

if(InputField_1.getValue().length===0)
	{
		Application.showMessage(ApplicationMessageType.Warning,"Bookmark Name is Empty");
	}
else
	{
		var stat=BookmarkSet_1.save(InputField_1.getValue(),false,false);
		if(stat)
			{
				Application.showMessage(ApplicationMessageType.Success,"Bookmark Created Successfully");	
			}
		else
			{
				Application.showMessage(ApplicationMessageType.Error,"Bookmark Creation failed");	
			}
	}

 

Then the dropdown has to be added the list of bookmarks. Script for the same as below.

var bookmark_list=BookmarkSet_1.getAll();
for(var i=0;i<bookmark_list.length;i++)
	{
		Dropdown_1.addItem(bookmark_list[i].displayName,bookmark_list[i].displayName);
	}

When a selection is made in the dropdown the bookmark should be applied. Script as below.

var sel=this.getSelectedKey();
var bookmark_list=BookmarkSet_1.getAll();
for(var i=0;i<bookmark_list.length;i++)
	{
		if(sel===bookmark_list[i].displayName)
			{
				BookmarkSet_1.apply(bookmark_list[i]);
			}
	}

This is almost similar to explorer in Stories, except this is applicable only to Tables and Charts are yet to be integrated with Navigation Panel.

This is the simplest scenario for the Ad-Hoc reporting. The bookmarking part has multiple scenarios such as checking if a bookmark with the same name exists. Updating Existing Bookmarks etc. The Bookmarks topic will be discussed deeply in another blog. Thank you for your time 🙂

Be the first to leave a comment
You must be Logged on to comment or reply to a post.