Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
madhurashende
Contributor
Contributor

How to email Nprinting reports to individual recipients with dynamic filters

I am very new to nPrinting and have created a report that needs to be emailed to individual users dynamically.

details :

I have a data field called Member Org which has 100 values. I have a report for each member performance that I need to send to individual user email address. I have user table that stores user Id and email.  Each user is associated with member Org . Member org can have multiple users . My report is named dynamically with the member org name and I am cycling thru member org  field.

From what I read so far, there is no direct way to match member org name in the report and just send the relevant file to the users under that member . What I understood is  I need to create a recipient/User  filter per User and assign him the correct organization so that the only his  report will be sent to him. However that means I need to create 100 filters manually and map the user to his organization. I have a data table in my data model which associates the user with its organization already .

I am stuck at :

1. How do I create the filter dynamically so that I dont have to hardcode the organization mapping to user in the filter.

2. is there a better way of achieving what I am trying to do.

 

any help would be very appreciated,

Best 

Madhura

Labels (2)
7 Replies
Frank_S
Support
Support

Hi @madhurashende

Welcome to the NPrinting Community!

 

I suppose you could use section access in your app and not use NP filters at all as NPrinting can handle NTLM section access.

 

Keep in mind that this comes at the expense of overall reporting performance since section access creates each report per user section access rights permission. This is much slower than NPrinting filters but might work for your situation.

Check out the following article to help with configuring section access for use with NPrinting.

Perhaps others here might have some other suggestions as well.

 

Kind regards...

 

cc @Ruggero_Piccoli

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
madhurashende
Contributor
Contributor
Author

Thank you for your reply. My data model has information about member performance as well as its peer groups so I cant really use section access fully. I will check it out though. In any case, what is the best way to create a user filter that automatically assigns the values of the members relevant organization without hardcoding it in the filter ? it should get assigned form the data table . is there a way to do that ?

 

Frank_S
Support
Support

I'm not even sure if that is possible 'dynamically assigning a filter to a recipient'.

I've tried to come up with some ways of doing it be each thought I've had hits a road blocks.

 

You might consider:

1. Creating NPrinting (distribution) Groups

2. Creating Multiple publish tasks and apply filters to each task than each user.

3. Apply which NP Group needs to be applied to each task (it is not possible to apply filters to groups).

 

If this too is not doable, then perhaps someone more clever than myself has figured that out 🙂

 

Kind regards...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Frank_S
Support
Support

I'm not even sure if that is possible 'dynamically assigning a filter to a recipient'.

I've tried to come up with some ways of doing it be each thought I've had hits a road blocks.

 

You might consider:

1. Creating NPrinting (distribution) Groups

2. Creating Multiple publish tasks and apply filters to each task than each user.

3. Apply which NP Group needs to be applied to each task (it is not possible to apply filters to groups).

 

If this too is not doable, then perhaps someone more clever than myself has figured that out 🙂

 

Kind regards...

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
madhurashende
Contributor
Contributor
Author

that's a good approach. Even if I am able to create a filter that says orgId = User's org Id from database, (perhaps  using a variable in the app ?) then the probelm will be solved. E.g. User A will get this filter assigned and applies the value of User A's org dynamically rather than hardocded static value then the problem will be solved. I am not sure if I am overthinking about this or not thinking in the right direction. but I am not sure on syntax for the variable where I can get the org name form data base for the corresponding user. and not all of my users have a domain account associated. I have some external users that I will be emailing report to.

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, 

I am reading through this conversation and I am not sure if I am missing something obvious.

Maybe my below suggestion is against the line "How do I create the filter dynamically so that I dont have to hardcode the organization mapping to user in the filter."

I get it - filter indeed is kind of hard coded but still is dynamic as it can be created/updated or deleted automatically. steps below:

The way I would have done this would be:

  • using your existing table user-orgid etc i would create recipient import file with the structure and filters required as per documentation below:
  • also using the same import as mentioned above you can update users who will belong to the report distribution group
  • then in the Publish task you setup a group as a user/recipient of the report and filtering is then handled by user filters.

cheers

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Ruggero_Piccoli
Support
Support

Hi,

I would like to add that both proposed solutions, Section access and importing users and filters, but native Qlik NPrinting filters has better performances. So, if you have to create the solution from the beginning, I suggest to implement native filters.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.