can birt post-process SQL data [message #793223] |
Tue, 07 February 2012 22:37 |
andrew smith Messages: 43 Registered: February 2012 |
Member |
|
|
Hi, all:
I apologize for a naive question, but can birt post-process SQL data once the data is associated with the data set?
Suppose I
1) create a data source
2) create a data set
Can BIRT take the data contained in the data set and operate on it through either Java or JavaScript, for example, calculate the standard deviation on a subset defined at a run-time?
If the answer is yes, could someone point me to some tutorials on how to invoke and implement such routines in Birt?
at this point of time I know how to generate reports when SQL query obtains all the relevant data that I need. I also know how to do events (java or javascript). but I am confused on how to use/implement java or javascript to do more comple complex calculations on a BIRT side.
thanks in advance!!
[Updated on: Wed, 08 February 2012 00:19] Report message to a moderator
|
|
|
Re: can birt process SQL data [message #793394 is a reply to message #793223] |
Wed, 08 February 2012 04:36 |
|
Generally data that needs some type of aggregation (Standard Deviation)
is done with the Aggregation element (Located on the palette under Quick
Tools). Look at the attached example. I added two aggregates one that
does a sum and another that does a standard deviation. The aggregation
element supports around 30 functions that can be used. In addition BIRT
provides an extension point if you want to create your own.
See
http://birtworld.blogspot.com/2010/10/birt-duplicate-rows.html
http://birtworld.blogspot.com/2006/09/optimistic-sums.html
for examples of implementing the extension point.
You can also add a computed column in the dataset that uses the same
aggregate functions. Look at the attached example in the data set editor.
Jason
On 2/7/2012 5:37 PM, andrew smith wrote:
> Hi, all:
>
> I apologize for a naive question, but can birt post-process SQL data
> once the data is associated with the data set?
> Suppose I 1) create a data source 2) create a data set
> Can BIRT take the data contained in the data set and operate on it
> through either Java or JavaScript, for example, calculate the standard
> deviation on a subset defined at a run-time?
>
> If the answer is yes, could someone point me to some tutorials on how to
> invoke and implement such routines in Birt?
> at this point of time I know how to generate reports when SQL query
> obtain all the relevant data that I need. I also know how to do events
> (java or javascript). but I am confused on how to use/implement java or
> javascript to do more comple complex calculations.
>
> thanks in advance!!
>
>
|
|
|
Re: can birt process SQL data [message #793397 is a reply to message #793223] |
Wed, 08 February 2012 04:36 |
|
Generally data that needs some type of aggregation (Standard Deviation)
is done with the Aggregation element (Located on the palette under Quick
Tools). Look at the attached example. I added two aggregates one that
does a sum and another that does a standard deviation. The aggregation
element supports around 30 functions that can be used. In addition BIRT
provides an extension point if you want to create your own.
See
http://birtworld.blogspot.com/2010/10/birt-duplicate-rows.html
http://birtworld.blogspot.com/2006/09/optimistic-sums.html
for examples of implementing the extension point.
You can also add a computed column in the dataset that uses the same
aggregate functions. Look at the attached example in the data set editor.
Jason
On 2/7/2012 5:37 PM, andrew smith wrote:
> Hi, all:
>
> I apologize for a naive question, but can birt post-process SQL data
> once the data is associated with the data set?
> Suppose I 1) create a data source 2) create a data set
> Can BIRT take the data contained in the data set and operate on it
> through either Java or JavaScript, for example, calculate the standard
> deviation on a subset defined at a run-time?
>
> If the answer is yes, could someone point me to some tutorials on how to
> invoke and implement such routines in Birt?
> at this point of time I know how to generate reports when SQL query
> obtain all the relevant data that I need. I also know how to do events
> (java or javascript). but I am confused on how to use/implement java or
> javascript to do more comple complex calculations.
>
> thanks in advance!!
>
>
|
|
|
Re: can birt process SQL data [message #793400 is a reply to message #793223] |
Wed, 08 February 2012 04:36 |
|
Generally data that needs some type of aggregation (Standard Deviation)
is done with the Aggregation element (Located on the palette under Quick
Tools). Look at the attached example. I added two aggregates one that
does a sum and another that does a standard deviation. The aggregation
element supports around 30 functions that can be used. In addition BIRT
provides an extension point if you want to create your own.
See
http://birtworld.blogspot.com/2010/10/birt-duplicate-rows.html
http://birtworld.blogspot.com/2006/09/optimistic-sums.html
for examples of implementing the extension point.
You can also add a computed column in the dataset that uses the same
aggregate functions. Look at the attached example in the data set editor.
Jason
On 2/7/2012 5:37 PM, andrew smith wrote:
> Hi, all:
>
> I apologize for a naive question, but can birt post-process SQL data
> once the data is associated with the data set?
> Suppose I 1) create a data source 2) create a data set
> Can BIRT take the data contained in the data set and operate on it
> through either Java or JavaScript, for example, calculate the standard
> deviation on a subset defined at a run-time?
>
> If the answer is yes, could someone point me to some tutorials on how to
> invoke and implement such routines in Birt?
> at this point of time I know how to generate reports when SQL query
> obtain all the relevant data that I need. I also know how to do events
> (java or javascript). but I am confused on how to use/implement java or
> javascript to do more comple complex calculations.
>
> thanks in advance!!
>
>
|
|
|
Re: can birt process SQL data [message #793403 is a reply to message #793223] |
Wed, 08 February 2012 04:36 |
|
Generally data that needs some type of aggregation (Standard Deviation)
is done with the Aggregation element (Located on the palette under Quick
Tools). Look at the attached example. I added two aggregates one that
does a sum and another that does a standard deviation. The aggregation
element supports around 30 functions that can be used. In addition BIRT
provides an extension point if you want to create your own.
See
http://birtworld.blogspot.com/2010/10/birt-duplicate-rows.html
http://birtworld.blogspot.com/2006/09/optimistic-sums.html
for examples of implementing the extension point.
You can also add a computed column in the dataset that uses the same
aggregate functions. Look at the attached example in the data set editor.
Jason
On 2/7/2012 5:37 PM, andrew smith wrote:
> Hi, all:
>
> I apologize for a naive question, but can birt post-process SQL data
> once the data is associated with the data set?
> Suppose I 1) create a data source 2) create a data set
> Can BIRT take the data contained in the data set and operate on it
> through either Java or JavaScript, for example, calculate the standard
> deviation on a subset defined at a run-time?
>
> If the answer is yes, could someone point me to some tutorials on how to
> invoke and implement such routines in Birt?
> at this point of time I know how to generate reports when SQL query
> obtain all the relevant data that I need. I also know how to do events
> (java or javascript). but I am confused on how to use/implement java or
> javascript to do more comple complex calculations.
>
> thanks in advance!!
>
>
|
|
|
Re: can birt process SQL data [message #793407 is a reply to message #793223] |
Wed, 08 February 2012 04:36 |
|
Generally data that needs some type of aggregation (Standard Deviation)
is done with the Aggregation element (Located on the palette under Quick
Tools). Look at the attached example. I added two aggregates one that
does a sum and another that does a standard deviation. The aggregation
element supports around 30 functions that can be used. In addition BIRT
provides an extension point if you want to create your own.
See
http://birtworld.blogspot.com/2010/10/birt-duplicate-rows.html
http://birtworld.blogspot.com/2006/09/optimistic-sums.html
for examples of implementing the extension point.
You can also add a computed column in the dataset that uses the same
aggregate functions. Look at the attached example in the data set editor.
Jason
On 2/7/2012 5:37 PM, andrew smith wrote:
> Hi, all:
>
> I apologize for a naive question, but can birt post-process SQL data
> once the data is associated with the data set?
> Suppose I 1) create a data source 2) create a data set
> Can BIRT take the data contained in the data set and operate on it
> through either Java or JavaScript, for example, calculate the standard
> deviation on a subset defined at a run-time?
>
> If the answer is yes, could someone point me to some tutorials on how to
> invoke and implement such routines in Birt?
> at this point of time I know how to generate reports when SQL query
> obtain all the relevant data that I need. I also know how to do events
> (java or javascript). but I am confused on how to use/implement java or
> javascript to do more comple complex calculations.
>
> thanks in advance!!
>
>
|
|
|
|
Re: can birt process SQL data [message #795544 is a reply to message #795152] |
Fri, 10 February 2012 15:44 |
|
Andrew
With any aggregate I can always delete the detail row and put an
aggregate in the table footer, which would not show the detail data but
only the results of an aggregate. While it is very easy to call Java
from BIRT expressions this seems like a great place to use the aggregate
extension point. This will allow you to reuse the aggregate across
designers and reports. It also allows you to use the default data
sources without having to write any script. If you can explain how you
calculate VaR I can help with the implementation.
Jason
On 2/10/2012 1:03 AM, andrew smith wrote:
> Jason,
> Many thanks for a great example!! I really appreciate the time you took
> to demonstrate the functionality of the aggregation function in the
> report and how to implement it.
>
> Just one more question...
>
> Suppose I want to calculate something like VaR (value at risk) and
> display it without displaying the original data. For example, I want to
> display something like this: VaR = 15. Obviously, number 15 would be a
> result many calculations on the original data. Will the expression
> builder be a sufficient medium to perform the calculations?
> At this point of time, I am thinking on writing a Java class that pulls
> the data from the SQL, then does all of the calculations and then
> supplies the results as a scripted source in the .initiate portion of
> the report. But I am not sure if this is be the best way to tackle this
> problem.
> What do you think the best approach for this problem is?
>
> Thanks in advance,
> Andrew
>
|
|
|
Powered by
FUDForum. Page generated in 0.03318 seconds