|
Re: How can i change dynamically a dataset ? [message #200576 is a reply to message #200510] |
Mon, 13 November 2006 16:40 |
|
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 |
Eclipse User |
|
|
|
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 |
|
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 |
Eclipse User |
|
|
|
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 |
|
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
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03708 seconds