Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » allow for null value in parameter(Parameter null value)
allow for null value in parameter [message #1112340] Thu, 19 September 2013 13:10 Go to next message
Pamella Lowe is currently offline Pamella LoweFriend
Messages: 1
Registered: September 2013
Junior Member
Please help. I am new to Birt and I have a report with a strict dealine. I have 7 parameters. When I try to the emp_id is null then the detail portion of the report is blank. If I write a script to allow for null emp_id then when ename is null then the detail empty. How do I allow for either to be null without messing up the other parameters (any of the 7 parameters could potentially be null)

In the beforeopen script section of the detail I have:

if (params["E_ID"].value != null && params["E_ID"].value != "") {
this.queryText = this.queryText + " and EID = " + params["E_ID"].value;
}

and in the sql for the data set I have:


select
Legacy_Site
, CreatedBy
, DateCreated
, LastEditor
, DateModified
, ENAME
, EID
, Emgr
, Etype
, EmpDept
, EJPos
, Edept
, TRID
, TRName
, TRType
, TRYear
, TRDDate
, TRDur
, TRCDate
, TRStat
, TRSign

from ARCHIVE

where
LEGACY_SITE = ?
and ENAME = ?
and TRID = ?
and TRNAME = ?
and TRTYPE = ?
and TRSTAT = ?

Please help. Any advise will be greatly appreciated.
Re: allow for null value in parameter [message #1112523 is a reply to message #1112340] Thu, 19 September 2013 20:51 Go to previous message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

What error are you getting? Or is it just an empty set? What is EID's data type?

Michael

Developer Evangelist, Silanis
Previous Topic:can I access the dataset from the onCreate handler for a table cell?
Next Topic:border settings not sticking
Goto Forum:
  


Current Time: Mon Jun 17 11:44:21 GMT 2024

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

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

Back to the top