allow for null value in parameter [message #1112340] |
Thu, 19 September 2013 13:10 |
Pamella Lowe 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.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02672 seconds