mathew
31st May 2012, 11:13
Hi,

There is a 4 reports in a print session and in it i have to give 4th report access to the particular user and not to other users, so please tell me how to write script for it.


Regards,
mathew

bdittmar
31st May 2012, 12:54
Hi,

There is a 4 reports in a print session and in it i have to give 4th report access to the particular user and not to other users, so please tell me how to write script for it.

Regards,
mathew

Hello Mathew,
i've done something like this for managment reports in BIV.

E.g.:


if spool.report="r........" and logname$ = "user1" or logname$ = "user2" ..... then
rprt_send()
else
message("No rights for report !")
rprt_close()
abort()
endif


Regards

mark_h
31st May 2012, 15:55
Or if there are a lot of users you can just clone the session - not the script and the reports. Clone just the session and then delete off the new session the reports you do not want the user to have. Just a thought.

mathew
6th June 2012, 10:20
Thanks you all friends and if logname$ worked very well...........

mathew
6th June 2012, 10:22
Mark_h,

I don't understand what are you told pa.......

mark_h
6th June 2012, 17:26
Here is an example - not real, but I think it will illustrate my point. Lets say I have a capacity reporting session that provides 5 reports. The first 3 only provide remaining hours on a work order range, the last two reports not only include remaining hours, but also remaining budget hours. Now lets say a requirement was - shopfloor employees can only see hours not budget dollars. Now I could do what you all mentioned and only let shopfloor employee's run the first 3 reports using logname$ - but we have 300 shopfloor employee's. It would not be practical to do that using logname$. So what I would do is go into ttadv2100m000(Maintain Sessions). I would copy the original session(lets call it ticst9401m000) to a new session(lets call it ticst9402m000). I would not copy the script, the form or the reports. Then on ticst9402m000 I would click on the reports button - delete from the session the last two reports. Now the new session ticst9402m000 is ready for the users - uses the same script, same reports and same form. After this I go and grant the shopfloor employees access to the new session.

This would be easier than maintaining a lot of logname$ - a few users is okay. But in this case you can have shopfloor employees coming and going all the time. Easier just to grant the session to the specific users - or if using DEMs(like us) just grant it to a shopfloor role or to an all users reporting role. The session does look kind of weird with a script of ticst9401 and with reports that start with ticst9401, but you get use to it.