Précédent   Forum des professionnels en informatique > Logiciels > Solutions d'entreprise > Business Intelligence > BIRT
BIRT Forum d'entraide sur BIRT (Business Intelligence and Reporting Tools). Avant de poster --> FAQ BIRT,Tutoriels BIRT
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 10/12/2007, 12h42   #1
Invité de passage
 
Inscription : novembre 2007
Messages : 2
Détails du profil
Informations forums :
Inscription : novembre 2007
Messages : 2
Points : 0
Points : 0
Par défaut [2.2.1] Javascript & Birt How To ?

Bonjour,
j'aimerai bien utiliser de fontions javascript dans mon rapport birt, mais malheuresement je n'arrive pas, exemple:

Code :
1
2
3
4
 
importPackage(Packages.java.lang);	
var contextName= window.document.location.pathname;
System.out.println("contextName :"+contextName);
mailgam est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/12/2007, 11h07   #2
Membre Expert
 
Avatar de lazarel
 
Homme
Consultant informatique
Inscription : mai 2007
Messages : 893
Détails du profil
Informations personnelles :
Sexe : Homme
Âge : 30
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations professionnelles :
Activité : Consultant informatique
Secteur : Aéronautique - Marine - Espace - Armement

Informations forums :
Inscription : mai 2007
Messages : 893
Points : 1 360
Points : 1 360
Bonjour,

Tu veux utiliser du javascript au niveau d'un rapport texte ou un graphique. Dans le second cas, il possible en théorie d'associer 7 actions distinctes selon 13 événènement de type javascript (HTML) pour chaque graphe selon sa légende, son titre, les séries associées et les axes X,Y et Z.

Cordialement Lazarel
lazarel est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 11/12/2007, 21h35   #3
Membre habitué
 
Inscription : février 2005
Messages : 34
Détails du profil
Informations forums :
Inscription : février 2005
Messages : 34
Points : 123
Points : 123
"window.document.location.pathname" c'est propre au web non ?

Le langage Javascript n'est pas entièrement disponible je crois puis que c'est simplement le moteur rhino qu'on retrouve dans birt...

cf: http://wiki.eclipse.org/BIRT/FAQ/Scripting

Q: JavaScript? Does that mean my code runs in the browser?

When someone hears "JavaScript" the assumption is that JS is being used to script a browser. While browser scripting is a key use of JS, the language itself (when separated from the browser DOM framework) is a nice little tool that is well integrated with Java. Our goal in using JS is that a report developer can very quickly write business logic. JS tends to be easier to learn than Java for people who are accustomed to Visual Basic, SQL and similar scripting solutions. Because JS is well integrated with Java, it is easy to call from business logic into Java classes to do more advanced tasks, or if you prefer, to write your code using Java. Further, JS allows BIRT to support aggregate expression such as:

sum( row.orderTotal )

This summarizes the orderTotal column over all rows. This makes aggregates look like other expressions, even though the BIRT report engine needs to "rewrite" them.
[edit] Q: Where can I learn about JavaScript?

JavaScript (also known as EcmaScript) is a popular language for browser scripting, and a wide range of books exist that describe JavaScript in that context. An excellent one is JavaScript: the Definitive Guide by David Flanagan, published by O'Reilly. This book has two sections: Core JavaScript and Client-Side JavaScript. Use the Core section a general reference for the JavaScript language independent of whether it is in a client or server. VisiBone provides a useful on-line reference.

etc etc etc
gattino est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 12h53.


 
 
 
 
Partenaires

Hébergement Web