Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » How to create report which will show only information from one record? (javascript needed)
How to create report which will show only information from one record? (javascript needed) [message #848690] Wed, 18 April 2012 09:39
Dejan Vujanic is currently offline Dejan Vujanic
Messages: 66
Registered: October 2011
Member
Within some IBM application I want to run report from specific record and for that record automatically to be shown only it's information. But I keep getting information from all records from database (I am getting the list instead of one record).
I created table with one row and there put grid with many rows and two columns:

I want it like in this form:

FIELD1: VALUE1
FIELD2: VALUE2
FIELD3: VALUE3 ....


I think that I need to create script data set with open and fetch method:

Open:

maximoDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
maximoDataSet.open();

var sqlText = new String();

sqlText = "select workorder.workorderid, workorder.wonum, workorder.description, workorder.status "
+ "from workorder"
;

maximoDataSet.setQuery(sqlText);


Fetch:
if (!maximoDataSet.fetch())
return (false);

row["workorderid"] = maximoDataSet.getString("workorderid");
row["wonum"] = maximoDataSet.getString("wonum");
row["description"] = maximoDataSet.getString("description");
row["status"] = maximoDataSet.getString("status");


return (true);

I do not know what am I doing wrong. My simple example file is attached. But as result I am getting many grids, I just want one record that runs that report. How to restrict it?

Thanks
Previous Topic:Legend entries for curve fitting lines
Next Topic:How to Debug BIRT 3.7.2
Goto Forum:
  


Current Time: Thu Jul 31 07:47:02 EDT 2014

Powered by FUDForum. Page generated in 0.03007 seconds