Skip to main content



      Home
Home » Archived » BIRT » Documentation on Javascript(BIRT Javascript documentation and tutorial required)
Documentation on Javascript [message #632448] Tue, 12 October 2010 21:21 Go to next message
Eclipse UserFriend
Hi I'm new to BIRT and need some help.
I've got to the stage where I need to add some Javascript to make my report work.
I have a group header where the text is
"Authorised By :"+dataSetRow["transauthby"]

However dataSetRow["transauthby"]=null for the first group.
What I would like to set it too is "Not Authorised" when it is null.
How can I do this?
Is there a book that explains what classes and methods are available?
Also when should you use the field from available data sets and when from data bindings.

Thanks for your help.
Re: Documentation on Javascript [message #632554 is a reply to message #632448] Wed, 13 October 2010 08:18 Go to previous messageGo to next message
Eclipse UserFriend
Chris wrote on Wed, 13 October 2010 03:21
Hi I'm new to BIRT and need some help.
I've got to the stage where I need to add some Javascript to make my report work.
I have a group header where the text is
"Authorised By :"+dataSetRow["transauthby"]

However dataSetRow["transauthby"]=null for the first group.
What I would like to set it too is "Not Authorised" when it is null.
How can I do this?
Is there a book that explains what classes and methods are available?
Also when should you use the field from available data sets and when from data bindings.

Thanks for your help.


Im more of a Java person my self but you can start here:

More about Mozilla Rhino (the Java Engine in BIRT)
https://developer.mozilla.org/en/Rhino_documentation

Then just normal JavaScript
http://wiki.eclipse.org/Global_Functions_-_Useful_JavaScript _Functions_(BIRT)

http://www.ecma-international.org/publications/files/ECMA-ST /ECMA-262.pdf

Hope it helps
Re: Documentation on Javascript [message #632594 is a reply to message #632554] Wed, 13 October 2010 10:22 Go to previous messageGo to next message
Eclipse UserFriend
Martijn,

These are good links. You should be able to do this with a script like:
if( row["ORDERNUMBER"] == 10101 ){
"Special Group";
}else{
"Normal Group " + row["ORDERNUMBER"];
}

In your case

if( row["transauthby"] == null ){
"Not Authorised";
}else{
"Authorised By " + row["transauthby"];
}

Jason

On 10/13/2010 8:18 AM, Martijn Cremer wrote:
> Chris wrote on Wed, 13 October 2010 03:21
>> Hi I'm new to BIRT and need some help.
>> I've got to the stage where I need to add some Javascript to make my
>> report work.
>> I have a group header where the text is "Authorised By
>> :"+dataSetRow["transauthby"]
>>
>> However dataSetRow["transauthby"]=null for the first group.
>> What I would like to set it too is "Not Authorised" when it is null.
>> How can I do this?
>> Is there a book that explains what classes and methods are available?
>> Also when should you use the field from available data sets and when
>> from data bindings.
>>
>> Thanks for your help.
>
>
> Im more of a Java person my self but you can start here:
>
> More about Mozilla Rhino (the Java Engine in BIRT)
> https://developer.mozilla.org/en/Rhino_documentation
>
> Then just normal JavaScript
> http://wiki.eclipse.org/Global_Functions_-_Useful_JavaScript _Functions_(BIRT)
>
>
> http://www.ecma-international.org/publications/files/ECMA-ST /ECMA-262.pdf
>
> Hope it helps
Re: Documentation on Javascript [message #640079 is a reply to message #632594] Thu, 18 November 2010 18:46 Go to previous message
Eclipse UserFriend
Thanks for your help.
I've just had your book delivered 'Integrating and extending Birt", along with "BIRT a Field guide to reporting" and "BIRT 2.6 Data Analysis and Reporting"

I've found them very helpful

thanks
Chris
Previous Topic:Dynamic Themes For The Same Report.
Next Topic:Cascading Parameters - default values
Goto Forum:
  


Current Time: Wed Jul 23 09:56:48 EDT 2025

Powered by FUDForum. Page generated in 0.35866 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top