Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is it possible to have the osuser() from the Nprinting GUI application passed in a variable to the end Nprinting app??
How? I cannot get it working...
Regards,
Anders
What do you want to do with it? Do you want to print it on the report or possibly use it to define user preferences or is it a security / audit thing?
If you want to print it on the report, can you create a variable in your QV app to pass that information.
Try this link. I was able to create a text box in my app with the =OSUser() function.
I have not tried this, but you should be able to create a variable that you can add to your Nprinting template.
Hi Mike,
Thanks again for your input... 🙂
No, it is not for security / auditing purposes.. I believe that the customer wants to have the name on if the person wants to make a hard copy of the report.. So that everyone can see the name on the paper...
Anyway... I tried with the OSuser().. First I tried creating a variable :
vNprinting that had the : =osuser() function ... That works in the GUI, but the Nprinting app, shows the Nprinting service account user instead of the user that acutally initiated the print...
Do you have another suggestion ?
Regards,
Anders
That would make logical sense, because when you are using On-Demand, it is your Nprinting User that is actually opening and using the qvw in the Service. Since you are doing this On-Demand, you could make your user select their name from a list box which would then go to a printable field in your Nprinting Template. That would not be as automated, but it would get the job done. Depending on your number of users, you could create a small inline table in your script. NPUSERS is your list box field that you would add to your template.
[Nprinting Report Users]:
LOAD
*
Inline
[
NPUSERS
TomSmith
MaryJones
BillWood
];
Try that to see if it will work for you or use another existing field that you already have that would identify the user.
Anders,
Did you get this to work ? I have the similair problem where I need the userid on the person who has submitted the report and not the serviceaccount ?
/Frank
Hi Frank,
No, unfortunately not.. I did not spend much more time on this... But you can do as Mike suggested..
Regards,
Anders