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)
Parameter for portlet
hho
I have a report. It takes one parameter. I use that report for a porlet. is there any way to change parameter for porlet?
Please advise,
Thanks
Find more posts tagged with
Comments
bhanley
Do you want to have the user supply the parameter or pass the dynamic parameter behind the scenes?
To have the user supply the parameter, you can set that up in the portlet configuration. If you point your portlet configuration to a report document that requires a parameter, it will load the parameter request screen right in the Mashboard.
Let me know a little more about exactly how you want to get the parameter value (user or behind the scenes) and we can further discuss how to best implement the solution.
hho
Hi Brian,
Thanks for your response,
Here is my case. I have a report. It takes a parameter called Department.
I want to provide a default department value for portlet and give user an option to change that value to their own department.
I set up the default value in the portlet config. I don't know what i do wrong but when I drag the portlet to canvas. It's always blank.
Here is the url for that portlet
url="executereport.do?__executableName=/MashboardContent/lacsd/FLEET EXPENSES.rptdesign&__format=html&invokesubmit=true&department=Office Engineering"
You said "If you point your portlet configuration to a report document that requires a parameter, it will load the parameter request screen right in the Mashboard." I wonder how to set parameter for BIRT report document. I see view time report parameter in e.Spreadsheet, but I cannot find that option in BIRT.
Please advice. Thanks a lot.
bhanley
Does the user you are logging into the Mashboard as have the rights on the server to both <strong class='bbc'>View AND Execute</strong> the report? These are two separate rights that need to be granted. <br />
<br />
Also, for the portlet configuration XML, what value is assigned to <strong class='bbc'><em class='bbc'>urlType</em></strong>?<br />
<br />
Thanks.
hho
Hi Brian,
Yes user has both right. For the portlet created from report that has no prameter, everything works fine.
I only have problem with the report that has parameter. I tried with my own account, iServer admin, it still does not work.
Here is my porlet config
<portlet id="SWPorlet1" title="Fleet Expenses" img="bar.gif"
imgalt="Fleet Expenses" copies="0">
<content urlType="root" scroll="false" iframe="true"
url="executereport.do?__executableName=/MashboardContent/lacsd/FLEET EXPENSES.rptdesign&__format=html&invokesubmit=true&department=Office Engineering"/>
<size width="50" height="250" />
</portlet>
Thanks
bhanley
OK, your portlet configuration looks good. Can you execute your URL outside of the mashboard? For example you should be able to paste the following in a browser and have it work:<br />
<br />
<a class='bbc_url' href='
http://localhost:8700/iportal/executereport.do?__executableName=/MashboardContent/lacsd/FLEET'>http://localhost:8700/iportal/executereport.do?__executableName=/MashboardContent/lacsd/FLEET</a>
; EXPENSES.rptdesign&__format=html&invokesubmit=true&department=Office Engineering<br />
<br />
That assumes you are running iServer on the localhost. You can modify the server name and host as needed.<br />
<br />
Also, what are you seeing in the box where the portlet should reside? Blank whitespace? An HTTP error (like 404, etc...)
bhanley
Sorry I did not see this earlier, it was not until I built you a fully-qualified link that I saw you had spaces in your report name. Try this updated portlet configuration:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<portlet id="SWPorlet1" title="Fleet Expenses" img="bar.gif" imgalt="Fleet Expenses" copies="0">
<content urlType="root" scroll="false" iframe="true"
url="executereport.do?__executableName=/MashboardContent/lacsd/FLEET%20EXPENSES.rptdesign&__format=html&invokesubmit=true&department=Office%20Engineering"/>
<size width="50" height="250" />
</portlet>
</pre>
<br />
I replaced the spaces in your Report Design name and your parameter text with "<strong class='bbc'>%20</strong>" to URLEncode the space. You could also use a plus sign.
hho
Hi Brian,
Yes, I can execute that URL, but I will display parameter page then I have to select a value for parameter and click the finish button to execute the report.
If it works the same in the portlet, that's fine for me too.
However, I always get a blank portlet no error at all. The portlet box is still displayed but there is no content inside.
Thanks
hho
Hi Brian
After change space to %20 as you suggested, my portlet works now. Thanks a lot. You made my day
I have another question. How to set up the portlet configuration so user can supply their own parameter as you mentioned in the first response?
Thanks
bhanley
All you need to do is remove the "<strong class='bbc'><em class='bbc'>invokesubmit=true</em></strong>" from your URL (see below). You can also remove the parameter from the end of the URL if you wish. Specifying the parameter WITHOUT invokesubmit=true will supply the value used as the default on the parameter request page.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<portlet id="SWPorlet1" title="Fleet Expenses" img="bar.gif" imgalt="Fleet Expenses" copies="0">
<content urlType="root" scroll="false" iframe="true"
url="executereport.do?__executableName=/MashboardContent/lacsd/FLEET%20EXPENSES.rptdesign&__format=html&department=Office%20Engineering"/>
<size width="50" height="250" />
</portlet>
</pre>
<br />
Good Luck, glad you are having success with the framework!
hho
Hi Brian,
Thanks a lot for your help. Everything is working good now.
I have been researching to find a good portlet container to develop dashboard for my company. After attented the Actuate Websimar, I found out about this framework. It is a great framework. My team and I really like it.