Qlik Community

Qlik NPrinting Discussions

Discussion Board for collaboration on Qlik NPrinting.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Overview Users per task in NPrinting

Goodmorning everybody

We have 100+ tasks in NPrinting 19.  Now I like to know which users are involved in every task. So I like to have a list with all tasks and of every task the users that are linked to that specific task.

How to do that?

1 Solution

Accepted Solutions
Highlighted

Re: Overview Users per task in NPrinting

Hi,

There is no out of the box solution for your query.

In my deployments I would maintain Recipient list where users would belong to NPrinting groups (each group for each report task). Then I would use API to retrieve user-group association used in NPrinting or simply I would refer to the spreadsheet or LDAP for user-group association to get information which user receives which report.

I assume you did not follow that practice and you simply put your users into publish task.

At the moment the only way of getting that information out would be by tapping into repository https://community.qlik.com/t5/Qlik-NPrinting-Discussions/NPrinting-Repository-Database-Name/td-p/133...

If you want to connect from other than local server you need to adjust postgress database config to allow for it:

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/How-to-connect-to-postgresql-database-from-...

and retrieving below information:

  • "public"."usr" - this table contains users details
  • "public"."user_group_to_usr" - this table contains user-group (association) and needs to be used as a bridge to allow link users to reports if group was used in publish task
  • "public"."report" - this table will give you report details like name, format , description etc..
  • "publish_report_task_report" - this table associates tasks and reports
  • "public"."publish_report_task_recipient"  - this table associates tasks and users/groups

With the above tables you will be able to quickly build an qlik app which will give you information you need.

sample script:

 

[publish_report_task_recipient]:
LOAD  
	enabled, 
	web_destination_active, 
	smtp_destination_active, 
	publish_report_task_id, 
	recipient_id;
SELECT 
	*
FROM "public"."publish_report_task_recipient";



[publish_report_task_report]:
LOAD 
	output_format				as [Report output format], 
	advanced_settings, 
//	enabled, 
	is_email_attachment, 
	title, 
// 	read_password, 
// 	write_password, 
	encryption_type, 
	publish_report_task_id		, 
	report_id					as report_id_Key,
;
SELECT 
	*
FROM "public"."publish_report_task_report";


[report]:
LOAD 
	id					as report_id_Key, 
	version, 
// 	created, 
// 	last_update, 
	report_type_id, 
	title				as [report title], 
	description			as [report description], 
	original_ref, 
	enabled				as [report enabled],
	on_demand_enabled	as [report on demand], 
	template_format		as [report template format], 
	entities_xml		as [report entities], 
;
SELECT 
	*
FROM "public"."report";

//

[user_group_to_usr]:
LOAD 
	user_group_id, 
	user_id;
SELECT 
	*
FROM 
	"public"."user_group_to_usr"
;

users:
LOAD 
	'users'				as user_link_type,
    recipient_id, 
	key_id, 
	sid, 
	salt, 
	hashed_password, 
	domain_account, 
	locale, 
	timezone, 
	email, 
	last_login_attempt, 
	login_delay, 
	last_logout, 
	folder, 
	sub_folder, 
	nickname, 
	company, 
	job_title, 
	department, 
	office, 
	read_password, 
	write_password, 
	alternate_email_1, 
	alternate_email_2, 
	alternate_email_3;
SELECT 
	*
FROM "public"."usr";

left join (user_group_to_usr)
LOAD 
	'group'				as user_link_type,
    recipient_id		as user_id, 
	key_id, 
	sid, 
	salt, 
	hashed_password, 
	domain_account, 
	locale, 
	timezone, 
	email, 
	last_login_attempt, 
	login_delay, 
	last_logout, 
	folder, 
	sub_folder, 
	nickname, 
	company, 
	job_title, 
	department, 
	office, 
	read_password, 
	write_password, 
	alternate_email_1, 
	alternate_email_2, 
	alternate_email_3;
SELECT 
	*
FROM "public"."usr";

Concatenate (users)
Load
	'group'				as user_link_type,
    user_group_id		as recipient_id, 
	key_id, 
	sid, 
	salt, 
	hashed_password, 
	domain_account, 
	locale, 
	timezone, 
	email, 
	last_login_attempt, 
	login_delay, 
	last_logout, 
	folder, 
	sub_folder, 
	nickname, 
	company, 
	job_title, 
	department, 
	office, 
	read_password, 
	write_password, 
	alternate_email_1, 
	alternate_email_2, 
	alternate_email_3
Resident
	user_group_to_usr
;

Drop table user_group_to_usr;

 

!!! Tapping into repository db is not supported. You can do it at your own risk. Make sure you take repository backup before accessing it !!!

The above is just example what is technically possible but is not recommended.

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.

View solution in original post

3 Replies
Highlighted

Re: Overview Users per task in NPrinting

Hi,

There is no out of the box solution for your query.

In my deployments I would maintain Recipient list where users would belong to NPrinting groups (each group for each report task). Then I would use API to retrieve user-group association used in NPrinting or simply I would refer to the spreadsheet or LDAP for user-group association to get information which user receives which report.

I assume you did not follow that practice and you simply put your users into publish task.

At the moment the only way of getting that information out would be by tapping into repository https://community.qlik.com/t5/Qlik-NPrinting-Discussions/NPrinting-Repository-Database-Name/td-p/133...

If you want to connect from other than local server you need to adjust postgress database config to allow for it:

https://community.qlik.com/t5/Qlik-NPrinting-Discussions/How-to-connect-to-postgresql-database-from-...

and retrieving below information:

  • "public"."usr" - this table contains users details
  • "public"."user_group_to_usr" - this table contains user-group (association) and needs to be used as a bridge to allow link users to reports if group was used in publish task
  • "public"."report" - this table will give you report details like name, format , description etc..
  • "publish_report_task_report" - this table associates tasks and reports
  • "public"."publish_report_task_recipient"  - this table associates tasks and users/groups

With the above tables you will be able to quickly build an qlik app which will give you information you need.

sample script:

 

[publish_report_task_recipient]:
LOAD  
	enabled, 
	web_destination_active, 
	smtp_destination_active, 
	publish_report_task_id, 
	recipient_id;
SELECT 
	*
FROM "public"."publish_report_task_recipient";



[publish_report_task_report]:
LOAD 
	output_format				as [Report output format], 
	advanced_settings, 
//	enabled, 
	is_email_attachment, 
	title, 
// 	read_password, 
// 	write_password, 
	encryption_type, 
	publish_report_task_id		, 
	report_id					as report_id_Key,
;
SELECT 
	*
FROM "public"."publish_report_task_report";


[report]:
LOAD 
	id					as report_id_Key, 
	version, 
// 	created, 
// 	last_update, 
	report_type_id, 
	title				as [report title], 
	description			as [report description], 
	original_ref, 
	enabled				as [report enabled],
	on_demand_enabled	as [report on demand], 
	template_format		as [report template format], 
	entities_xml		as [report entities], 
;
SELECT 
	*
FROM "public"."report";

//

[user_group_to_usr]:
LOAD 
	user_group_id, 
	user_id;
SELECT 
	*
FROM 
	"public"."user_group_to_usr"
;

users:
LOAD 
	'users'				as user_link_type,
    recipient_id, 
	key_id, 
	sid, 
	salt, 
	hashed_password, 
	domain_account, 
	locale, 
	timezone, 
	email, 
	last_login_attempt, 
	login_delay, 
	last_logout, 
	folder, 
	sub_folder, 
	nickname, 
	company, 
	job_title, 
	department, 
	office, 
	read_password, 
	write_password, 
	alternate_email_1, 
	alternate_email_2, 
	alternate_email_3;
SELECT 
	*
FROM "public"."usr";

left join (user_group_to_usr)
LOAD 
	'group'				as user_link_type,
    recipient_id		as user_id, 
	key_id, 
	sid, 
	salt, 
	hashed_password, 
	domain_account, 
	locale, 
	timezone, 
	email, 
	last_login_attempt, 
	login_delay, 
	last_logout, 
	folder, 
	sub_folder, 
	nickname, 
	company, 
	job_title, 
	department, 
	office, 
	read_password, 
	write_password, 
	alternate_email_1, 
	alternate_email_2, 
	alternate_email_3;
SELECT 
	*
FROM "public"."usr";

Concatenate (users)
Load
	'group'				as user_link_type,
    user_group_id		as recipient_id, 
	key_id, 
	sid, 
	salt, 
	hashed_password, 
	domain_account, 
	locale, 
	timezone, 
	email, 
	last_login_attempt, 
	login_delay, 
	last_logout, 
	folder, 
	sub_folder, 
	nickname, 
	company, 
	job_title, 
	department, 
	office, 
	read_password, 
	write_password, 
	alternate_email_1, 
	alternate_email_2, 
	alternate_email_3
Resident
	user_group_to_usr
;

Drop table user_group_to_usr;

 

!!! Tapping into repository db is not supported. You can do it at your own risk. Make sure you take repository backup before accessing it !!!

The above is just example what is technically possible but is not recommended.

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.

View solution in original post

Highlighted
Creator
Creator

Re: Overview Users per task in NPrinting

Well, as I do not know anything about PostGres and I don't want to mess with config files (NPrinting is indeed on another server as Qlikview or Qlik Sense), I will try the 'group - spreadsheet' method  and use API to get the groups

Thank you

Highlighted

Re: Overview Users per task in NPrinting

sure - that is totally understandable approach..

good luck

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.