Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Documentation on Javascript(BIRT Javascript documentation and tutorial required)
Documentation on Javascript [message #632448] Wed, 13 October 2010 01:21 Go to next message
Chris  is currently offline Chris Friend
Messages: 47
Registered: September 2010
Member
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 12:18 Go to previous messageGo to next message
Martijn Cremer is currently offline Martijn CremerFriend
Messages: 77
Registered: January 2010
Location: Breda
Member

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


hm. I've lost a machine.. literally _lost_. it responds to ping, it works completely, I just can't figure out where in my apartment it is.
Re: Documentation on Javascript [message #632594 is a reply to message #632554] Wed, 13 October 2010 14:22 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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 23:46 Go to previous message
Chris  is currently offline Chris Friend
Messages: 47
Registered: September 2010
Member
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: Tue Apr 23 16:21:23 GMT 2024

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

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

Back to the top