|
Re: Wanted: Easy Report with JavaScript [message #531336 is a reply to message #531233] |
Tue, 04 May 2010 14:39 |
|
Juliane,
There is an extension point for this. Take a look at this blogpost:
http://birtworld.blogspot.com/2008/09/birt-231-adding-functi ons-to-expression.html
but use this example
http://www.birt-exchange.org/devshare/designing-birt-reports /1101-example-plugin-for-expression-builder/#description
Jason
On 5/4/2010 5:22 AM, Juliane Harbarth wrote:
>
>
> Good morning,
>
> I understood that BIRT's features can be enhanced by embedding
> JavaScript snipplets and I have seen some kind of evidence for this when
> using the Expression Builder that offers some JavaScript functions. I'd
> like to explorer these facilities but feel somehow inadequate.
>
> Can somebody provide me with (or point me to) a preferrably simple
> report that uses JavaScript so that I can understand both, how this is
> embedded, and for which occasion one would do so. I am currently running
> BIRT 232.
>
> Thanks & regards,
> Juliane.
>
>
>
|
|
|
|
Re: Wanted: Easy Report with JavaScript [message #632559 is a reply to message #531915] |
Wed, 13 October 2010 12:39 |
Juliane Harbarth Messages: 21 Registered: July 2009 |
Junior Member |
|
|
Good afternoon,
I assumed that adding more JavaScript functions than offered in the Expression Builder requires an extension, but those functions already offered in the Expression Builder would be executable without further add-ons.
I have just tried with Eclipse IDE for Java and Report Developers, Version: Helios Service Release 1, Build id: 20100917-0705 and either I am doing something terribly wrong or my above assumption is not correct.
What I have done is selecting concat() from the list of functions and previewed the report and it gives me the following error:
The following items have errors:
Grid (id = 8):
+ A BIRT exception occurred: Error evaluating Javascript expression. Script engine error: ReferenceError: "concat" is not defined.
Script source: , line: 0, text:
"Result: " + concat(params["TextParameter"].value,"test"). See next exception for more information.
Error evaluating Javascript expression. Script engine error: ReferenceError: "concat" is not defined.
Script source: , line: 0, text:
"Result: " + concat(params["TextParameter"].value,"test")
Please advise, thanks a lot & have a nice day,
Juliane.
|
|
|
Re: Wanted: Easy Report with JavaScript [message #632612 is a reply to message #632559] |
Wed, 13 October 2010 15:18 |
|
You need to call it on the string like:
params["NewParameter"].concat("jjj")
Jason
On 10/13/2010 8:39 AM, Juliane Harbarth wrote:
> Good afternoon,
>
> I assumed that adding more JavaScript functions than offered in the
> Expression Builder requires an extension, but those functions already
> offered in the Expression Builder would be executable without further
> add-ons.
> I have just tried with Eclipse IDE for Java and Report Developers,
> Version: Helios Service Release 1, Build id: 20100917-0705 and either I
> am doing something terribly wrong or my above assumption is not correct.
>
> What I have done is selecting concat() from the list of functions and
> previewed the report and it gives me the following error:
>
> The following items have errors:
>
> Grid (id = 8): + A BIRT exception occurred: Error evaluating Javascript
> expression. Script engine error: ReferenceError: "concat" is not defined.
> Script source: , line: 0, text:
> "Result: " + concat(params["TextParameter"].value,"test"). See next
> exception for more information.
> Error evaluating Javascript expression. Script engine error:
> ReferenceError: "concat" is not defined.
> Script source: , line: 0, text:
> "Result: " + concat(params["TextParameter"].value,"test")
> Please advise, thanks a lot & have a nice day,
> Juliane.
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02017 seconds