Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Scripting error: report parameter validate method
shruti
Hi,
I am trying to validate a String but unable to show the parameter page again in case of invalid input. The validate code of the parameter is given below:
if(params["LoanNumber"].value!= null)
{
var word_length = params["LoanNumber"].value.split(",");
var word_count = word_length.length;
if(word_count>25)
{
false;
}
else
{
true;
}
}
The requirement is:
In case the user enters more than 25 loan numbers he should get a message and the parameter page should appear again.
Does anyone know how to do that in BIRT?
Regards,
Shruti
Find more posts tagged with
Comments
mwilliams
Hi Shruti,<br />
<br />
Your best bet may be to create your own parameter page. This way you can do your own validation there and handle any invalid inputs however you would like. You can see the following devShare post for more information on creating your own parameter page.<br />
<br />
<a class='bbc_url' href='
http://www.birt-exchange.org/devshare/deploying-birt-reports/298-2-2-birt-tag-library/#description'>2.2
BIRT Tag Library - Tips & Tricks - BIRT Exchange</a><br />
<br />
Hope this helps.
shruti
Thanks for your response Michael.
I have created a custom parameter page as you suggested but after submitting the page to generate report, it prompts the default parameter page again. I tried the solutions given in the link provided by you but unable to run the report. Could you please suggest what i am missing here.
Thanks.
mwilliams
Shruti,
So, after you click submit on your custom parameter page, the default parameter screen pops up?
shruti
Michael,
Yes. My custom parameter page comes and on clicking Submit i get the default parameter page again and my paramater values selected in Custom page are overridden by the default parameter page values.
Regards,
Shruti
mwilliams
Shruti,
Try adding the URL parameter __parameterpage=false to your report URL.
shruti
Michael,
I tried to add the __parameterpage=false but unable to do so.. Can you please tell me the steps to implement this as I am new to BIRT. Also how can i link the custom parameter page to report?
Thanks.
shruti
Any suggestions??
Thanks.
mwilliams
Shruti,
If you click on the link I sent earlier and read the comments below the instruction on creating a custom parameter page, you'll find an answer for your issue.
shruti
Thanks Michael,
I am able to remove the default parameter page now... but facing issue with Javascript errors in beforeOpen method.
My requirement is to generate dynamic query based on the inputs provided in the Custom JSP page. The params["parameter1"].value is always null even though i pass data in the jsp.
Is there something that i am missing.
My dataset does not have parameters. Only report parameter exist.
Regards,
shruti