CSV export via URL [message #257573] |
Mon, 08 October 2007 16:16  |
Eclipse User |
|
|
|
So I'm trying to integrate BIRT in a multiple-platform environment (FoxPro
and PHP). I'm just passing URL parameters to the preview servlet, fetching
the result, and dealing with it on the client. Works great for Excel & PDF.
But it appears CSV requires a different servlet. From the looks of the
frameset servlet when you click on the export to CSV button, I will need to
pass the datasource and the columns I want. This is tedious and unusuable in
my situation. Is it possible to get CSV using a simple URL with just the
name of the datasource?
If not, how difficult would it be to write my own servlet to accomplish
this? (Bear in mind I am a Java novice)
|
|
|
Re: CSV export via URL [message #258397 is a reply to message #257573] |
Mon, 15 October 2007 12:53  |
Eclipse User |
|
|
|
Dave,
The difference is that the CSV downloads you are using are accessing the
DataEmitter interface, while the other examples are using the report emitter
interface. A data emitter needs to know which DataSet it is based on, the
report emitter gets all of the data from the report.
You can build your own CSV report emitter using the BIRT Emitter API, but
if you are a Java Novice it will be relatively challenging. There is a book,
Integrating and Extending BIRT, Vol. 2, which has an example of a CSV emitter
as one of its sections. If you are a relatively new to Java, Eclipse, or
BIRT, and you need a CSV emitter, I would strongly recommend having a look.
Scott Rosenbaum
> So I'm trying to integrate BIRT in a multiple-platform environment
> (FoxPro and PHP). I'm just passing URL parameters to the preview
> servlet, fetching the result, and dealing with it on the client. Works
> great for Excel & PDF. But it appears CSV requires a different
> servlet. From the looks of the frameset servlet when you click on the
> export to CSV button, I will need to pass the datasource and the
> columns I want. This is tedious and unusuable in my situation. Is it
> possible to get CSV using a simple URL with just the name of the
> datasource?
>
> If not, how difficult would it be to write my own servlet to
> accomplish this? (Bear in mind I am a Java novice)
>
|
|
|
Powered by
FUDForum. Page generated in 0.03297 seconds