Scripted DataSEt Parameters : script access [message #162286] |
Thu, 18 May 2006 06:39  |
Eclipse User |
|
|
|
Hi all,
Does anyone know the syntaxe to axes a scripted dataset parameter withing
the event scripts (open, fetch, etc.) ?
Is it something like params["param1"], this.params["param1"] or something
like this ? I don't succeed in retrieving them.
Thank for any suggestion or doc link, Thomas.
|
|
|
|
|
|
|
|
|
|
|
|
Re: Scripted DataSEt Parameters : script access [message #162793 is a reply to message #162542] |
Fri, 19 May 2006 03:56   |
Eclipse User |
|
|
|
For the moment, as I am evaluating the technologie, I'm only working
within Eclipse, with scripted datasources. But the aim is to incorporate
it a web application and JDBC connection.
Let me just clear a point : my main critics are about the informations we
get (or not) : API doc, tutorials, demos. I never heard about BIRT before
it's second version, and the docs I got looks like a mess ; you hardly
know which versions are concerned, and the RC distributions contain such
appealing improvings that I cannot imagine working with previous "stable
releases".
Saying so, please note that I'm not (too much) complaining about found
around bugs. And I'm sure that the herein contributions (mine and other's)
will help detecting users needs and remaining bugs.
Once again, I'm putting many hopes on the short coming books and quick
evolving about BIRT.
Regards,
|
|
|
|
|
Re: Scripted DataSEt Parameters : script access [message #225865 is a reply to message #165806] |
Fri, 16 March 2007 09:52  |
Eclipse User |
|
|
|
Originally posted by: dberman.tamaleresearch.com
I'm confused by this thread. It's my understanding that this thread is
asking how you can access parameters passed to a scripted dataset from
within the javascript for the events for that DataSet. An example of
this would be a Master-Detail report where one dataset will have a value
in a row that will drive a nested sub-table. You can certainly do this
in BIRT:
1. Edit your dataset. Click on the Parameters tab on the left. Click
NEW to declare a new parameter. Make sure to assign a default value,
for a string use "".
2. Add your nested table (the master-detail relationship, otherwise
known as sub-table or correlated sub-query): Go to your report layout.
Add a Table for your first dataset (the Master). Inside your table
add a second detail row and drop another Table inside it. Associate the
second Table with your second (detail) dataset.
3. Define the relationship between master and detail records: Click on
the grid for your details dataset. In the property editor, select the
Binding tab. You should see that Data Set: has the name of your detail
scripted dataset selected. Click on the Dataset Parameter Binding
button. The DataSet parameter you defined in step 1 will appear. Click
on it to select it, then click the Edit button. For the value, enter
something like this: row["MasterTablePrimaryKey"] . Your nested
table is inside a parent table, so row["xxx"] will be replaced with the
value from the parent table in field xxx from the dataset associated
with the parent row.
4. Leverage the parameter in your scripted dataset:
/* In my script: */
PrimaryKeyFromParent = inputParams["NameOfDatasetParameter"];
Notice that DataSet parameters use the collection inputParams
whereas report parameters use the params set. Don't get them confused.
I beleive this does exactly what you want.
Jason Weathersby wrote:
> Thomas,
>
> I have checked RC3 and it appears they didnt make it.
> RC4 is out this week. I will update the thread if the feature is in.
>
> Jason
>
> "Thomas Escolan" <thomas_escolan@yahoo.fr> wrote in message
> news:4082532bf4993140801a62e9ef437b57$1@www.eclipse.org...
>> Hi Jason,
>>
>> I got the RC3 and wondered if you finally had an answer about this pb as
>> you said you'll follow it.
>> Thanks in advance, Thomas.
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05192 seconds