Saturday, 13 January 2018

Domain row-level security example in Jaspersoft - retrieve specific customer data based on logged in user

Hi folks,

Happy New Year.! 2018.

It's been a long time, I have shared a technical write-up in Jaspersoft BI.

Today, here I come with an interesting concept, that is how to restrict the data for specific customers based on logged in user.

In this article, you will see, an end-to-end example starting from domain creation to ad-hoc view and then show you how to restrict the data.




The example(project zip file and explanation) is available as word document which you can download by clicking this link.


This example is also available in my YouTube channel. Watch out the video tutorial for the demonstration here

Page-1 Sample content 

Use case: Display brand wise store cost of customers in cross tabular (or pivot) view using ad-hoc reports.

To keep the demonstration simple and easy to understand the concept, let us take below three tables from foodmart database.

Tables: customer, product and sales_fact_1997

Let’s say customer1_user belongs to "Alexandra Meyer" customer, customer2_user belongs to “Cathy Bohn” customer respectively and these users are created manually or populated by an ETL tool to the jaspersoft server (to jasperserver database).

When customer1_user logs in and run the ad-hoc view/report he should be able to see only the data related to him and vice versa for the customer2_user


Page-4 Sample content 




Page-6 Sample content 

Sample snapshot of restricted data for customer1_user 


Read the full content by downloading the word/pdf document by clicking this link.


Stay tuned for more updates - an year for learning advanced concepts in Jaspersoft. 


Thank you
Until next, 
Sadakar Pochampalli 

No comments:

Post a Comment