Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Re: Dynamic Parameter with Scripted Data Set
Re: Dynamic Parameter with Scripted Data Set [message #730538] Wed, 28 September 2011 15:15 Go to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

What does your fetch script look like.

Jason

On 9/28/2011 11:13 AM, Krzysiek wrote:
> Here are screenshots as attachments
Re: Dynamic Parameter with Scripted Data Set [message #730789 is a reply to message #730538] Thu, 29 September 2011 07:37 Go to previous messageGo to next message
Krzysiek  is currently offline Krzysiek Friend
Messages: 9
Registered: August 2010
Junior Member
This is "open" script
maximoDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
maximoDataSet.open();
var sqlText = new String();
sqlText = "select enddescription from asset where enddescription is not NULL";
maximoDataSet.setQuery(sqlText);
i = 1;

and here is "fetch"
if (!maximoDataSet.fetch()) {
	return (false);
}
row["streetname"] = maximoDataSet.getString("enddescription");
row["count"] = i++;
return (true);
Re: Dynamic Parameter with Scripted Data Set [message #730940 is a reply to message #730789] Thu, 29 September 2011 14:56 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

My guess is that you are getting an error in the fetch. Try

if( typeof maximoDataSet == 'undefined')return false;
if( maximoDataSet == null)return false;

if (!maximoDataSet.fetch()) {
return (false);
}

You can also just add a file writer and write out variables to a local
file to see what is happening.

importPackage( Packages.java.io );
out = new PrintWriter( new FileWriter( "c:/temp/sdsevents.txt", true ) );
out.println( "maximoDataSet Size " + maximoDataSet.size());
out.close();


Jason


On 9/29/2011 3:37 AM, Krzysiek wrote:
> This is "open" script
>
> maximoDataSet =
> MXReportDataSetProvider.create(this.getDataSource().getName(),
> this.getName());
> maximoDataSet.open();
> var sqlText = new String();
> sqlText = "select enddescription from asset where enddescription is not
> NULL";
> maximoDataSet.setQuery(sqlText);
> i = 1;
>
> and here is "fetch"
>
> if (!maximoDataSet.fetch()) {
> return (false);
> }
> row["streetname"] = maximoDataSet.getString("enddescription");
> row["count"] = i++;
> return (true);
>
Previous Topic:Get the Sundays ( dates) from a date range
Next Topic:DateTime Chart
Goto Forum:
  


Current Time: Fri Apr 19 18:20:03 GMT 2024

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

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

Back to the top