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 01/06/2007, 10h49   #1
Invité régulier
 
Inscription : mai 2002
Messages : 31
Détails du profil
Informations forums :
Inscription : mai 2002
Messages : 31
Points : 7
Points : 7
Par défaut Birt appel d'un report sur serveur distant

Voila, j'aimerais bien savoir comment je peux appeler un report dans mon applic pour générer un pdf par exemple, en passant directement par l'applic j2ee qui ce trouve sur un serveur

Merci

Pour le moment j'ai ceci il prend un report local avec un engine local et crée un pdf,

Mais comment puis-je appeler.

1 . engine distant
2. Un report sur le serveur avec parametre

Merci

PS: L'engine et l'appel du report par une url fonctionne déjà, il faudrais que je puisse l'appeler dans mon applic.

Citation:
EngineConfig config = new EngineConfig();
config.setEngineHome("/home/birt/Servers/birt-runtime-2_1_2/ReportEngine");

ReportEngine engine = new ReportEngine(config);

IReportRunnable design = engine.openReportDesign("/home/birt/report/billing.rptdesign");

IRunAndRenderTask task = engine.createRunAndRenderTask(design);

HashMap param = new HashMap();
param.put( "id", "e18b1cbe7f00000101ce85c46cf36558");
task.setParameterValues(param);

PDFRenderContext renderContext = new PDFRenderContext();
HashMap contextMap = new HashMap();

contextMap.put(EngineConstants.APPCONTEXT_PDF_RENDER_CONTEXT, renderContext);

task.setAppContext(contextMap);

ByteArrayOutputStream out = new ByteArrayOutputStream();
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputFormat("pdf");
options.setOutputStream(out);

task.setRenderOption(options);

task.run();
task.close();
engine.destroy();

Quand je fais ceci j'ai une erreur

Citation:
EngineConfig config = new EngineConfig();
config.setEngineHome("");

ServletContext servletContext = null;
IPlatformContext context = new PlatformServletContext(servletContext, "http://127.0.0.1:8080/birt");
config.setEngineContext(context); <<<<< ICI
Citation:
Can't load the report engine
org.eclipse.birt.core.exception.BirtException: $NO-RB$ Cant startup the OSGI framework
at org.eclipse.birt.core.framework.Platform.startup(Platform.java:89)
at org.eclipse.birt.core.framework.Platform.initialize(Platform.java:115)
at org.eclipse.birt.report.engine.api.ReportEngine.<init>(ReportEngine.java:50)
at be.labocollard.server.edition.birt.BirtFactory.<init>(BirtFactory.java:48)
at be.labocollard.server.edition.birt.BirtFactoryTest.setUp(BirtFactoryTest.java:19)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.NullPointerException
at org.eclipse.birt.core.framework.PlatformServletContext.deploy(PlatformServletContext.java:77)
at org.eclipse.birt.core.framework.PlatformServletContext.getPlatform(PlatformServletContext.java:63)
at org.eclipse.birt.core.framework.osgi.OSGILauncher.startup(OSGILauncher.java:83)
at org.eclipse.birt.core.framework.Platform.startup(Platform.java:77)
... 17 more
pixelrock est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 01/06/2007, 12h40   #2
BiM
Modératrice
 
Avatar de BiM
 
Femme
Consultante/Formatrice BIRT & Ingénieur Java/J2EE/GWT
Inscription : janvier 2005
Messages : 7 299
Détails du profil
Informations personnelles :
Sexe : Femme
Âge : 26
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations professionnelles :
Activité : Consultante/Formatrice BIRT & Ingénieur Java/J2EE/GWT

Informations forums :
Inscription : janvier 2005
Messages : 7 299
Points : 8 650
Points : 8 650
Bonjour,

Ton erreur est un problème de déploiement, vérifies que tu utilises la même version pour construire ton rapport et que le runtime est correctement installé.
__________________
__~{@ BiM - Modératrice "Business Intelligence" @}~
Consultante/Formatrice BIRT & Ingénieur Java/J2EE/GWT
___________.~{@ Lapine crétine @}~
BiM est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 01/06/2007, 12h43   #3
Invité régulier
 
Inscription : mai 2002
Messages : 31
Détails du profil
Informations forums :
Inscription : mai 2002
Messages : 31
Points : 7
Points : 7
quand tu dit le runtime c'est le war fournit ou pas

Merci
pixelrock 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 07h16.


 
 
 
 
Partenaires

Hébergement Web