Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Correct way to specify rowFetchSize(need to call JDBC Statement.setFetchSize)
Correct way to specify rowFetchSize [message #664731] Mon, 11 April 2011 17:57 Go to next message
John Liptak is currently offline John LiptakFriend
Messages: 4
Registered: April 2011
Junior Member
In org.eclipse.birt.report.data.oda.jdbc.Statement.setProperty( ) there is an if/then/else clause that will set the JDBC fetch size (not the fetch limit).

I can't figure out how to call the property correctly.

If I add the following properties to my data set:
...
            <property name="queryTimeOut">75</property>
            <property name="rowFetchSize">234</property>
        </oda-data-set>


and set the debugger to break when setProperty is called, the breakpoint is het for the queryTimeOut property but not for rowFetchSize. If I modify the property name in the debugger, I get exactlly the behavior I'm looking for.
Re: Correct way to specify rowFetchSize [message #664851 is a reply to message #664731] Tue, 12 April 2011 09:29 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

In the debugger what did you change it to? You can always use a
beforeOpen script on the dataset and set a property like:

this.setExtensionProperty("propertyname","propvalue");

Jason

On 4/11/2011 1:57 PM, john.h.liptak@gmail.com wrote:
> In org.eclipse.birt.report.data.oda.jdbc.Statement.setProperty( ) there
> is an if/then/else clause that will set the JDBC fetch size (not the
> fetch limit).
>
> I can't figure out how to call the property correctly.
>
> If I add the following properties to my data set:
>
> ...
> <property name="queryTimeOut">75</property>
> <property name="rowFetchSize">234</property>
> </oda-data-set>
>
>
> and set the debugger to break when setProperty is called, the breakpoint
> is het for the queryTimeOut property but not for rowFetchSize. If I
> modify the property name in the debugger, I get exactlly the behavior
> I'm looking for.
Re: Correct way to specify rowFetchSize [message #664910] Tue, 12 April 2011 13:24 Go to previous messageGo to next message
John Liptak is currently offline John LiptakFriend
Messages: 4
Registered: April 2011
Junior Member
In the debugger, I changed the name of the property "queryTimeOut" (which is getting set) to "rowFetchSize" (which is not getting called). This had the result I was looking for. So in my example, the fetch size would become 75.

I'm pretty sure I tried all of the combinations of script settings for the property but I will double check your recommendation again.
Re: Correct way to specify rowFetchSize [message #664920 is a reply to message #664910] Tue, 12 April 2011 13:52 Go to previous messageGo to next message
John Liptak is currently offline John LiptakFriend
Messages: 4
Registered: April 2011
Junior Member
this.setExtensionProperty("rowFetchSize", "234");

works great. I was following the answer at http://stackoverflow.com/questions/4608869/birt-jdbc-dataset -dynamic-max-row-fetch and was setting the context which was not working.
Re: Correct way to specify rowFetchSize [message #665017 is a reply to message #664731] Tue, 12 April 2011 20:23 Go to previous message
John Liptak is currently offline John LiptakFriend
Messages: 4
Registered: April 2011
Junior Member
As you see below, the issue is that it seems through JavaScript you may set the rowFetchSize on the instance of the report, not in the report definition.

That didn't seem right to me, so I did a little more debugging and I determined that there is a possible conflict between the DataSet definition in org.eclipse.birt.report.data.oda.jdbc_2.6.2.r262_v20110127 which has the rowFetchSize and in org.eclipse.birt.report.data.oda.sampledb_2.6.2.r262_v201101 27 which does not have rowFetchSize defined (plugin.xml and plugin.properties).

So it seems the two plugin configurations were setting things to the lowest common denominator. Since I don't use the sampledb I had the choice of totally removing it or messing with it to see if my conclusion was correct.

I added the new parameter to the sampledb plugin and "poof" specifying the parameter directly in the data set worked.

The takeaway, having multiple ODA implementations in your view can cause unexpected behavior.

Thanks to Jason for all of the help.
Previous Topic:The viewing session is not available or has expired
Next Topic:help: postgresql function Can't load the report query
Goto Forum:
  


Current Time: Tue Apr 23 16:43:29 GMT 2024

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

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

Back to the top