Fetching a Chart image from a report file [message #247779] |
Fri, 13 July 2007 06:00  |
Eclipse User |
|
|
|
Originally posted by: stuart.roe.ovic.co.uk
Basically, I'd like users of the my Java application to be able to adjust the
SQL and styling of a chart within the eclipse IDE. Once they're happy with the
design, they would save the design/chart to file. My application would load
the design/chart via the BIRT runtime, resize appropriately and rendered chart
into an image (or another appropriate format) and displayed within the
application.
Is this possible?
Is there a better way of allow the user to adjust the charts?
Is there an easier way of achieving the same result?
I have found integration details in the BIRT2.2 FAQ. Does anyone know of any
other samples?
I hope that this makes sense.
Stuart
|
|
|
|
|
Re: Fetching a Chart image from a report file [message #248081 is a reply to message #247789] |
Mon, 16 July 2007 09:50  |
Eclipse User |
|
|
|
Stuart,
You can use the chart API directly to bind data to a chart model (outside a
report). Since your app is report-based, I assume you just need to render
the report inside your application, maybe using an embedded browser? For
resizing it, you can edit the model with the DE API.
If you are interested in running the chart standalone separately from the
report, you won't be able to use all the ODA features, but you can invoke
the driver directly, get an sql.ResultSet and bind it to the chart. You also
need to customize the chart builder for you app, so you can run it outside a
report, there is an examples in the chart examples plugin. Then you can
render the chart in Swing or SWT directly, that's the added benefit, and
it's more lightweight than running the whole report.
Thanks,
David
"Stuart Roe" <stuart.roe@ovic.co.uk> wrote in message
news:f77u3l$me7$1@build.eclipse.org...
> David Michonneau wrote:
>> Hi Stuart,
>>
>> What's the datasource for your chart? ...
>>
>
> Data source is a MySQL database via the easiest means. The SQL statement
> would be defined at the same time as the chart, hence using BIRT and just
> selecting the chart from the report. If there is an alternate method,
> could you explain a little.
>
> Stuart.
|
|
|
Powered by
FUDForum. Page generated in 0.06659 seconds