Home » Archived » BIRT » Birt Parameter Error(Cannot read property "length" from null)
Birt Parameter Error [message #1126962] |
Sun, 06 October 2013 05:14  |
Praba Krishna Messages: 2 Registered: October 2013 |
Junior Member |
|
|
Hi friends,
I needed to create a set of parameters on a BIRT report that allowed the user to select
from a list of items. The selection had to allow for just a single item to be selected, or for a range or multiple, non-contiguous ranges or items to be selected.
Plus I wanted to allow the user to click a single check box to select all items if
required.
But when I try to run this report I get this error.
A BIRT exception occurred.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:2.3.2.r232_v20090211
Error Code:data.engine.BirtException
Error Message:A BIRT exception occurred: There are errors evaluating script "__bm_beforeOpen()":
TypeError: Cannot read property "length" from null (<inline>#8).. See next exception for more information.
There are errors evaluating script "__bm_beforeOpen()":
TypeError: Cannot read property "length" from null (<inline>#8).
Please assist..
My First DataSet
**************************************************
sqlText = with rasheem as(
select invbalances.curbal curbal, issuetype ,matusetrans.itemnum itemnum,matusetransid ,
description ,CONVERT(date,transdate ) as transdate,transdate act_transdate
,storeloc ,refwo ,matusetrans.binnum binnum,quantity ,p1.displayname enterby,
memo ,p2.displayname issueto
from matusetrans
join invbalances on matusetrans.itemnum =invbalances.itemnum
join person p1 on matusetrans.enterby=p1.personid
join person p2 on matusetrans.issueto =p2.personid )
select itemnum, matusetransid
from rasheem
**************************************************
and fetch
***************************************************
row["itemnum"] = maximoDataSet.getString("itemnum");
row["matusetransid"] = maximoDataSet.getInteger("matusetransid");
return (true);
******************************************************
My Second Data Set
******************************************************
sqlText = with mokkai as(
select invbalances.curbal curbal, issuetype ,matusetrans.itemnum itemnum, matusetransid,
description ,CONVERT(date,transdate ) as transdate,storeloc ,refwo ,matusetrans.binnum binnum,quantity ,p1.displayname enterby,
memo ,p2.displayname issueto
from matusetrans
join invbalances on matusetrans.itemnum =invbalances.itemnum
join person p1 on matusetrans.enterby=p1.personid
join person p2 on matusetrans.issueto =p2.personid
where issuetype ='issue' and enterby in('oommenj'))
select curbal, issuetype , itemnum, matusetransid,
description ,transdate,storeloc ,refwo ,binnum,quantity , enterby,
memo ,issueto from mokkai where transdate > = '08/22/13'
and transdate < = '08/22/13'
**********************************************************
and fetch
***********************************************************
row["curbal"] = maximoDataSet.getDouble("curbal");
row["issuetype"] = maximoDataSet.getString("issuetype");
row["itemnum"] = maximoDataSet.getString("itemnum");
row["description"] = maximoDataSet.getString("description");
row["storeloc"] = maximoDataSet.getString("storeloc");
row["refwo"] = maximoDataSet.getString("refwo");
row["binnum"] = maximoDataSet.getString("binnum");
row["quantity1"] = maximoDataSet.getString("quantity");
row["transdate1"] = maximoDataSet.getDate("transdate");
row["enterby"] = maximoDataSet.getString("enterby");
row["memo1"] = maximoDataSet.getString("memo");
row["issueto1"] = maximoDataSet.getString("issueto");
row["matusetransid"] = maximoDataSet.getString("matusetransid");
return (true);
****************************************************************
on the second data set on beforeOpen event I've created this
//Get the report parameters
ParamItem = reportContext.getParameterValue("Item");
ParamAllItems = reportContext.getParameterValue("AllItems");
//Generate comma seperated list of customers
ItemList ="";
i = 0
for
(i; i<ParamItem.length; i++)
{
ItemList += ParamItem[i] +","
};
//Remove final comma
ItemList=ItemList.substring(0,ItemList.length-1);
//If all customers was not selected then add the customer list to the query
if
(ParamAllItems==false)
{
this.queryText +=" WHERE matusetransid IN ("+ ItemList +")" ;
}
**************************************************************
When I try to execute it I get this error..
A BIRT exception occurred.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:2.3.2.r232_v20090211
Error Code:data.engine.BirtException
Error Message:A BIRT exception occurred: There are errors evaluating script "__bm_beforeOpen()":
TypeError: Cannot read property "length" from null (<inline>#8).. See next exception for more information.
There are errors evaluating script "__bm_beforeOpen()":
TypeError: Cannot read property "length" from null (<inline>#8).
********************************************************************
All your assistance will be highly appreciated.
|
|
| |
Goto Forum:
Current Time: Wed Jun 07 10:13:37 GMT 2023
Powered by FUDForum. Page generated in 0.01875 seconds
|