Generate Report from Xtext Editor model [message #692567] |
Mon, 04 July 2011 14:51  |
Eclipse User |
|
|
|
I use Xtext to define a DSL and to generate an editor for the DSL. So I have the grammar, an *.ecore file, and I can access the Ecore model of the editor content (instances of EObject)
I'd like to create an editor action to generate a PDF that uses the Ecore model of the current editor content as Data Source.
Which kind of Data Source should I use? Ecore ODA Data Source and EMF Ecore Data Source do not work for me because I cannot create a Data Set (the Next buttons are disabled when entering the query or the page to choose column is always empty). (I'm not familiar with OCL) Are there any working tutorials? (http://timezra.blogspot.com/2008/04/oda-ecore-getting-started-guide.html does not work for me) The ExtLibrary Example does not work too. And the documentation is not very extensive.
Or do you have any example report file where I can test the report without using any wizard with disabled buttons?
Thanks for your support.
|
|
|
Re: Generate Report from Xtext Editor model [message #692948 is a reply to message #692567] |
Tue, 05 July 2011 10:19  |
Eclipse User |
|
|
|
Ralf,
I am not certain why the Ecore ODA is not working. You may want to ask
that question on the dtp forum, but you could also use a scripted
datasource to access your data. I do not have an example of an ecore
model scripted dataset but I have some generic ones if you need one. If
you need an engine example there are a couple in this download:
http://www.birt-exchange.org/org/devshare/deploying-birt-reports/1344-eclipsecon-2011-api-examples/
There is one RCP example that calls the RE API to run a report. There
is another that calls the Chart Engine, and a final one that uses the
WebViewer plugin.
Jason
On 7/4/2011 2:51 PM, Ralf Zahn wrote:
> I use Xtext to define a DSL and to generate an editor for the DSL. So I
> have the grammar, an *.ecore file, and I can access the Ecore model of
> the editor content (instances of EObject)
>
> I'd like to create an editor action to generate a PDF that uses the
> Ecore model of the current editor content as Data Source.
>
> Which kind of Data Source should I use? Ecore ODA Data Source and EMF
> Ecore Data Source do not work for me because I cannot create a Data Set
> (the Next buttons are disabled when entering the query or the page to
> choose column is always empty). (I'm not familiar with OCL) Are there
> any working tutorials?
> (http://timezra.blogspot.com/2008/04/oda-ecore-getting-started-guide.html does
> not work for me) The ExtLibrary Example does not work too. And the
> documentation is not very extensive.
>
> Or do you have any example report file where I can test the report
> without using any wizard with disabled buttons?
>
> Thanks for your support.
|
|
|
Powered by
FUDForum. Page generated in 0.06433 seconds