Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » 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 13:39
Dejan Vujanic is currently offline Dejan VujanicFriend
Messages: 67
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 Apr 25 01:12:58 GMT 2024

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

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

Back to the top