Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Eclipse BIRT & Eclipse Scout "SVG Field" integration
Eclipse BIRT & Eclipse Scout "SVG Field" integration [message #1538257] Wed, 31 December 2014 08:07 Go to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1250
Registered: October 2011
Senior Member
Amel Jakupovic wrote on Tue, 30 December 2014 17:57
Last problem that we have is integrating BIRT, for showing charts we want the use SVG, but have some problems the find manuals and examples.... maybe have some info about that ? Smile


I have done this in a demo application.

When I have started to use the BIRT Chart engine I have found the code in this plugin useful: org.eclipse.birt.chart.examples. The only problem is that you do not know to wich diagram each code correspond. I found it borring to try them all, so I came with the idea of generating a Gallery of all BIRT example Charts. You can browse it online and copy the corresponding code. (Notice that I have made this in december 2013. I should regenerate the pages with the luna version of BIRT).

Now for the integration with Eclipse Scout I should check the code of my MCQS demo app to remember how I did it. With BIRT I generate the SVG code for the chart and I display it with the SVG Field.

index.php/fa/20334/0/

I remember that the main difficulty was to use the correct mode in BIRT. There is a STANDALONE mode, but in an Eclipse Scout application you are in an OSGi Context and you should use the OSGi Mode in BIRT.

I hope this will give you a start. Do not hesitate to share your findings here.
Re: Eclipse BIRT & Eclipse Scout "SVG Field" integration [message #1539061 is a reply to message #1538257] Wed, 31 December 2014 18:51 Go to previous messageGo to next message
Chris MontyFriend
Messages: 5
Registered: December 2014
Junior Member
This is really cool. Thanks for sharing.
Re: Eclipse BIRT & Eclipse Scout "SVG Field" integration [message #1541643 is a reply to message #1539061] Fri, 02 January 2015 06:18 Go to previous messageGo to next message
Jeremie Bresson is currently offline Jeremie BressonFriend
Messages: 1250
Registered: October 2011
Senior Member
If you want to have a look, the logic is in: AnswersListForm#reloadGraph(AnswersListFormData)
This method calls: BirtBarGraphGenerator

Before the BIRT integration I had my own logic to generate the SVG code: BarGraphGenerator

index.php/fa/20341/0/

I remember that one of the questions I was asking me was where to put this logic. Server side or Client side? I decided to put it in the client, but having this in the server could also make sense.

.
Re: Eclipse BIRT & Eclipse Scout "SVG Field" integration [message #1543967 is a reply to message #1541643] Sat, 03 January 2015 13:52 Go to previous messageGo to next message
Amel Jakupovic is currently offline Amel JakupovicFriend
Messages: 62
Registered: March 2010
Member
hi Jeremie,

thanks for examples. What we have done.

1) we make birt report that is connect to db. Its show table and chart
2) from client we call service birt.service.getSVG, in service we extract chart from birt report, get byte[] and send to client
3) client take byte[] and put in svgfield

everything is working but we don't get populate data in chart.... now collegue is searching why data is not retrieved from db.

I tried to use google chart, generate html and show it in htmlfield, but don't get result (nothing is showed, without error), but if I show local chart.html in browserfield everything is fine and showed correctly. But when open on tablet/mobile we don't see chart Smile.

Your example is working, but we have many charts and I think that it will be too complex to make every chart "custom" .....

we will try to find some other solution and inform you.

For me the best solution will be:
1) generate chart in birt
2) extract programaticly chart
3) pass it to client with byte[]
4) show byte[] to svg

Re: Eclipse BIRT & Eclipse Scout "SVG Field" integration [message #1547877 is a reply to message #1543967] Mon, 05 January 2015 18:00 Go to previous messageGo to next message
Amel Jakupovic is currently offline Amel JakupovicFriend
Messages: 62
Registered: March 2010
Member
Hi Jeremie,

after all this is what we done:

1) create charts in Birt Designer
2) deploy to Tomcat Birt Viewer
3) in scout we put BrowserFiled -> localhost:xyz/birtviewer/chart.rptdesign


http://i60.tinypic.com/i3djyt.png
Its working on web, desktop, mobile, tablet....

example is in image (without labels,.... Smile )


Re: Eclipse BIRT & Eclipse Scout "SVG Field" integration [message #1547878 is a reply to message #1547877] Mon, 05 January 2015 18:04 Go to previous messageGo to next message
Amel Jakupovic is currently offline Amel JakupovicFriend
Messages: 62
Registered: March 2010
Member
One more thing we have try to put svgfields in table - that whas a problem.
Than we try to add fixed 6 svgfields in groupbox. Create svg data on server and show it in svg fields..

There was problem that first time everything is ok, second time it gives error that svg isn't formatted well.... and so on....

After all we will do next charts and reports directly in birt designer and showing it in browser field...

Thank you Jeremie for help... Smile
Re: Eclipse BIRT & Eclipse Scout "SVG Field" integration [message #1756205 is a reply to message #1547878] Mon, 13 March 2017 20:57 Go to previous message
marco santos is currently offline marco santosFriend
Messages: 9
Registered: March 2017
Junior Member
Hello Amel,

I am following this tutorial because i had the same doubt and i did the 2 steps successfully:
1) create charts in Birt Designer
2) deploy to Tomcat Birt Viewer
But now i'm having problems to do the last one, how can i use the properties of the BrowserField to load my report? did i have to use the setLocation() method? or can you show me some code for example?

Thank you.



Previous Topic:[oxygen] Missing javax.wsdl 1.6.2 on installation
Next Topic:[neon] Changing user language programmatically
Goto Forum:
  


Current Time: Wed Sep 26 08:21:03 GMT 2018

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

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

Back to the top