Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » redirect to another page/url before the parameter window
redirect to another page/url before the parameter window [message #988644] Fri, 30 November 2012 20:33 Go to next message
nari noori is currently offline 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 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1595
Registered: July 2009
Senior Member

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

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Re: redirect to another page/url before the parameter window [message #988681 is a reply to message #988664] Sat, 01 December 2012 07:47 Go to previous messageGo to next message
nari noori is currently offline 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

Re: redirect to another page/url before the parameter window [message #988960 is a reply to message #988681] Tue, 04 December 2012 05:14 Go to previous message
Michael Williams is currently offline Michael Williams
Messages: 1595
Registered: July 2009
Senior Member

You could probably set up another report to do the check on the user, then, redirect to the report if they're ok and to the other page, if they're not.

Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Previous Topic:Hiding Outer table based on the value in the inner table
Next Topic:collapsable row/group
Goto Forum:
  


Current Time: Tue Sep 16 15:35:18 GMT 2014

Powered by FUDForum. Page generated in 0.02473 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software