Wanted: Easy Report with JavaScript [message #531233] |
Tue, 04 May 2010 05:22  |
Eclipse User |
|
|
|
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 08:39   |
Eclipse User |
|
|
|
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 11:18   |
Eclipse User |
|
|
|
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.08180 seconds