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: 
sakthi266
Contributor III
Contributor III

Qlikview User name in Footer

Hi Team, 

               I am new to NPrinting and i am facing the issue on User name in NPrinting Footer. 

Tasks : Need to show QVuser name in NPrinting. 

Please refer below my Steps(but i am not getting what i am expected)

1. Created One variable in Qlikview (vPrepared By = 'Prepared By: ' & Subfield(OSUser(),'\',2) 

2. Value is showing as Prepared By: Sakthivel. Selvaraja 

3. Taking this variable in Nprinting Variable. 

4. If I Use this variable in Qlik Nprinting it is showing as NPAdmin(which is Nprinting Admin User)

5. But what my expectation is shown as the same above which is Prepared By: Sakthivel.Selvaraja. 

 

Will anyone help me to resolve this . It is very urgent

 

Thanks and Regards, 

Sakthivel.S

Labels (2)
1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @manojkulkarni 

It will only work if the section access is implemented and NPrinitng connection is configured to use section access.

EDIT: Also it will only work with the OnDemand report and not subscriptions from NewsStand.

cheers

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

19 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

OsUser() function returns value for OsUser who is opening QlikView when generating report. In case of NPrinting this should return service account as NPrinitng engine service account is used to open QlikView and generate from it NPrinting report. 

So what you see (the fact that you see NPAdmin which is Nprinting Admin User) is exactly how it should work. 

 

  • Why did you think you should get: "Prepared By: Sakthivel.Selvaraja"? 
  • Are you using OnDemand report generation and you thought you could pass the OsUser function from the session from which the report is triggered?
    • If that was your intent there will be no simple way of achieving it.
    • I guess the only way in that scenario could be to use section access with your app and in NPrinting but to confirm this i will need to do more testing as at the moment it is only my guess.

cheers

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,

Qlik NPrinting doesn't replace tags placed in Excel Headers and Footers. In your case the tag of the variable is replaced with the related value so I suppose you are placing it in a normal Excel cell. 

The function OSUser() in this case returns the Windows user that runs the Qlik NPrinting Services, not the user logged in. This is work as design because Qlik NPrinting opens QlikView by using that user and it is also the reason why you have an active QlikView Desktop license for that user.

You have to find a workaround. For example you can create a filter to set the value of a variable as described in  https://help.qlik.com/en-US/nprinting/May2021/Content/NPrinting/ReportsDevelopment/Static-dynamic-fi...and apply it as report filter.

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.
jyothish8807
Master II
Master II

Hi @sakthi266 ,

Since the Nprintng task is run by the Qlik services account, the OSUser () will show the service account name.

Try creating a variable in app and hard code  your name.Not sure if there is any function which will fetch the report creators name.

Set  vPrepared By = 'Sakthivel. Selvaraja ';

*************************

Try QVUser() also once.

 vPrepared By = 'Prepared By: ' & QVUser()

Best Regards,
KC
sakthi266
Contributor III
Contributor III
Author

Hi, 

       If i am using On demand then it should show my name. if Some other user opens the same application and their user have to show. i can't hard code my name. 

 

Thanks

Sakthi

sakthi266
Contributor III
Contributor III
Author

Hi Lech_Miszkiewicz, 

                  I agree. will u please some suggestion. Because i need to show the username based on the Login user instead of Nprinting Admin User

 

Regards, 

Sakthivel.S

 

Frank_S
Support
Support

I think one possibility is to use section access in your load script which limits the views of the logged in user.

  • Ensure your users are part of the section access load script (as well as the NP service account)
  • Enable the the section access check box in your NPrinting connection to the associated app
  • Insert a list box with the user name dimension into the app.
  • Reload the NP connection after making the above changes

The result is that report(s) you distribute via NPrinting should show only the user view of the app or the user 'logged in' as shown below.

Left: Domain\Administrator login view

Right: Domain\User1 login view

 

I will also attach a copy of this sample app as well.

 

Kind regards...

 

ps: for this to work on the NPrinting side you must also ensure each NP user account is mapped to an active directory account and you must also have NPrinting Windows Authentication enabled.

Please remember hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @sakthi266 

i dont have QlikView environment to test it end to end, but I may have somehow good news for you. 

I was able to achieve what you need in Qlik Sense using section access. Here are the steps:

  • I have created Qlik Sense application with section access
  • I used detached section access table from data model so it does not reduce data but it can in NPrinting impersonate a user who is currently using it.
  • Lech_Miszkiewicz_0-1632442686578.png

     

  • I connected this app in NPrinting
    • make sure to check "Apply user section access for reports"

    • Lech_Miszkiewicz_1-1632442758347.png
  • With those setting in place my OnDemand report generated OsUser () value for user who triggered report from Qlik Sense UI

@Ruggero_Piccoli & @Frank_S  - do you have a QlikView environmnet you could test that with to confirm that it would work?

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.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Again @sakthi266 

I browsed through the topic and after posting my above comments i noticed that @Frank_S provided you already with correct answer and did already the same test. 

So yes- section access is a solution and OsUser() function returns an account currently running and yes - good pickup on configuration and windows authentication, although the question is based on QlikView environmnet so who knows how does that work there?

cheers

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,

Please note that using section access with QlikView will slow down the reports creation speed so evaluate if that can be acceptable in your environment. 

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.