redirect to another page/url before the parameter window [message #988644] |
Fri, 30 November 2012 20:33  |
nari noori Messages: 33 Registered: November 2012 |
Member |
|
|
hi,
im trying to redirect to another page or url in a script (as initialize) before the report parameter is shown.
The purpose behind is if the user does not have access to this report after ive check the database, redirect the user to a standard error page.
How can i redirect. I googled and found a function that is suggested, but i cant make it too work:
var temp = new String(location.href);
location.replace("some_error_page.jsp");
Help appreciated, thanks.
[Updated on: Fri, 30 November 2012 20:34] Report message to a moderator
|
|
|
Re: redirect to another page/url before the parameter window [message #988664 is a reply to message #988644] |
Fri, 30 November 2012 22:40   |
|
You may have to do your checking external to BIRT because the parameter page runs before anything else. If you don't mind if they make it to the parameter page, you could check their user access in the beforeFactory method of the report and drop everything in the report, if they don't have access. You can then just make an error label visible, within the otherwise empty report.
Michael
Developer Evangelist, Silanis
|
|
|
Re: redirect to another page/url before the parameter window [message #988681 is a reply to message #988664] |
Sat, 01 December 2012 07:47   |
nari noori Messages: 33 Registered: November 2012 |
Member |
|
|
thanks for your reply.
my problem is that i use the birt report viewer. so putting the user-report-access validation outside would not be an good solution as the user just can access report by writing the "report url" in the browser, and go directly to birt report viewer.
Im thinking of one thing. Maybe i can custom edit one of the jsp's in the birt report viewer to do the user-report-access validaiton ? do you have any suggestion.
Its not so important to show an error message to the user, the most important thing is just not let the user see the parameters. Is there any way to crash the report before parameter page in reports ?
[Updated on: Sat, 01 December 2012 10:11] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.07499 seconds