Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Parameter validation fails
Parameter validation fails [message #1697131] Mon, 01 June 2015 20:18 Go to next message
RIcky Mercado is currently offline RIcky MercadoFriend
Messages: 3
Registered: June 2015
Junior Member
Hello,

I have two parameters for a starting and end date in my report (RP_startDate & RP_endDate respectively).

I was able to get my report to run last week but for some reason now when I run it, I get an error stating that the validation for my endDate parameter is not working. Here is the validation script I used for the endDate:

// script to validate end date parameter
if (BirtComp.greaterThan(params["RP_endingDate"].value, BirtDateTime.today()) == true) //check for future date
{
	params["RP_endingDate"].value = BirtDateTime.today();
	true;
}

else if (BirtComp.lessThan(params["RP_endingDate"].value, params["RP_startingDate"].value) == true) //check to make sure end not before start
{
	params["RP_endingDate"].value = BirtDateTime.today();
	true;
}


I'm not sure why it's not working now as I have not changed anything script or data source. The query I'm using to generate the data set is a simple select:

select *
from isf.dts_header
where defecttypename = ?

I have a filter on a CREATED field that limits the results to the date range the user enters (formatted as MM/dd/yy). I tested this several times with different inputs (correct format, incorrect format, future date, etc...) and the validation was working before.

Thanks to anyoune looking at this.
Re: Parameter validation fails [message #1697678 is a reply to message #1697131] Fri, 05 June 2015 21:12 Go to previous messageGo to next message
Jesse Freeman is currently offline Jesse FreemanFriend
Messages: 184
Registered: January 2015
Senior Member
What is the error you are receiving?
Have there been any changes made to your environment?
Re: Parameter validation fails [message #1697836 is a reply to message #1697678] Mon, 08 June 2015 19:10 Go to previous messageGo to next message
RIcky Mercado is currently offline RIcky MercadoFriend
Messages: 3
Registered: June 2015
Junior Member
There have been no changes to my environment. This is the error I get:
org.eclipse.birt.report.service.api.ReportServiceException: The validation for parameter "RP_endingDate" fails.

And here is the validation I used for the above parameter:
//Parameter validation for end date
if (params["RP_endingDate"].value > BirtDateTime.today())
{
	params["RP_endingDate"].value = BirtDateTime.today();
	true;
}


As mentioned before, this worked initially when I created the parameter. I can get this to work if I delete the parameter and recreate it. Still unsure why it breaks in the first place.
Re: Parameter validation fails [message #1698784 is a reply to message #1697836] Wed, 17 June 2015 21:27 Go to previous message
Jesse Freeman is currently offline Jesse FreemanFriend
Messages: 184
Registered: January 2015
Senior Member
If you can reproduce the again, you should add some debugging statements to the validation to log out the value coming from the parameter and results of the logic you are performing.

That information may shed some light into what is causing the validation to fail.
Then with knowing what is causing it we can see about figuring out why it is happening.
Previous Topic:Report Issues with intigration on web application
Next Topic:Passing multiple parameter values to a BIRT report
Goto Forum:
  


Current Time: Fri Apr 19 22:49:31 GMT 2024

Powered by FUDForum. Page generated in 0.03193 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top