Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to use same data field as two report parametrs in BIRT
How to use same data field as two report parametrs in BIRT [message #1415668] Wed, 03 September 2014 10:11 Go to next message
Vijayalakshmi laxman is currently offline Vijayalakshmi laxmanFriend
Messages: 21
Registered: June 2014
Junior Member
I have a field ACTSTART from WORKORDER table which will be used as report parameter in BIRT in order to display list of work orders between the actual start date entered by user. I have developed the report but the issue is that when I choose date in ACTUAL START FROM and tab out it gets refreshed by the value chosen in ACTUAL START TO , I am not sure if this requires some different logic.

if( BirtComp.notEqual(params["actstart"], null) ) {
wotrack_where += " and a.actstart >= "
+ MXReportSqlFormat.getStartDayTimestampFunction(params["actstart"]);
}

if( BirtComp.notEqual(params["actstart1"], null) ) {
wotrack_where += " and a.actstart <= "
+ MXReportSqlFormat.getEndDayTimestampFunction(params["actstart1"]);
}

Thanks in Advance!
Re: How to use same data field as two report parametrs in BIRT [message #1415882 is a reply to message #1415668] Wed, 03 September 2014 22:22 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

You might need to do your logic a bit different. Like:

if(BirtComp.notEqual(params["actstart"], null) && BirtComp.notEqual(params["actstart1"], null) ){
      wotrack_where += " and a.actstart between "
+ MXReportSqlFormat.getStartDayTimestampFunction(params["actstart"]) + " and " + MXReportSqlFormat.getEndDayTimestampFunction(params["actstart1"]);
}
else if( BirtComp.notEqual(params["actstart"], null) ) {
wotrack_where += " and a.actstart >= "
+ MXReportSqlFormat.getStartDayTimestampFunction(params["actstart"]);
}
else( BirtComp.notEqual(params["actstart1"], null) ) {
wotrack_where += " and a.actstart <= "
+ MXReportSqlFormat.getEndDayTimestampFunction(params["actstart1"]);
}


Or something like that. This is just a guess that having your where as it is with a.actstart limited twice is causing the issue. Let me know.


Michael

Developer Evangelist, Silanis
Previous Topic:Null Value in PDF preview
Next Topic:How to sum values for few rows in BIRT
Goto Forum:
  


Current Time: Fri Apr 26 09:55:04 GMT 2024

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

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

Back to the top