Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [birt-dev] Problems with ouput to CSV format from java

You can export the data through org.eclipse.birt.report.engine.api.DataExtractionTask. You can access the result set used in the report and output them to CSV file.

 

See Birt viewer source code for examples.

 

Thanks.

 

 

-Wei Yan

 


From: birt-dev-bounces@xxxxxxxxxxx [mailto:birt-dev-bounces@xxxxxxxxxxx] On Behalf Of Johnny Gonzalez
Sent: Tuesday, August 22, 2006 1:52 AM
To: Wenbin He; birt-dev@xxxxxxxxxxx
Subject: RE: [birt-dev] Problems with ouput to CSV format from java

 

Hello,

 

Thanks for you Answer, but in the Birt Integration web page (http://www.eclipse.org/birt/phoenix/intro/intro02.php) it says:

 

 The Viewer Plug-in can also be embedded within a Rich Client Platform (RCP) application. BIRT Release 2.1.0 provides web output as a single HTML document, paginated HTML and PDF. Additionally the viewer allows exporting the data to CSV, printing, and Table of Contents functionality.

 

So I think that if the viewer has that functionality, it's also possible to do it programatically from java.

 

Any ideas?

 

TIA,

Johnny

 



Wenbin He <whe@xxxxxxxxxxx> escribió:

Currently BIRT doesn’t support render report in CVS format.

 

-wenbin

 


From: birt-dev-bounces@xxxxxxxxxxx [mailto:birt-dev-bounces@xxxxxxxxxxx] On Behalf Of Johnny Gonzalez
Sent: Monday, August 21, 2006 8:57 AM
To: birt-dev@xxxxxxxxxxx
Subject: [birt-dev] Problems with ouput to CSV format from java

 

Hello, I have some java code that generates a report in pdf format, but I haven't been able to generate the report in CSV format, can anyone help me?

 

I'm using this to generate the report in PDF:

 

IRunAndRenderTask task = motorReportes.createRunAndRenderTask( reporte );
      HTMLRenderOption options = new HTMLRenderOption();
      // String output = nomArchivo.replaceFirst( ".rptdesign",
      // System.currentTimeMillis()
      // + "." + HTMLRenderOption.OUTPUT_FORMAT_PDF );
      byte[] bytesReporte = null;
      ByteArrayOutputStream os = new ByteArrayOutputStream();
     
      options.setOutputFormat( HTMLRenderOption.OUTPUT_FORMAT_PDF );
      // output = PropiedadesSistema.RUTA_REPORTES + output;
      // options.setOutputFileName( output );
      options.setOutputStream( os );
      task.setRenderOption( options );
      task.setParameterValues( params );

      // Run the report.

      try {
         task.run();
      }
      catch ( EngineException e ) {
         logger.error( "Couldn't execute report " + nomArchivo, e );
         throw new ReportesException( "Couldn't execute report", e );

      }

 

I cannot see any HTMLRenderOption.OUTPUT_FORMAT_PDF, for CSV format, how could I export to CSV?

 

I'm using birt 2.1.

 

Thanks a lot,

Any help would be very appreciated

 



LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com

 

 



LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com


Back to the top