Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
executing script-code on early event to abort report and reuse of code
Migrateduser
Hi,
i want to achieve this:
- create report template with scriptcode that fires on a event. F.ex. on Master Page->onPageStart() . As all reports i create will be from this template (achieve re-use)
- in the scriptcode retrieve a accesscode as request-parameter/context <-- this i have achieved.
- in the scriptcode do a sql-query (f.ex.: select hasAccess from usertable where usertable.username=<username-parameter>) (my sql will be better, its just an example)
then have the scriptcode:
if(hasAccess==true)
//do nothing, carry on processing report
else
//abort running report (as the user does not have access)
my question are:
- how can i abort/cancel an report programmatically in a script-event?
- in which script-event should i do the sql-query ? (it should be earliest possible).
- what is the best way to achieve the reuse of this code. Create an template or is it for example possible to create a super-report that all my reports can easily extend ?
the cons of using a template is, if i decide to change the template-code, then i have to change this in every report i have earlier made with this template. Using a super-report or similar approach will just have all the code in one place ? What do you think?
Find more posts tagged with
Comments
There are no comments yet