Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How can i change dynamically a dataset ?
How can i change dynamically a dataset ? [message #200510] Mon, 13 November 2006 13:36 Go to next message
Eclipse UserFriend
Originally posted by: esteban27.free.fr

Hi,

I need to change dynamically (by script) the dataset binding parameter of
a table ?

Someone can help me pls ?

Stephane
Re: How can i change dynamically a dataset ? [message #200576 is a reply to message #200510] Mon, 13 November 2006 16:40 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you give more information on what you are wanting to do?
You should be able to use the expression builder on the binding tab for the
parmater to enter an expression that dynamically changes the value.

Jason

"Stephane" <esteban27@free.fr> wrote in message
news:5b786df9cde58dd085519a46b2db5c6f$1@www.eclipse.org...
> Hi,
>
> I need to change dynamically (by script) the dataset binding parameter of
> a table ?
>
> Someone can help me pls ?
>
> Stephane
>
Re: How can i change dynamically a dataset ? [message #200603 is a reply to message #200576] Mon, 13 November 2006 17:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: esteban27.free.fr

Hi Jason,
I have a table and i want to change the dataset binding to mytable,
compare to a report parameter !

So if my report parameter is true i want to bind my table to mydataset
else i want to bind my table to 'none' (i dont want to see mytable AND i
dont want to execute the dataset)!

This by script like :
if (my report parameter) {
this.setDataset("MyDataSet");
}else{
this.setDataset("NONE");
} in the oncreate event of my table

I know i can use the Visibility properties of my table with 'For specifics
outputs' but i dont want to execute the query of my dataset !

Thanks

Stephane
Re: How can i change dynamically a dataset ? [message #200611 is a reply to message #200603] Mon, 13 November 2006 20:08 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Ok you can do this one of two ways. The first is the easiest.
1 - Simply put a piece of code in the beforeFactory like this:

reportContext.getReportRunnable().designHandle.getDesignHand le().findElement( "table1").drop();

Make sure you name the table.

2 - Create a duplicate dataset that returns no rows and put code in the
beforeFactory like this:
reportContext.getReportRunnable().designHandle.getDesignHand le().findElement( "table2").setProperty("dataSet",
"Data Set1");



Jason



"Stephane" <esteban27@free.fr> wrote in message
news:befda40f86a33b983ddce7e3bdaeed58$1@www.eclipse.org...
> Hi Jason,
> I have a table and i want to change the dataset binding to mytable,
> compare to a report parameter !
>
> So if my report parameter is true i want to bind my table to mydataset
> else i want to bind my table to 'none' (i dont want to see mytable AND i
> dont want to execute the dataset)!
>
> This by script like :
> if (my report parameter) {
> this.setDataset("MyDataSet");
> }else{
> this.setDataset("NONE");
> } in the oncreate event of my table
>
> I know i can use the Visibility properties of my table with 'For specifics
> outputs' but i dont want to execute the query of my dataset !
>
> Thanks
>
> Stephane
>
Re: How can i change dynamically a dataset ? [message #200793 is a reply to message #200611] Tue, 14 November 2006 16:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: esteban27.free.fr

Thanks Jason

Ok i see, i do it :
" reportContext.getReportRunnable().designHandle.getDesignHand le().findElement( "TableSco").drop();
in the beforeFactory"

but i have this error : "getReportRunnable is not a function"

"Caused by: org.mozilla.javascript.EcmaError: TypeError: getReportRunnable
n'est pas une fonction (<inline>#2)"

I forgot something ?

Stephane
Re: How can i change dynamically a dataset ? [message #200833 is a reply to message #200793] Tue, 14 November 2006 22:15 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

What version of BIRT are you running?

Jason

"Stephane" <esteban27@free.fr> wrote in message
news:23818e0a062f5e5867edcdc8c04dad0d$1@www.eclipse.org...
> Thanks Jason
>
> Ok i see, i do it :
> " reportContext.getReportRunnable().designHandle.getDesignHand le().findElement( "TableSco").drop();
> in the beforeFactory"
>
> but i have this error : "getReportRunnable is not a function"
>
> "Caused by: org.mozilla.javascript.EcmaError: TypeError: getReportRunnable
> n'est pas une fonction (<inline>#2)"
>
> I forgot something ?
>
> Stephane
>
Re: How can i change dynamically a dataset ? [message #200924 is a reply to message #200833] Wed, 15 November 2006 08:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: esteban27.free.fr

Hi Jason

I have Birt 2.0.0

Thanks

Stephane
Re: How can i change dynamically a dataset ? [message #200993 is a reply to message #200924] Wed, 15 November 2006 17:42 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

I dont think those functions where added until Birt 2.1.1

Jason

"Stephane" <esteban27@free.fr> wrote in message
news:9b11c4372b99a051e1019e18d5727f09$1@www.eclipse.org...
> Hi Jason
>
> I have Birt 2.0.0
>
> Thanks
>
> Stephane
>
Previous Topic:Converting counters to rates
Next Topic:configurable url
Goto Forum:
  


Current Time: Mon Sep 23 16:56:13 GMT 2024

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

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

Back to the top