Skip to main content



      Home
Home » Archived » BIRT » How can i change dynamically a dataset ?
How can i change dynamically a dataset ? [message #200510] Mon, 13 November 2006 08: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 11:40 Go to previous messageGo to next message
Eclipse UserFriend
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 12: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 15:08 Go to previous messageGo to next message
Eclipse UserFriend
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 11: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 17:15 Go to previous messageGo to next message
Eclipse UserFriend
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 03: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 12:42 Go to previous message
Eclipse UserFriend
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: Wed May 07 12:19:29 EDT 2025

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

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

Back to the top