Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
read the information console name
jar
<p><span style="font-size:14px;">Hello,</span></p>
<p> </p>
<p><span style="font-size:14px;">We try to use multiple information consoles to have a different login experience for different customers. As these work on the same ihub portal we want to read the information console name (default is iportal) to filter the reports depending on which information console they are logging in from.</span></p>
<p> </p>
<p><span style="font-size:14px;">I have a variabele defined as follows:</span></p>
<p><span style="font-size:14px;"><span style="font-family:'Helvetica Neue';">reportContext.getHttpServletRequest().getContextPath();</span></span></p>
<p> </p>
<p><span style="font-size:14px;"><span style="font-family:'Helvetica Neue';">And that gives me /iportal of /test depending on which information console I use. But this is in the designer PRO</span></span></p>
<p> </p>
<p><span style="font-size:14px;"><span style="font-family:'Helvetica Neue';">As soon as I publish this report to the server i get an error :</span></span></p>
<p><span style="font-size:14px;">Execute report failed (There is an error in processing your request. Error code: 17070.).</span></p>
<p> </p>
<p><span style="font-size:14px;">This is a very common error but no details available. This is on a iHub server 3.1 version. But the same fails on Suite 16 test server we have running. </span></p>
<p> </p>
<p><span style="font-size:14px;">How can I get the context name from the server that might work on a server?</span></p>
<p> </p>
<p>Any tips are appreciated.</p>
<p> </p>
<p>Jeroen</p>
<p> </p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
Clement Wong
<p>Jeroen,</p>
<p> </p>
<p>Are the different customers on different iHub volumes, with unique names? If so, then you can use:</p>
<pre class="_prettyXprint">
reportContext.getAppContext().get("VolumeName");</pre>
<p>The context path of the Information Console will be available inside the report within the iHub during generation.</p>
<p> </p>
<p>If the volume name option does not work for you, then another option is to pass session variables from Information Console to your BIRT report, in your case, the customer ID. All you would need is just a few lines of code in a JSP. After you have authenticated the user in Info Console, you can AJAX a call to a JSP to set the variable(s), or include the code into a common page after logging in.<br><br>
In the attached sample JSP, you’ll see that the session parameter “myParam†value is set to “Hi there!â€. Then the page is redirect to a report. </p>
<pre class="_prettyXprint">
<jsp:useBean id="SessionDefaultParameterValue" scope="session" class="com.actuate.parameter.SessionLevelParameter" />
<%
SessionDefaultParameterValue.setParameterValue("myParam","Hi there!");
%></pre>
<p>Again, these two lines can be anywhere that is in a common Information Console page. You would only need it to be called once, or multiple times if you want allow it changed during the session.<br><br>
The sample report is to demonstrate that the report parameter changes based on the parameters set via <strong>SessionDefaultParameterValue</strong>. You are NOT limited to just one parameter, and you can set as many parameters as you need.<br><br>
For reference, should you ever need to change the name of SessionDefaultParameterValue, you can do this via Information Console’s web.xml. It will require a restart of the application server.<br>
</p>
<pre class="_prettyXprint">
<context-param>
<param-name>SESSION_DEFAULT_PARAMETER_VALUE_ID</param-name>
<param-value>SessionDefaultParameterValue</param-value>
</context-param>
</pre>
jar
<p>Hello Clement,</p>
<p> </p>
<p>Thank you for your suggestion and examples. </p>
<p>We finally sat down with our system engineer and got this working. My report shows a different piece of the report with different data for each client depending on the information console they are logging in from. </p>
<p> </p>
<p>Very nice ...</p>
<p> </p>
<p>But it is not working when we have the report added to a dashboard. All our client get directed after login to the __default_dashboard.dashboard in the root folder. We use a dashboard because we also offer the client a language choice from a combobox selection gadget.</p>
<p> </p>
<p>When the report is run from the folder-tree in iHub (the report itself) it is working correctly but when the report is on a dashboard it still uses the default value that is set in the report (being "default"). The parameterTest.rptdesign you added to your solution also gives the default value when used in a dashboard, and the correct value when run as a report. </p>
<p> </p>
<p>Any tips on how to resolve that?</p>
<p> </p>
<p>Kind regards,</p>
<p>Jeroen</p>
jar
<p>We tried a little more with this and it looks like the sessionDefaultParameterValue is not correctly passed with a dashboard. </p>
<p> </p>
<p>We added an alert in the dashboardcontent.jsp and it alerted us with the correct value for each information console so we know this is available when the dashboard is loaded. The report also picks the parameter set in login.jsp because when we run the report directly it is using the correct value. </p>
<p> </p>
<p>But the report on the dashboard together does not work. A we concluded that the parameter is available from an alert on the dashboardcontent.jsp it looks like a bug or we are missing something but no clue to what we are missing. </p>
<p> </p>
<p>How to proceed? We are using iHub 3.1. </p>
Clement Wong
<p>The issue you are encountering is fixed in iHub 16. The workaround in your version is to make the parameter NOT hidden.</p>
<p> </p>
<p>In my sample report, just change the design so that myParam is not a hidden parameter.</p>