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)
Refresh parameters
RegisR
Hello,
I have report with too many data if user does not fill correctly the parameters. None of these parameters are required.
So, I'd want to perform a 'count' request and if the result is too big, reopen the parameters box with a message to fill more parameters.
So, I will create a 'count' dataset with a hidden table and perform the logic in the 'onFetch', but...
Is there a way to tell BIRT to stop rendering and reopen the parameter box ?
Or do you have an idea to resolve this problem ?
Thanks !!!
Find more posts tagged with
Comments
mwilliams
Hi RegisR,
There's no way that I know of for you to stop a report once it's been started. If you had a minimum number of parameters that had to be filled out, you could drop the contents of the report and have a label that says "not enough parameters were selected", then have a link to re-run the report. Once you have run the dataSet, I think you might be too far into the report to drop items from the report, so if the amount of data was very large, it could take a long time to process to just hide the table and make the user re-run. I'll try some things and let you know if I come up with something that'll work.
RegisR
Thanks for this response.
I'll try to put the label and link for now.
I also seen that there is a 'validate' event on the report parameters, but i can't make it work and found nothing useful on google...
Do you know a little more about this ?
mwilliams
In the validate event, you can check the value that is entered for the parameter. If it's not an acceptable value, you can return "false" and an error box will pop up, I believe. This stops the running of the report.
RegisR
That's what I thought, but I tried to return false, "false", FALSE, "FALSE", 0, true etc, but each time I get the same javascript error...
Caused by: org.mozilla.javascript.EvaluatorException: invalid return (<inline>#1)
And I have another issue when I run the report. Because none of the parameters are required, the parameter box does not display... I don't understand why having choose this behavior.
Therefore, the link works and reopen the report, but the user can't choose the parameters...
Do you (or someone else) know a way to force the parameter box to appear without marking a parameter as required ?
Thanks again for you're help Michael !!!
RegisR
Forget, what I said, false without the keyword 'return' works a bit.
The validation is done, but do not redisplay the parameter box...
RegisR
I have commented some lines of the FramesetFragment.jsp of the web viewer and the parameter box now appears each time.
<%--
if ( attributeBean.isShowParameterPage( ) )
{
--%>
birtParameterDialog.__cb_bind( );
<%--
}
else
{
%>
soapURL = birtUtility.initDPI( soapURL );
navigationBar.__init_page( );
<%
}
--%>
It's a quickfix and will disable some features, but it will works fine for me. I'll investigate on the "attributeBean.isShowParameterPage( )" to find a cleaner solution to fix this.
RegisR
Got it !
The &__parameterPage=true can be added to the URL to always show the parameters. That was difficult to find...
mwilliams
Regis,
Glad you found a solution. Let us know whenever you have questions!