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
How to run the report in BIRT Designer that has iHub API
Migrateduser
<p>Hi, I have the following iHub API code to retrieve the user roles in the onPrepare method.</p>
<p> </p>
<p> </p>
<p>userRoles = reportContext.getAppContext().get("ServerContext").getUserRoles();</p>
<p>reportContext.getAppContext().get("ServerContext").appendToJobStatus("The user roles: " + userRoles + "\n");</p>
<p> </p>
<p>This runs fine when the report is run in the server. However, when run in designer I get this error:</p>
<p> </p>
<p>TypeError: Cannot call method "getUserRoles" of null</p>
<p> </p>
<p>How can I change the code to check if the report is running on the designer and if so, do not make the getUserRoles() call?</p>
<p> </p>
<p>Thanks.</p>
<p>Raj</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
There are no comments yet