Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » SEVERE: Report engine can not create pdf emitter
SEVERE: Report engine can not create pdf emitter [message #110499] Tue, 17 January 2006 18:04 Go to next message
Humberto Carvalho is currently offline Humberto CarvalhoFriend
Messages: 1
Registered: July 2009
Junior Member
Hello,

i need some help.

I'm trying to generate a pdf file, but the following error occurs.


SEVERE: Report engine can not create pdf emitter.
Report C:/Program Files/Apache/Tomcat
5.5/webapps/BI/Documentos/estat.rptdesign
run failed.
org.eclipse.birt.report.engine.api.EngineException: Report engine fails to
creat
e extension to handle this request.

The software that i'm using are:
Windows XP SP2
Eclipse 3.1.1
BIRT 2.0.0
EMF 2.1.*
GEF 3.1.1

I hope that someone can help me.

Thanks
Re: SEVERE: Report engine can not create pdf emitter [message #110584 is a reply to message #110499] Tue, 17 January 2006 17:39 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Can you upload the Stacktrace?
Also verify that you have the other required files under the proper
location, like the iText jar file.

Jason Weathersby
BIRT PMC


"Humberto Carvalho" <carvalho.humberto@gmail.com> wrote in message
news:51ff09d618a253c7540a8c0018bd62e5$1@www.eclipse.org...
> Hello,
>
> i need some help.
>
> I'm trying to generate a pdf file, but the following error occurs.
>
>
> SEVERE: Report engine can not create pdf emitter.
> Report C:/Program Files/Apache/Tomcat
> 5.5/webapps/BI/Documentos/estat.rptdesign
> run failed.
> org.eclipse.birt.report.engine.api.EngineException: Report engine fails to
> creat
> e extension to handle this request.
>
> The software that i'm using are:
> Windows XP SP2
> Eclipse 3.1.1
> BIRT 2.0.0
> EMF 2.1.*
> GEF 3.1.1
>
> I hope that someone can help me.
>
> Thanks
>
Re: SEVERE: Report engine can not create pdf emitter [message #110794 is a reply to message #110584] Wed, 18 January 2006 12:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: carvalho.humberto.almedina.net

This is a multi-part message in MIME format.
--------------060103060005040007090802
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Thanks for your help,

First I have to say that i'm using a Birt viewer and the Birt engine API.

If i use the viewer engine and then choose to print to pdf, this works,
but when i try to generate a pdf file from a rptdesign file using the
engine API, the error occurs


I think that I have all the required files in the right place, I
followed the instructions of the following url
" http://www.eclipse.org/birt/index.php?page=build/install.htm l"

iText.jar is placed in "plugins\org.eclipse.birt.report.engine.pdf\lib"

In my application, the engine directory points to the viewer root
directory. I have also tried using the 'Report Engine' directory of the
runtime distribution, with similar results.

In attachment I send a java file that i think that could be the problem...

I'll wait for your answer..
Thanks

Humberto Carvalho






Jason Weathersby wrote:
> Can you upload the Stacktrace?
> Also verify that you have the other required files under the proper
> location, like the iText jar file.
>
> Jason Weathersby
> BIRT PMC
>
>
> "Humberto Carvalho" <carvalho.humberto@gmail.com> wrote in message
> news:51ff09d618a253c7540a8c0018bd62e5$1@www.eclipse.org...
>> Hello,
>>
>> i need some help.
>>
>> I'm trying to generate a pdf file, but the following error occurs.
>>
>>
>> SEVERE: Report engine can not create pdf emitter.
>> Report C:/Program Files/Apache/Tomcat
>> 5.5/webapps/BI/Documentos/estat.rptdesign
>> run failed.
>> org.eclipse.birt.report.engine.api.EngineException: Report engine fails to
>> creat
>> e extension to handle this request.
>>
>> The software that i'm using are:
>> Windows XP SP2
>> Eclipse 3.1.1
>> BIRT 2.0.0
>> EMF 2.1.*
>> GEF 3.1.1
>>
>> I hope that someone can help me.
>>
>> Thanks
>>
>
>


--------------060103060005040007090802
Content-Type: text/plain;
name="Conversor.java"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Conversor.java"

package pt.almedina.reports;

/*
* Example command-line utility to generate BIRT reports. Shows the basics
* of integrating the BIRT report engine into a simple Java application.
*/


import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;



import org.eclipse.birt.report.engine.api.EngineConfig;
import org.eclipse.birt.report.engine.api.EngineConstants;
import org.eclipse.birt.report.engine.api.EngineException;
import org.eclipse.birt.report.engine.api.HTMLCompleteImageHandler;
import org.eclipse.birt.report.engine.api.HTMLEmitterConfig;
import org.eclipse.birt.report.engine.api.HTMLRenderContext;
import org.eclipse.birt.report.engine.api.HTMLRenderOption;
import org.eclipse.birt.report.engine.api.IGetParameterDefinitionTa sk;
import org.eclipse.birt.report.engine.api.IHTMLActionHandler;
import org.eclipse.birt.report.engine.api.IParameterDefnBase;
import org.eclipse.birt.report.engine.api.IParameterGroupDefn;
import org.eclipse.birt.report.engine.api.IReportRunnable;
import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
import org.eclipse.birt.report.engine.api.IScalarParameterDefn;
import org.eclipse.birt.report.engine.api.ReportEngine;
import org.eclipse.birt.report.engine.api.ReportParameterConverter;


/**
* Runs a BIRT report and writes the output to a directory.
*
* RunReport report-name -[h|p] [-i] param=value
*
* -h HTML (default)
* -p PDF
* -i Display report info.
* param=value Set parameter "param" to the value "value".
*/

public class Conversor
{

static String REPORTENGINE_URL = "C:/Program Files/Apache/Tomcat 5.5/webapps/Viewer";//c:/reportengine";
static String IMAGE_URL = "C:/Program Files/Apache/Tomcat 5.5/webapps/BI/Documentos";

// Command-line main to parse arguments described above.

public static void main(String[] args) throws EngineException
{

int i = 0;
if ( i >= args.length )
{
System.out.println( "Nao foi especificado qualquer relatorio" );
return;
}
String reportName = args[i++];
String format = null;
boolean showInfo = false;

// Stoare parameter values into a hash map to later pass to the
// BIRT report engine.

HashMap params = new HashMap( );
for ( ; i < args.length; i++ )
{
if ( args[i].charAt(0) == '-' )
{
char flag = Character.toLowerCase( args[i].charAt( 1 ) );
if ( flag == 'p' )
{
format = HTMLRenderOption.OUTPUT_FORMAT_PDF;
}
else if ( flag == 'h' )
{
format = HTMLRenderOption.OUTPUT_FORMAT_HTML;
}
else if ( flag == 'i' )
{
showInfo = true;
}
else
{
usage( );
return;
}
}
else
{

// Get a parameter value. Note, this example code only works
// for string parameters. If you have date or number parameters,
// your application should parse them, then put the corresponding
// objects into the hash map.

String arg = args[i];
int posn = arg.indexOf( '=' );
if ( posn == -1 )
{
usage( );
return;
}
String param = arg.substring( 0, posn );
String value = arg.substring( posn + 1 );
Object put = params.put( param, value );

}
}


run( reportName, params, format, showInfo );

}

public static void usage( )
{
System.out.println( "Sintaxe:\n java RunReport rptName [-h|p]\n param=value ..." );
}

// Example function to run a report given the report name, parameters and
// output type. The output is put into a file in the same directory as the
// report itself.

public static void run( String name, HashMap params,
String format, boolean showInfo ) throws EngineException
{
// The EngineConfig is used to set up engine-wide configuration
// information.

EngineConfig config = new EngineConfig( );

// The Engine home is the location of the BIRT engine runtime.
// M3 Note: Use the report engine installed as part of the BIRT web app
// used to preview reports. Alter this path to the location of your
// Eclipse installation.

config.setEngineHome(REPORTENGINE_URL);

// HTML reports can have embedded images or charts. Set up the configuration
// required to write these into a directory in the output directory.
// The HTMLCompleteImageHandler is one provided by BIRT for this purpose.
// Your application can create a customized version to provide alternative
// ways to handle images.

HTMLEmitterConfig hc = new HTMLEmitterConfig( );


HTMLCompleteImageHandler imageHandler = new HTMLCompleteImageHandler( );
hc.setImageHandler( imageHandler );
config.setEmitterConfiguration( HTMLRenderOption.OUTPUT_FORMAT_HTML, hc );

// Create the report engine itself. This engine can be used to run
// multiple reports.

ReportEngine engine = new ReportEngine( config );

// Open the report design.

IReportRunnable report = null;


try {
report = engine.openReportDesign( name );
} catch ( EngineException e) {

System.out.println("ERRO: PT.ALMEDINA.REPORTS.CONVERSOR.RUN\n EXCEPTION: "+e);

}


if ( showInfo )
{
showReportInfo( engine, report );
}

// Create a task to run the report and convert the output to HTML
// or PDF.

if ( format != null )
{

parseParams( engine, report, params );

IRunAndRenderTask task = engine.createRunAndRenderTask( report );
/*
//HTMLRenderContext renderContext = new HTMLRenderContext();
//renderContext.setImageDirectory(IMAGE_URL);

HTMLRenderContext renderContext = new HTMLRenderContext( );
renderContext.setImageDirectory( IMAGE_URL ); //"image"//$NON-NLS-1$
HashMap appContext = new HashMap( );
appContext.put("PDF_RENDER_CONTEXT", renderContext );//EngineConstants.APPCONTEXT_PDF_RENDER_CONTEXT
task.setAppContext( appContext );

//task.setContext((Map) renderContext);
*/
HTMLRenderOption options = new HTMLRenderOption( );
options.setOutputFormat( format );
String output = name.replaceFirst( ".rptdesign", "." + format );
options.setOutputFileName( output );
task.setRenderOption( options );
String str = params.toString();


//task.setParameterValues( params );

// Run the report.

try
{
task.run( );
}
catch (EngineException e)
{
}
}

engine.destroy( );
}

// Display properties of the report and the list of report parameters.

static void showReportInfo( ReportEngine engine, IReportRunnable report )
{
// Display some of the general report properties.
// See the ROM Design specification for a list of properties.

System.out.print( "Report Name: " + report.getReportName() +
"\nTitle: " + report.getProperty( "title" ) +
"\nComments: " + report.getProperty( "comments" ) +
"\nDescription: " + report.getProperty( "description" ) +
"\nAuthor: " + report.getProperty( "author" ) +
"\nCreated By: " + report.getProperty( "createdBy" ) +
"\n" );

// Display the list of report parameters with their groups.
// Parameters defined outside a group appear inside a default, unnamed
// group.

IGetParameterDefinitionTask task = engine.createGetParameterDefinitionTask( report );
Collection params = task.getParameterDefns( true );
if ( params.isEmpty() )
{
System.out.print( "This report has no parameters.\n" );
return;
}

Iterator iter = params.iterator( );
while ( iter.hasNext( ) )
{
IParameterDefnBase param = (IParameterDefnBase) iter.next( );
if ( param instanceof IParameterGroupDefn )
{
IParameterGroupDefn group = (IParameterGroupDefn) param;
System.out.println( "Parameter Group: " + group.getDisplayName( ) );
Iterator i2 = group.getContents( ).iterator( );
while ( iter.hasNext( ) )
{
IScalarParameterDefn member = (IScalarParameterDefn) i2.next( );
showParam( task, member, " " );
}
}
else
showParam( task, param, "" );
}
}

// Show information for one parameter.
// Release 1 supports only scalar (single-value) parameters.

static void showParam( IGetParameterDefinitionTask task,
IParameterDefnBase defn,
String prefix )
{
IScalarParameterDefn param = (IScalarParameterDefn) defn;
System.out.println( prefix + "Parameter: " + param.getName( ) );
System.out.println( prefix + " Display Name: " + param.getDisplayName( ) );
System.out.println( prefix + " Type: " + param.getDataType( ) );
System.out.print( prefix + " Default Value: " );

// The default value is an expression. Evaluate it.

Object value = task.getDefaultValue( param );
System.out.println( value == null ? "none" : value.toString( ) );
}

static void parseParams( ReportEngine engine, IReportRunnable report, HashMap values )
{

System.out.println("ENTREI!!! VALORES: "+values);
if ( values.isEmpty( ) )
return;

IGetParameterDefinitionTask task = engine.createGetParameterDefinitionTask( report );
Collection params = task.getParameterDefns( false );
Iterator iter = values.keySet( ).iterator( );
System.out.println("VOU ENTRAR NO WHILE!!!");
int xxx = 1;
while ( iter.hasNext( ) )
{
System.out.println("WHILE: "+xxx);
String name = (String) iter.next( );

IScalarParameterDefn found = null;
Iterator i2 = params.iterator( );
while ( i2.hasNext( ) )
{
IParameterDefnBase param = (IParameterDefnBase) i2.next( );
if ( param instanceof IParameterGroupDefn )
continue;
if ( param.getName( ).equals( name ) )
{
found = (IScalarParameterDefn) param;
break;
}
}
if ( found == null )
{
System.err.println( "Parameter " + name + " not found in the report." );
continue;
}
String value = (String) values.get( name );
// ReportParameterConverter cfgConverter = new ReportParameterConverter( "", Locale.getDefault( ) );
// Object obj = cfgConverter.parse( value, found.getDataType( ) );
// values.put( name, obj );
values.put( name, value );
}
}
}
--------------060103060005040007090802--
Re: SEVERE: Report engine can not create pdf emitter [message #110862 is a reply to message #110794] Wed, 18 January 2006 13:05 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Humberto,

I just tried your sample and it worked fine.
I set my home to "c:/myruntime/report engine".
Below is a directory listing of the report engine directory. Notice I added
iText.

12/31/2005 11:50a 77,586 birt-oda.jar
12/31/2005 11:50a 956,273 chart-engine.jar
12/31/2005 11:50a 30,117 commons-cli-1.0.jar
12/31/2005 11:50a 37,754 commons-codec-1.3.jar
12/31/2005 11:50a 132,596 core.jar
12/31/2005 11:50a 569,702 dte.jar
12/31/2005 11:50a 870,507 engine.jar
12/31/2005 11:50a 71,513 flute.jar
11/29/2005 05:41p 1,145,105 itext-1.3.jar
12/31/2005 11:50a 699,081 js.jar
01/15/2006 11:33p 1,552 libs.txt
12/31/2005 11:50a 3,316,129 model.jar
12/31/2005 11:50a 80,541 oda.jar
12/31/2005 11:50a 69,367 odaconsumer-helper.jar
12/31/2005 11:50a 137,063 org.eclipse.emf.common_2.1.0.jar
12/31/2005 11:50a 144,460 org.eclipse.emf.ecore.xmi_2.1.0.jar
12/31/2005 11:50a 639,778 org.eclipse.emf.ecore_2.1.0.jar
01/04/2006 04:48p <DIR> plugins
12/31/2005 11:50a 14,526 sac.jar
01/04/2006 04:48p <DIR> samples
12/31/2005 11:50a 43,275 scriptapi.jar
01/18/2006 11:00a 0 test.txt
12/31/2005 11:50a 161,563 Tidy.jar

Jason

"HC" <carvalho.humberto@almedina.net> wrote in message
news:43CE2F39.9030104@almedina.net...
> Thanks for your help,
>
> First I have to say that i'm using a Birt viewer and the Birt engine API.
>
> If i use the viewer engine and then choose to print to pdf, this works,
> but when i try to generate a pdf file from a rptdesign file using the
> engine API, the error occurs
>
>
> I think that I have all the required files in the right place, I
> followed the instructions of the following url
> " http://www.eclipse.org/birt/index.php?page=build/install.htm l"
>
> iText.jar is placed in "plugins\org.eclipse.birt.report.engine.pdf\lib"
>
> In my application, the engine directory points to the viewer root
> directory. I have also tried using the 'Report Engine' directory of the
> runtime distribution, with similar results.
>
> In attachment I send a java file that i think that could be the problem...
>
> I'll wait for your answer..
> Thanks
>
> Humberto Carvalho
>
>
>
>
>
>
> Jason Weathersby wrote:
>> Can you upload the Stacktrace?
>> Also verify that you have the other required files under the proper
>> location, like the iText jar file.
>>
>> Jason Weathersby
>> BIRT PMC
>>
>>
>> "Humberto Carvalho" <carvalho.humberto@gmail.com> wrote in message
>> news:51ff09d618a253c7540a8c0018bd62e5$1@www.eclipse.org...
>>> Hello,
>>>
>>> i need some help.
>>>
>>> I'm trying to generate a pdf file, but the following error occurs.
>>>
>>>
>>> SEVERE: Report engine can not create pdf emitter.
>>> Report C:/Program Files/Apache/Tomcat
>>> 5.5/webapps/BI/Documentos/estat.rptdesign
>>> run failed.
>>> org.eclipse.birt.report.engine.api.EngineException: Report engine fails
>>> to
>>> creat
>>> e extension to handle this request.
>>>
>>> The software that i'm using are:
>>> Windows XP SP2
>>> Eclipse 3.1.1
>>> BIRT 2.0.0
>>> EMF 2.1.*
>>> GEF 3.1.1
>>>
>>> I hope that someone can help me.
>>>
>>> Thanks
>>>
>>
>>
>
>


------------------------------------------------------------ --------------------


> package pt.almedina.reports;
>
> /*
> * Example command-line utility to generate BIRT reports. Shows the basics
> * of integrating the BIRT report engine into a simple Java application.
> */
>
>
> import java.util.Collection;
> import java.util.HashMap;
> import java.util.Iterator;
> import java.util.Map;
>
>
>
> import org.eclipse.birt.report.engine.api.EngineConfig;
> import org.eclipse.birt.report.engine.api.EngineConstants;
> import org.eclipse.birt.report.engine.api.EngineException;
> import org.eclipse.birt.report.engine.api.HTMLCompleteImageHandler;
> import org.eclipse.birt.report.engine.api.HTMLEmitterConfig;
> import org.eclipse.birt.report.engine.api.HTMLRenderContext;
> import org.eclipse.birt.report.engine.api.HTMLRenderOption;
> import org.eclipse.birt.report.engine.api.IGetParameterDefinitionTa sk;
> import org.eclipse.birt.report.engine.api.IHTMLActionHandler;
> import org.eclipse.birt.report.engine.api.IParameterDefnBase;
> import org.eclipse.birt.report.engine.api.IParameterGroupDefn;
> import org.eclipse.birt.report.engine.api.IReportRunnable;
> import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
> import org.eclipse.birt.report.engine.api.IScalarParameterDefn;
> import org.eclipse.birt.report.engine.api.ReportEngine;
> import org.eclipse.birt.report.engine.api.ReportParameterConverter;
>
>
> /**
> * Runs a BIRT report and writes the output to a directory.
> *
> * RunReport report-name -[h|p] [-i] param=value
> *
> * -h HTML (default)
> * -p PDF
> * -i Display report info.
> * param=value Set parameter "param" to the value "value".
> */
>
> public class Conversor
> {
>
> static String REPORTENGINE_URL = "C:/Program Files/Apache/Tomcat
> 5.5/webapps/Viewer";//c:/reportengine";
> static String IMAGE_URL = "C:/Program Files/Apache/Tomcat
> 5.5/webapps/BI/Documentos";
>
> // Command-line main to parse arguments described above.
>
> public static void main(String[] args) throws EngineException
> {
>
> int i = 0;
> if ( i >= args.length )
> {
> System.out.println( "Nao foi especificado qualquer relatorio" );
> return;
> }
> String reportName = args[i++];
> String format = null;
> boolean showInfo = false;
>
> // Stoare parameter values into a hash map to later pass to the
> // BIRT report engine.
>
> HashMap params = new HashMap( );
> for ( ; i < args.length; i++ )
> {
> if ( args[i].charAt(0) == '-' )
> {
> char flag = Character.toLowerCase( args[i].charAt( 1 ) );
> if ( flag == 'p' )
> {
> format = HTMLRenderOption.OUTPUT_FORMAT_PDF;
> }
> else if ( flag == 'h' )
> {
> format = HTMLRenderOption.OUTPUT_FORMAT_HTML;
> }
> else if ( flag == 'i' )
> {
> showInfo = true;
> }
> else
> {
> usage( );
> return;
> }
> }
> else
> {
>
> // Get a parameter value. Note, this example code only works
> // for string parameters. If you have date or number parameters,
> // your application should parse them, then put the corresponding
> // objects into the hash map.
>
> String arg = args[i];
> int posn = arg.indexOf( '=' );
> if ( posn == -1 )
> {
> usage( );
> return;
> }
> String param = arg.substring( 0, posn );
> String value = arg.substring( posn + 1 );
> Object put = params.put( param, value );
>
> }
> }
>
>
> run( reportName, params, format, showInfo );
>
> }
>
> public static void usage( )
> {
> System.out.println( "Sintaxe:\n java RunReport rptName [-h|p]\n
> param=value ..." );
> }
>
> // Example function to run a report given the report name, parameters and
> // output type. The output is put into a file in the same directory as the
> // report itself.
>
> public static void run( String name, HashMap params,
> String format, boolean showInfo ) throws EngineException
> {
> // The EngineConfig is used to set up engine-wide configuration
> // information.
>
> EngineConfig config = new EngineConfig( );
>
> // The Engine home is the location of the BIRT engine runtime.
> // M3 Note: Use the report engine installed as part of the BIRT web app
> // used to preview reports. Alter this path to the location of your
> // Eclipse installation.
>
> config.setEngineHome(REPORTENGINE_URL);
>
> // HTML reports can have embedded images or charts. Set up the
> configuration
> // required to write these into a directory in the output directory.
> // The HTMLCompleteImageHandler is one provided by BIRT for this purpose.
> // Your application can create a customized version to provide alternative
> // ways to handle images.
>
> HTMLEmitterConfig hc = new HTMLEmitterConfig( );
>
>
> HTMLCompleteImageHandler imageHandler = new HTMLCompleteImageHandler( );
> hc.setImageHandler( imageHandler );
> config.setEmitterConfiguration( HTMLRenderOption.OUTPUT_FORMAT_HTML, hc );
>
> // Create the report engine itself. This engine can be used to run
> // multiple reports.
>
> ReportEngine engine = new ReportEngine( config );
>
> // Open the report design.
>
> IReportRunnable report = null;
>
>
> try {
> report = engine.openReportDesign( name );
> } catch ( EngineException e) {
>
> System.out.println("ERRO: PT.ALMEDINA.REPORTS.CONVERSOR.RUN\n
> EXCEPTION: "+e);
>
> }
>
>
> if ( showInfo )
> {
> showReportInfo( engine, report );
> }
>
> // Create a task to run the report and convert the output to HTML
> // or PDF.
>
> if ( format != null )
> {
>
> parseParams( engine, report, params );
>
> IRunAndRenderTask task = engine.createRunAndRenderTask( report );
> /*
> //HTMLRenderContext renderContext = new HTMLRenderContext();
> //renderContext.setImageDirectory(IMAGE_URL);
>
> HTMLRenderContext renderContext = new HTMLRenderContext( );
> renderContext.setImageDirectory( IMAGE_URL ); //"image"//$NON-NLS-1$
> HashMap appContext = new HashMap( );
> appContext.put("PDF_RENDER_CONTEXT",
> renderContext );//EngineConstants.APPCONTEXT_PDF_RENDER_CONTEXT
> task.setAppContext( appContext );
>
> //task.setContext((Map) renderContext);
> */
> HTMLRenderOption options = new HTMLRenderOption( );
> options.setOutputFormat( format );
> String output = name.replaceFirst( ".rptdesign", "." + format );
> options.setOutputFileName( output );
> task.setRenderOption( options );
> String str = params.toString();
>
>
> //task.setParameterValues( params );
>
> // Run the report.
>
> try
> {
> task.run( );
> }
> catch (EngineException e)
> {
> }
> }
>
> engine.destroy( );
> }
>
> // Display properties of the report and the list of report parameters.
>
> static void showReportInfo( ReportEngine engine, IReportRunnable report )
> {
> // Display some of the general report properties.
> // See the ROM Design specification for a list of properties.
>
> System.out.print( "Report Name: " + report.getReportName() +
> "\nTitle: " + report.getProperty( "title" ) +
> "\nComments: " + report.getProperty( "comments" ) +
> "\nDescription: " + report.getProperty( "description" ) +
> "\nAuthor: " + report.getProperty( "author" ) +
> "\nCreated By: " + report.getProperty( "createdBy" ) +
> "\n" );
>
> // Display the list of report parameters with their groups.
> // Parameters defined outside a group appear inside a default, unnamed
> // group.
>
> IGetParameterDefinitionTask task =
> engine.createGetParameterDefinitionTask( report );
> Collection params = task.getParameterDefns( true );
> if ( params.isEmpty() )
> {
> System.out.print( "This report has no parameters.\n" );
> return;
> }
>
> Iterator iter = params.iterator( );
> while ( iter.hasNext( ) )
> {
> IParameterDefnBase param = (IParameterDefnBase) iter.next( );
> if ( param instanceof IParameterGroupDefn )
> {
> IParameterGroupDefn group = (IParameterGroupDefn) param;
> System.out.println( "Parameter Group: " + group.getDisplayName( ) );
> Iterator i2 = group.getContents( ).iterator( );
> while ( iter.hasNext( ) )
> {
> IScalarParameterDefn member = (IScalarParameterDefn) i2.next( );
> showParam( task, member, " " );
> }
> }
> else
> showParam( task, param, "" );
> }
> }
>
> // Show information for one parameter.
> // Release 1 supports only scalar (single-value) parameters.
>
> static void showParam( IGetParameterDefinitionTask task,
> IParameterDefnBase defn,
> String prefix )
> {
> IScalarParameterDefn param = (IScalarParameterDefn) defn;
> System.out.println( prefix + "Parameter: " + param.getName( ) );
> System.out.println( prefix + " Display Name: " +
> param.getDisplayName( ) );
> System.out.println( prefix + " Type: " + param.getDataType( ) );
> System.out.print( prefix + " Default Value: " );
>
> // The default value is an expression. Evaluate it.
>
> Object value = task.getDefaultValue( param );
> System.out.println( value == null ? "none" : value.toString( ) );
> }
>
> static void parseParams( ReportEngine engine, IReportRunnable report,
> HashMap values )
> {
>
> System.out.println("ENTREI!!! VALORES: "+values);
> if ( values.isEmpty( ) )
> return;
>
> IGetParameterDefinitionTask task =
> engine.createGetParameterDefinitionTask( report );
> Collection params = task.getParameterDefns( false );
> Iterator iter = values.keySet( ).iterator( );
> System.out.println("VOU ENTRAR NO WHILE!!!");
> int xxx = 1;
> while ( iter.hasNext( ) )
> {
> System.out.println("WHILE: "+xxx);
> String name = (String) iter.next( );
>
> IScalarParameterDefn found = null;
> Iterator i2 = params.iterator( );
> while ( i2.hasNext( ) )
> {
> IParameterDefnBase param = (IParameterDefnBase) i2.next( );
> if ( param instanceof IParameterGroupDefn )
> continue;
> if ( param.getName( ).equals( name ) )
> {
> found = (IScalarParameterDefn) param;
> break;
> }
> }
> if ( found == null )
> {
> System.err.println( "Parameter " + name + " not found in the report." );
> continue;
> }
> String value = (String) values.get( name );
> // ReportParameterConverter cfgConverter = new ReportParameterConverter(
> "", Locale.getDefault( ) );
> // Object obj = cfgConverter.parse( value, found.getDataType( ) );
> // values.put( name, obj );
> values.put( name, value );
> }
> }
> }
Re: SEVERE: Report engine can not create pdf emitter [message #111037 is a reply to message #110862] Wed, 18 January 2006 18:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: carvalho.humberto.almedina.net

Hello,

I've tried what you said in your last e-mail, but the result was the
same.

In my last e-mail I didn't told you that if I try to generate a pdf file
or a html file in either cases the error occurs, and not only when I try
to generate a pdf file.

One thing that I saw comparing your list files with my Report Engine
files, is that model.jar in your Report Engine it's bigger than mine.
The other files i think that are identical.

I think that this isn't the problem, but I don't know.

Thanks

Humberto Carvalho

Jason Weathersby wrote:
> Humberto,
>
> I just tried your sample and it worked fine.
> I set my home to "c:/myruntime/report engine".
> Below is a directory listing of the report engine directory. Notice I added
> iText.
>
> 12/31/2005 11:50a 77,586 birt-oda.jar
> 12/31/2005 11:50a 956,273 chart-engine.jar
> 12/31/2005 11:50a 30,117 commons-cli-1.0.jar
> 12/31/2005 11:50a 37,754 commons-codec-1.3.jar
> 12/31/2005 11:50a 132,596 core.jar
> 12/31/2005 11:50a 569,702 dte.jar
> 12/31/2005 11:50a 870,507 engine.jar
> 12/31/2005 11:50a 71,513 flute.jar
> 11/29/2005 05:41p 1,145,105 itext-1.3.jar
> 12/31/2005 11:50a 699,081 js.jar
> 01/15/2006 11:33p 1,552 libs.txt
> 12/31/2005 11:50a 3,316,129 model.jar
> 12/31/2005 11:50a 80,541 oda.jar
> 12/31/2005 11:50a 69,367 odaconsumer-helper.jar
> 12/31/2005 11:50a 137,063 org.eclipse.emf.common_2.1.0.jar
> 12/31/2005 11:50a 144,460 org.eclipse.emf.ecore.xmi_2.1.0.jar
> 12/31/2005 11:50a 639,778 org.eclipse.emf.ecore_2.1.0.jar
> 01/04/2006 04:48p <DIR> plugins
> 12/31/2005 11:50a 14,526 sac.jar
> 01/04/2006 04:48p <DIR> samples
> 12/31/2005 11:50a 43,275 scriptapi.jar
> 01/18/2006 11:00a 0 test.txt
> 12/31/2005 11:50a 161,563 Tidy.jar
>
> Jason
>
> "HC" <carvalho.humberto@almedina.net> wrote in message
> news:43CE2F39.9030104@almedina.net...
>> Thanks for your help,
>>
>> First I have to say that i'm using a Birt viewer and the Birt engine API.
>>
>> If i use the viewer engine and then choose to print to pdf, this works,
>> but when i try to generate a pdf file from a rptdesign file using the
>> engine API, the error occurs
>>
>>
>> I think that I have all the required files in the right place, I
>> followed the instructions of the following url
>> " http://www.eclipse.org/birt/index.php?page=build/install.htm l"
>>
>> iText.jar is placed in "plugins\org.eclipse.birt.report.engine.pdf\lib"
>>
>> In my application, the engine directory points to the viewer root
>> directory. I have also tried using the 'Report Engine' directory of the
>> runtime distribution, with similar results.
>>
>> In attachment I send a java file that i think that could be the problem...
>>
>> I'll wait for your answer..
>> Thanks
>>
>> Humberto Carvalho
>>
>>
>>
>>
>>
>>
>> Jason Weathersby wrote:
>>> Can you upload the Stacktrace?
>>> Also verify that you have the other required files under the proper
>>> location, like the iText jar file.
>>>
>>> Jason Weathersby
>>> BIRT PMC
>>>
>>>
>>> "Humberto Carvalho" <carvalho.humberto@gmail.com> wrote in message
>>> news:51ff09d618a253c7540a8c0018bd62e5$1@www.eclipse.org...
>>>> Hello,
>>>>
>>>> i need some help.
>>>>
>>>> I'm trying to generate a pdf file, but the following error occurs.
>>>>
>>>>
>>>> SEVERE: Report engine can not create pdf emitter.
>>>> Report C:/Program Files/Apache/Tomcat
>>>> 5.5/webapps/BI/Documentos/estat.rptdesign
>>>> run failed.
>>>> org.eclipse.birt.report.engine.api.EngineException: Report engine fails
>>>> to
>>>> creat
>>>> e extension to handle this request.
>>>>
>>>> The software that i'm using are:
>>>> Windows XP SP2
>>>> Eclipse 3.1.1
>>>> BIRT 2.0.0
>>>> EMF 2.1.*
>>>> GEF 3.1.1
>>>>
>>>> I hope that someone can help me.
>>>>
>>>> Thanks
>>>>
>>>
>>
>
>
> ------------------------------------------------------------ --------------------
>
>
>> package pt.almedina.reports;
>>
>> /*
>> * Example command-line utility to generate BIRT reports. Shows the basics
>> * of integrating the BIRT report engine into a simple Java application.
>> */
>>
>>
>> import java.util.Collection;
>> import java.util.HashMap;
>> import java.util.Iterator;
>> import java.util.Map;
>>
>>
>>
>> import org.eclipse.birt.report.engine.api.EngineConfig;
>> import org.eclipse.birt.report.engine.api.EngineConstants;
>> import org.eclipse.birt.report.engine.api.EngineException;
>> import org.eclipse.birt.report.engine.api.HTMLCompleteImageHandler;
>> import org.eclipse.birt.report.engine.api.HTMLEmitterConfig;
>> import org.eclipse.birt.report.engine.api.HTMLRenderContext;
>> import org.eclipse.birt.report.engine.api.HTMLRenderOption;
>> import org.eclipse.birt.report.engine.api.IGetParameterDefinitionTa sk;
>> import org.eclipse.birt.report.engine.api.IHTMLActionHandler;
>> import org.eclipse.birt.report.engine.api.IParameterDefnBase;
>> import org.eclipse.birt.report.engine.api.IParameterGroupDefn;
>> import org.eclipse.birt.report.engine.api.IReportRunnable;
>> import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
>> import org.eclipse.birt.report.engine.api.IScalarParameterDefn;
>> import org.eclipse.birt.report.engine.api.ReportEngine;
>> import org.eclipse.birt.report.engine.api.ReportParameterConverter;
>>
>>
>> /**
>> * Runs a BIRT report and writes the output to a directory.
>> *
>> * RunReport report-name -[h|p] [-i] param=value
>> *
>> * -h HTML (default)
>> * -p PDF
>> * -i Display report info.
>> * param=value Set parameter "param" to the value "value".
>> */
>>
>> public class Conversor
>> {
>>
>> static String REPORTENGINE_URL = "C:/Program Files/Apache/Tomcat
>> 5.5/webapps/Viewer";//c:/reportengine";
>> static String IMAGE_URL = "C:/Program Files/Apache/Tomcat
>> 5.5/webapps/BI/Documentos";
>>
>> // Command-line main to parse arguments described above.
>>
>> public static void main(String[] args) throws EngineException
>> {
>>
>> int i = 0;
>> if ( i >= args.length )
>> {
>> System.out.println( "Nao foi especificado qualquer relatorio" );
>> return;
>> }
>> String reportName = args[i++];
>> String format = null;
>> boolean showInfo = false;
>>
>> // Stoare parameter values into a hash map to later pass to the
>> // BIRT report engine.
>>
>> HashMap params = new HashMap( );
>> for ( ; i < args.length; i++ )
>> {
>> if ( args[i].charAt(0) == '-' )
>> {
>> char flag = Character.toLowerCase( args[i].charAt( 1 ) );
>> if ( flag == 'p' )
>> {
>> format = HTMLRenderOption.OUTPUT_FORMAT_PDF;
>> }
>> else if ( flag == 'h' )
>> {
>> format = HTMLRenderOption.OUTPUT_FORMAT_HTML;
>> }
>> else if ( flag == 'i' )
>> {
>> showInfo = true;
>> }
>> else
>> {
>> usage( );
>> return;
>> }
>> }
>> else
>> {
>>
>> // Get a parameter value. Note, this example code only works
>> // for string parameters. If you have date or number parameters,
>> // your application should parse them, then put the corresponding
>> // objects into the hash map.
>>
>> String arg = args[i];
>> int posn = arg.indexOf( '=' );
>> if ( posn == -1 )
>> {
>> usage( );
>> return;
>> }
>> String param = arg.substring( 0, posn );
>> String value = arg.substring( posn + 1 );
>> Object put = params.put( param, value );
>>
>> }
>> }
>>
>>
>> run( reportName, params, format, showInfo );
>>
>> }
>>
>> public static void usage( )
>> {
>> System.out.println( "Sintaxe:\n java RunReport rptName [-h|p]\n
>> param=value ..." );
>> }
>>
>> // Example function to run a report given the report name, parameters and
>> // output type. The output is put into a file in the same directory as the
>> // report itself.
>>
>> public static void run( String name, HashMap params,
>> String format, boolean showInfo ) throws EngineException
>> {
>> // The EngineConfig is used to set up engine-wide configuration
>> // information.
>>
>> EngineConfig config = new EngineConfig( );
>>
>> // The Engine home is the location of the BIRT engine runtime.
>> // M3 Note: Use the report engine installed as part of the BIRT web app
>> // used to preview reports. Alter this path to the location of your
>> // Eclipse installation.
>>
>> config.setEngineHome(REPORTENGINE_URL);
>>
>> // HTML reports can have embedded images or charts. Set up the
>> configuration
>> // required to write these into a directory in the output directory.
>> // The HTMLCompleteImageHandler is one provided by BIRT for this purpose.
>> // Your application can create a customized version to provide alternative
>> // ways to handle images.
>>
>> HTMLEmitterConfig hc = new HTMLEmitterConfig( );
>>
>>
>> HTMLCompleteImageHandler imageHandler = new HTMLCompleteImageHandler( );
>> hc.setImageHandler( imageHandler );
>> config.setEmitterConfiguration( HTMLRenderOption.OUTPUT_FORMAT_HTML, hc );
>>
>> // Create the report engine itself. This engine can be used to run
>> // multiple reports.
>>
>> ReportEngine engine = new ReportEngine( config );
>>
>> // Open the report design.
>>
>> IReportRunnable report = null;
>>
>>
>> try {
>> report = engine.openReportDesign( name );
>> } catch ( EngineException e) {
>>
>> System.out.println("ERRO: PT.ALMEDINA.REPORTS.CONVERSOR.RUN\n
>> EXCEPTION: "+e);
>>
>> }
>>
>>
>> if ( showInfo )
>> {
>> showReportInfo( engine, report );
>> }
>>
>> // Create a task to run the report and convert the output to HTML
>> // or PDF.
>>
>> if ( format != null )
>> {
>>
>> parseParams( engine, report, params );
>>
>> IRunAndRenderTask task = engine.createRunAndRenderTask( report );
>> /*
>> //HTMLRenderContext renderContext = new HTMLRenderContext();
>> //renderContext.setImageDirectory(IMAGE_URL);
>>
>> HTMLRenderContext renderContext = new HTMLRenderContext( );
>> renderContext.setImageDirectory( IMAGE_URL ); //"image"//$NON-NLS-1$
>> HashMap appContext = new HashMap( );
>> appContext.put("PDF_RENDER_CONTEXT",
>> renderContext );//EngineConstants.APPCONTEXT_PDF_RENDER_CONTEXT
>> task.setAppContext( appContext );
>>
>> //task.setContext((Map) renderContext);
>> */
>> HTMLRenderOption options = new HTMLRenderOption( );
>> options.setOutputFormat( format );
>> String output = name.replaceFirst( ".rptdesign", "." + format );
>> options.setOutputFileName( output );
>> task.setRenderOption( options );
>> String str = params.toString();
>>
>>
>> //task.setParameterValues( params );
>>
>> // Run the report.
>>
>> try
>> {
>> task.run( );
>> }
>> catch (EngineException e)
>> {
>> }
>> }
>>
>> engine.destroy( );
>> }
>>
>> // Display properties of the report and the list of report parameters.
>>
>> static void showReportInfo( ReportEngine engine, IReportRunnable report )
>> {
>> // Display some of the general report properties.
>> // See the ROM Design specification for a list of properties.
>>
>> System.out.print( "Report Name: " + report.getReportName() +
>> "\nTitle: " + report.getProperty( "title" ) +
>> "\nComments: " + report.getProperty( "comments" ) +
>> "\nDescription: " + report.getProperty( "description" ) +
>> "\nAuthor: " + report.getProperty( "author" ) +
>> "\nCreated By: " + report.getProperty( "createdBy" ) +
>> "\n" );
>>
>> // Display the list of report parameters with their groups.
>> // Parameters defined outside a group appear inside a default, unnamed
>> // group.
>>
>> IGetParameterDefinitionTask task =
>> engine.createGetParameterDefinitionTask( report );
>> Collection params = task.getParameterDefns( true );
>> if ( params.isEmpty() )
>> {
>> System.out.print( "This report has no parameters.\n" );
>> return;
>> }
>>
>> Iterator iter = params.iterator( );
>> while ( iter.hasNext( ) )
>> {
>> IParameterDefnBase param = (IParameterDefnBase) iter.next( );
>> if ( param instanceof IParameterGroupDefn )
>> {
>> IParameterGroupDefn group = (IParameterGroupDefn) param;
>> System.out.println( "Parameter Group: " + group.getDisplayName( ) );
>> Iterator i2 = group.getContents( ).iterator( );
>> while ( iter.hasNext( ) )
>> {
>> IScalarParameterDefn member = (IScalarParameterDefn) i2.next( );
>> showParam( task, member, " " );
>> }
>> }
>> else
>> showParam( task, param, "" );
>> }
>> }
>>
>> // Show information for one parameter.
>> // Release 1 supports only scalar (single-value) parameters.
>>
>> static void showParam( IGetParameterDefinitionTask task,
>> IParameterDefnBase defn,
>> String prefix )
>> {
>> IScalarParameterDefn param = (IScalarParameterDefn) defn;
>> System.out.println( prefix + "Parameter: " + param.getName( ) );
>> System.out.println( prefix + " Display Name: " +
>> param.getDisplayName( ) );
>> System.out.println( prefix + " Type: " + param.getDataType( ) );
>> System.out.print( prefix + " Default Value: " );
>>
>> // The default value is an expression. Evaluate it.
>>
>> Object value = task.getDefaultValue( param );
>> System.out.println( value == null ? "none" : value.toString( ) );
>> }
>>
>> static void parseParams( ReportEngine engine, IReportRunnable report,
>> HashMap values )
>> {
>>
>> System.out.println("ENTREI!!! VALORES: "+values);
>> if ( values.isEmpty( ) )
>> return;
>>
>> IGetParameterDefinitionTask task =
>> engine.createGetParameterDefinitionTask( report );
>> Collection params = task.getParameterDefns( false );
>> Iterator iter = values.keySet( ).iterator( );
>> System.out.println("VOU ENTRAR NO WHILE!!!");
>> int xxx = 1;
>> while ( iter.hasNext( ) )
>> {
>> System.out.println("WHILE: "+xxx);
>> String name = (String) iter.next( );
>>
>> IScalarParameterDefn found = null;
>> Iterator i2 = params.iterator( );
>> while ( i2.hasNext( ) )
>> {
>> IParameterDefnBase param = (IParameterDefnBase) i2.next( );
>> if ( param instanceof IParameterGroupDefn )
>> continue;
>> if ( param.getName( ).equals( name ) )
>> {
>> found = (IScalarParameterDefn) param;
>> break;
>> }
>> }
>> if ( found == null )
>> {
>> System.err.println( "Parameter " + name + " not found in the report." );
>> continue;
>> }
>> String value = (String) values.get( name );
>> // ReportParameterConverter cfgConverter = new ReportParameterConverter(
>> "", Locale.getDefault( ) );
>> // Object obj = cfgConverter.parse( value, found.getDataType( ) );
>> // values.put( name, obj );
>> values.put( name, value );
>> }
>> }
>> }
>
>
Re: SEVERE: Report engine can not create pdf emitter [message #111051 is a reply to message #111037] Wed, 18 January 2006 15:48 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Humberto,

What version of BIRT are you using?
Are you getting a stack trace?
Also are you using Eclipse or something like Ant to build your class?
Thanks

Jason

"HC" <carvalho.humberto@almedina.net> wrote in message
news:43CE8A3E.60607@almedina.net...
> Hello,
>
> I've tried what you said in your last e-mail, but the result was the same.
>
> In my last e-mail I didn't told you that if I try to generate a pdf file
> or a html file in either cases the error occurs, and not only when I try
> to generate a pdf file.
>
> One thing that I saw comparing your list files with my Report Engine
> files, is that model.jar in your Report Engine it's bigger than mine. The
> other files i think that are identical.
>
> I think that this isn't the problem, but I don't know.
>
> Thanks
>
> Humberto Carvalho
>
> Jason Weathersby wrote:
>> Humberto,
>>
>> I just tried your sample and it worked fine.
>> I set my home to "c:/myruntime/report engine".
>> Below is a directory listing of the report engine directory. Notice I
>> added iText.
>>
>> 12/31/2005 11:50a 77,586 birt-oda.jar
>> 12/31/2005 11:50a 956,273 chart-engine.jar
>> 12/31/2005 11:50a 30,117 commons-cli-1.0.jar
>> 12/31/2005 11:50a 37,754 commons-codec-1.3.jar
>> 12/31/2005 11:50a 132,596 core.jar
>> 12/31/2005 11:50a 569,702 dte.jar
>> 12/31/2005 11:50a 870,507 engine.jar
>> 12/31/2005 11:50a 71,513 flute.jar
>> 11/29/2005 05:41p 1,145,105 itext-1.3.jar
>> 12/31/2005 11:50a 699,081 js.jar
>> 01/15/2006 11:33p 1,552 libs.txt
>> 12/31/2005 11:50a 3,316,129 model.jar
>> 12/31/2005 11:50a 80,541 oda.jar
>> 12/31/2005 11:50a 69,367 odaconsumer-helper.jar
>> 12/31/2005 11:50a 137,063 org.eclipse.emf.common_2.1.0.jar
>> 12/31/2005 11:50a 144,460
>> org.eclipse.emf.ecore.xmi_2.1.0.jar
>> 12/31/2005 11:50a 639,778 org.eclipse.emf.ecore_2.1.0.jar
>> 01/04/2006 04:48p <DIR> plugins
>> 12/31/2005 11:50a 14,526 sac.jar
>> 01/04/2006 04:48p <DIR> samples
>> 12/31/2005 11:50a 43,275 scriptapi.jar
>> 01/18/2006 11:00a 0 test.txt
>> 12/31/2005 11:50a 161,563 Tidy.jar
>>
>> Jason
>>
>> "HC" <carvalho.humberto@almedina.net> wrote in message
>> news:43CE2F39.9030104@almedina.net...
>>> Thanks for your help,
>>>
>>> First I have to say that i'm using a Birt viewer and the Birt engine
>>> API.
>>>
>>> If i use the viewer engine and then choose to print to pdf, this works,
>>> but when i try to generate a pdf file from a rptdesign file using the
>>> engine API, the error occurs
>>>
>>>
>>> I think that I have all the required files in the right place, I
>>> followed the instructions of the following url
>>> " http://www.eclipse.org/birt/index.php?page=build/install.htm l"
>>>
>>> iText.jar is placed in "plugins\org.eclipse.birt.report.engine.pdf\lib"
>>>
>>> In my application, the engine directory points to the viewer root
>>> directory. I have also tried using the 'Report Engine' directory of the
>>> runtime distribution, with similar results.
>>>
>>> In attachment I send a java file that i think that could be the
>>> problem...
>>>
>>> I'll wait for your answer..
>>> Thanks
>>>
>>> Humberto Carvalho
>>>
>>>
>>>
>>>
>>>
>>>
>>> Jason Weathersby wrote:
>>>> Can you upload the Stacktrace?
>>>> Also verify that you have the other required files under the proper
>>>> location, like the iText jar file.
>>>>
>>>> Jason Weathersby
>>>> BIRT PMC
>>>>
>>>>
>>>> "Humberto Carvalho" <carvalho.humberto@gmail.com> wrote in message
>>>> news:51ff09d618a253c7540a8c0018bd62e5$1@www.eclipse.org...
>>>>> Hello,
>>>>>
>>>>> i need some help.
>>>>>
>>>>> I'm trying to generate a pdf file, but the following error occurs.
>>>>>
>>>>>
>>>>> SEVERE: Report engine can not create pdf emitter.
>>>>> Report C:/Program Files/Apache/Tomcat
>>>>> 5.5/webapps/BI/Documentos/estat.rptdesign
>>>>> run failed.
>>>>> org.eclipse.birt.report.engine.api.EngineException: Report engine
>>>>> fails to
>>>>> creat
>>>>> e extension to handle this request.
>>>>>
>>>>> The software that i'm using are:
>>>>> Windows XP SP2
>>>>> Eclipse 3.1.1
>>>>> BIRT 2.0.0
>>>>> EMF 2.1.*
>>>>> GEF 3.1.1
>>>>>
>>>>> I hope that someone can help me.
>>>>>
>>>>> Thanks
>>>>>
>>>>
>>>
>>
>>
>> ------------------------------------------------------------ --------------------
>>
>>
>>> package pt.almedina.reports;
>>>
>>> /*
>>> * Example command-line utility to generate BIRT reports. Shows the
>>> basics
>>> * of integrating the BIRT report engine into a simple Java application.
>>> */
>>>
>>>
>>> import java.util.Collection;
>>> import java.util.HashMap;
>>> import java.util.Iterator;
>>> import java.util.Map;
>>>
>>>
>>>
>>> import org.eclipse.birt.report.engine.api.EngineConfig;
>>> import org.eclipse.birt.report.engine.api.EngineConstants;
>>> import org.eclipse.birt.report.engine.api.EngineException;
>>> import org.eclipse.birt.report.engine.api.HTMLCompleteImageHandler;
>>> import org.eclipse.birt.report.engine.api.HTMLEmitterConfig;
>>> import org.eclipse.birt.report.engine.api.HTMLRenderContext;
>>> import org.eclipse.birt.report.engine.api.HTMLRenderOption;
>>> import org.eclipse.birt.report.engine.api.IGetParameterDefinitionTa sk;
>>> import org.eclipse.birt.report.engine.api.IHTMLActionHandler;
>>> import org.eclipse.birt.report.engine.api.IParameterDefnBase;
>>> import org.eclipse.birt.report.engine.api.IParameterGroupDefn;
>>> import org.eclipse.birt.report.engine.api.IReportRunnable;
>>> import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
>>> import org.eclipse.birt.report.engine.api.IScalarParameterDefn;
>>> import org.eclipse.birt.report.engine.api.ReportEngine;
>>> import org.eclipse.birt.report.engine.api.ReportParameterConverter;
>>>
>>>
>>> /**
>>> * Runs a BIRT report and writes the output to a directory.
>>> *
>>> * RunReport report-name -[h|p] [-i] param=value
>>> *
>>> * -h HTML (default)
>>> * -p PDF
>>> * -i Display report info.
>>> * param=value Set parameter "param" to the value "value".
>>> */
>>>
>>> public class Conversor
>>> {
>>>
>>> static String REPORTENGINE_URL = "C:/Program Files/Apache/Tomcat
>>> 5.5/webapps/Viewer";//c:/reportengine";
>>> static String IMAGE_URL = "C:/Program Files/Apache/Tomcat
>>> 5.5/webapps/BI/Documentos";
>>>
>>> // Command-line main to parse arguments described above.
>>>
>>> public static void main(String[] args) throws EngineException
>>> {
>>>
>>> int i = 0;
>>> if ( i >= args.length )
>>> {
>>> System.out.println( "Nao foi especificado qualquer relatorio" );
>>> return;
>>> }
>>> String reportName = args[i++];
>>> String format = null;
>>> boolean showInfo = false;
>>>
>>> // Stoare parameter values into a hash map to later pass to the
>>> // BIRT report engine.
>>>
>>> HashMap params = new HashMap( );
>>> for ( ; i < args.length; i++ )
>>> {
>>> if ( args[i].charAt(0) == '-' )
>>> {
>>> char flag = Character.toLowerCase( args[i].charAt( 1 ) );
>>> if ( flag == 'p' )
>>> {
>>> format = HTMLRenderOption.OUTPUT_FORMAT_PDF;
>>> }
>>> else if ( flag == 'h' )
>>> {
>>> format = HTMLRenderOption.OUTPUT_FORMAT_HTML;
>>> }
>>> else if ( flag == 'i' )
>>> {
>>> showInfo = true;
>>> }
>>> else
>>> {
>>> usage( );
>>> return;
>>> }
>>> }
>>> else
>>> {
>>>
>>> // Get a parameter value. Note, this example code only works
>>> // for string parameters. If you have date or number parameters,
>>> // your application should parse them, then put the corresponding
>>> // objects into the hash map.
>>>
>>> String arg = args[i];
>>> int posn = arg.indexOf( '=' );
>>> if ( posn == -1 )
>>> {
>>> usage( );
>>> return;
>>> }
>>> String param = arg.substring( 0, posn );
>>> String value = arg.substring( posn + 1 );
>>> Object put = params.put( param, value );
>>>
>>> }
>>> }
>>>
>>>
>>> run( reportName, params, format, showInfo );
>>>
>>> }
>>>
>>> public static void usage( )
>>> {
>>> System.out.println( "Sintaxe:\n java RunReport rptName [-h|p]\n
>>> param=value ..." );
>>> }
>>>
>>> // Example function to run a report given the report name, parameters
>>> and
>>> // output type. The output is put into a file in the same directory as
>>> the
>>> // report itself.
>>>
>>> public static void run( String name, HashMap params,
>>> String format, boolean showInfo ) throws EngineException
>>> {
>>> // The EngineConfig is used to set up engine-wide configuration
>>> // information.
>>>
>>> EngineConfig config = new EngineConfig( );
>>>
>>> // The Engine home is the location of the BIRT engine runtime.
>>> // M3 Note: Use the report engine installed as part of the BIRT web app
>>> // used to preview reports. Alter this path to the location of your
>>> // Eclipse installation.
>>>
>>> config.setEngineHome(REPORTENGINE_URL);
>>>
>>> // HTML reports can have embedded images or charts. Set up the
>>> configuration
>>> // required to write these into a directory in the output directory.
>>> // The HTMLCompleteImageHandler is one provided by BIRT for this
>>> purpose.
>>> // Your application can create a customized version to provide
>>> alternative
>>> // ways to handle images.
>>>
>>> HTMLEmitterConfig hc = new HTMLEmitterConfig( );
>>>
>>>
>>> HTMLCompleteImageHandler imageHandler = new HTMLCompleteImageHandler( );
>>> hc.setImageHandler( imageHandler );
>>> config.setEmitterConfiguration( HTMLRenderOption.OUTPUT_FORMAT_HTML,
>>> hc );
>>>
>>> // Create the report engine itself. This engine can be used to
>>> run
>>> // multiple reports.
>>>
>>> ReportEngine engine = new ReportEngine( config );
>>>
>>> // Open the report design.
>>>
>>> IReportRunnable report = null;
>>>
>>>
>>> try {
>>> report = engine.openReportDesign( name );
>>> } catch ( EngineException e) {
>>>
>>> System.out.println("ERRO: PT.ALMEDINA.REPORTS.CONVERSOR.RUN\n
>>> EXCEPTION: "+e);
>>>
>>> }
>>>
>>>
>>> if ( showInfo )
>>> {
>>> showReportInfo( engine, report );
>>> }
>>>
>>> // Create a task to run the report and convert the output to HTML
>>> // or PDF.
>>>
>>> if ( format != null )
>>> {
>>>
>>> parseParams( engine, report, params );
>>>
>>> IRunAndRenderTask task = engine.createRunAndRenderTask( report );
>>> /*
>>> //HTMLRenderContext renderContext = new HTMLRenderContext();
>>> //renderContext.setImageDirectory(IMAGE_URL);
>>>
>>> HTMLRenderContext renderContext = new HTMLRenderContext( );
>>> renderContext.setImageDirectory( IMAGE_URL ); //"image"//$NON-NLS-1$
>>> HashMap appContext = new HashMap( );
>>> appContext.put("PDF_RENDER_CONTEXT",
>>> renderContext );//EngineConstants.APPCONTEXT_PDF_RENDER_CONTEXT
>>> task.setAppContext( appContext );
>>>
>>> //task.setContext((Map) renderContext);
>>> */
>>> HTMLRenderOption options = new HTMLRenderOption( );
>>> options.setOutputFormat( format );
>>> String output = name.replaceFirst( ".rptdesign", "." + format );
>>> options.setOutputFileName( output );
>>> task.setRenderOption( options );
>>> String str = params.toString();
>>>
>>>
>>> //task.setParameterValues( params );
>>>
>>> // Run the report.
>>>
>>> try
>>> {
>>> task.run( );
>>> }
>>> catch (EngineException e)
>>> {
>>> }
>>> }
>>>
>>> engine.destroy( );
>>> }
>>>
>>> // Display properties of the report and the list of report parameters.
>>>
>>> static void showReportInfo( ReportEngine engine, IReportRunnable
>>> report )
>>> {
>>> // Display some of the general report properties.
>>> // See the ROM Design specification for a list of properties.
>>>
>>> System.out.print( "Report Name: " + report.getReportName() +
>>> "\nTitle: " + report.getProperty( "title" ) +
>>> "\nComments: " + report.getProperty( "comments" ) +
>>> "\nDescription: " + report.getProperty( "description" ) +
>>> "\nAuthor: " + report.getProperty( "author" ) +
>>> "\nCreated By: " + report.getProperty( "createdBy" ) +
>>> "\n" );
>>>
>>> // Display the list of report parameters with their groups.
>>> // Parameters defined outside a group appear inside a default, unnamed
>>> // group.
>>>
>>> IGetParameterDefinitionTask task =
>>> engine.createGetParameterDefinitionTask( report );
>>> Collection params = task.getParameterDefns( true );
>>> if ( params.isEmpty() )
>>> {
>>> System.out.print( "This report has no parameters.\n" );
>>> return;
>>> }
>>>
>>> Iterator iter = params.iterator( );
>>> while ( iter.hasNext( ) )
>>> {
>>> IParameterDefnBase param = (IParameterDefnBase) iter.next( );
>>> if ( param instanceof IParameterGroupDefn )
>>> {
>>> IParameterGroupDefn group = (IParameterGroupDefn) param;
>>> System.out.println( "Parameter Group: " + group.getDisplayName( ) );
>>> Iterator i2 = group.getContents( ).iterator( );
>>> while ( iter.hasNext( ) )
>>> {
>>> IScalarParameterDefn member = (IScalarParameterDefn) i2.next( );
>>> showParam( task, member, " " );
>>> }
>>> }
>>> else
>>> showParam( task, param, "" );
>>> }
>>> }
>>>
>>> // Show information for one parameter.
>>> // Release 1 supports only scalar (single-value) parameters.
>>>
>>> static void showParam( IGetParameterDefinitionTask task,
>>> IParameterDefnBase defn,
>>> String prefix )
>>> {
>>> IScalarParameterDefn param = (IScalarParameterDefn) defn;
>>> System.out.println( prefix + "Parameter: " + param.getName( ) );
>>> System.out.println( prefix + " Display Name: " +
>>> param.getDisplayName( ) );
>>> System.out.println( prefix + " Type: " + param.getDataType( ) );
>>> System.out.print( prefix + " Default Value: " );
>>>
>>> // The default value is an expression. Evaluate it.
>>>
>>> Object value = task.getDefaultValue( param );
>>> System.out.println( value == null ? "none" : value.toString( ) );
>>> }
>>>
>>> static void parseParams( ReportEngine engine, IReportRunnable report,
>>> HashMap values )
>>> {
>>>
>>> System.out.println("ENTREI!!! VALORES: "+values);
>>> if ( values.isEmpty( ) )
>>> return;
>>>
>>> IGetParameterDefinitionTask task =
>>> engine.createGetParameterDefinitionTask( report );
>>> Collection params = task.getParameterDefns( false );
>>> Iterator iter = values.keySet( ).iterator( );
>>> System.out.println("VOU ENTRAR NO WHILE!!!");
>>> int xxx = 1;
>>> while ( iter.hasNext( ) )
>>> {
>>> System.out.println("WHILE: "+xxx);
>>> String name = (String) iter.next( );
>>>
>>> IScalarParameterDefn found = null;
>>> Iterator i2 = params.iterator( );
>>> while ( i2.hasNext( ) )
>>> {
>>> IParameterDefnBase param = (IParameterDefnBase) i2.next( );
>>> if ( param instanceof IParameterGroupDefn )
>>> continue;
>>> if ( param.getName( ).equals( name ) )
>>> {
>>> found = (IScalarParameterDefn) param;
>>> break;
>>> }
>>> }
>>> if ( found == null )
>>> {
>>> System.err.println( "Parameter " + name + " not found in the report." );
>>> continue;
>>> }
>>> String value = (String) values.get( name );
>>> // ReportParameterConverter cfgConverter = new
>>> ReportParameterConverter( "", Locale.getDefault( ) );
>>> // Object obj = cfgConverter.parse( value, found.getDataType( ) );
>>> // values.put( name, obj );
>>> values.put( name, value );
>>> }
>>> }
>>> }
>>
Re: SEVERE: Report engine can not create pdf emitter [message #111469 is a reply to message #111051] Thu, 19 January 2006 11:25 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: carvalho.humberto.almedina.net

This is a multi-part message in MIME format.
--------------050008050901040404000204
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Jason,

I'm using:
Windows XP SP2
Tomcat 5.5.12
Eclipse 3.1.1
BIRT 2.0.0
EMF 2.1.*
GEF 3.1.1

The Report Engine and the Viewer that I use came in the
birt-runtime-2.0RC1.zip from BIRT download page.

In attachment I send you a zip file with 2 files that I think you asked for.

Thanks for your help

Humberto


Jason Weathersby wrote:
> Humberto,
>
> What version of BIRT are you using?
> Are you getting a stack trace?
> Also are you using Eclipse or something like Ant to build your class?
> Thanks
>
> Jason
>
> "HC" <carvalho.humberto@almedina.net> wrote in message
> news:43CE8A3E.60607@almedina.net...
>> Hello,
>>
>> I've tried what you said in your last e-mail, but the result was the same.
>>
>> In my last e-mail I didn't told you that if I try to generate a pdf file
>> or a html file in either cases the error occurs, and not only when I try
>> to generate a pdf file.
>>
>> One thing that I saw comparing your list files with my Report Engine
>> files, is that model.jar in your Report Engine it's bigger than mine. The
>> other files i think that are identical.
>>
>> I think that this isn't the problem, but I don't know.
>>
>> Thanks
>>
>> Humberto Carvalho
>>
>> Jason Weathersby wrote:
>>> Humberto,
>>>
>>> I just tried your sample and it worked fine.
>>> I set my home to "c:/myruntime/report engine".
>>> Below is a directory listing of the report engine directory. Notice I
>>> added iText.
>>>
>>> 12/31/2005 11:50a 77,586 birt-oda.jar
>>> 12/31/2005 11:50a 956,273 chart-engine.jar
>>> 12/31/2005 11:50a 30,117 commons-cli-1.0.jar
>>> 12/31/2005 11:50a 37,754 commons-codec-1.3.jar
>>> 12/31/2005 11:50a 132,596 core.jar
>>> 12/31/2005 11:50a 569,702 dte.jar
>>> 12/31/2005 11:50a 870,507 engine.jar
>>> 12/31/2005 11:50a 71,513 flute.jar
>>> 11/29/2005 05:41p 1,145,105 itext-1.3.jar
>>> 12/31/2005 11:50a 699,081 js.jar
>>> 01/15/2006 11:33p 1,552 libs.txt
>>> 12/31/2005 11:50a 3,316,129 model.jar
>>> 12/31/2005 11:50a 80,541 oda.jar
>>> 12/31/2005 11:50a 69,367 odaconsumer-helper.jar
>>> 12/31/2005 11:50a 137,063 org.eclipse.emf.common_2.1.0.jar
>>> 12/31/2005 11:50a 144,460
>>> org.eclipse.emf.ecore.xmi_2.1.0.jar
>>> 12/31/2005 11:50a 639,778 org.eclipse.emf.ecore_2.1.0.jar
>>> 01/04/2006 04:48p <DIR> plugins
>>> 12/31/2005 11:50a 14,526 sac.jar
>>> 01/04/2006 04:48p <DIR> samples
>>> 12/31/2005 11:50a 43,275 scriptapi.jar
>>> 01/18/2006 11:00a 0 test.txt
>>> 12/31/2005 11:50a 161,563 Tidy.jar
>>>
>>> Jason
>>>
>>> "HC" <carvalho.humberto@almedina.net> wrote in message
>>> news:43CE2F39.9030104@almedina.net...
>>>> Thanks for your help,
>>>>
>>>> First I have to say that i'm using a Birt viewer and the Birt engine
>>>> API.
>>>>
>>>> If i use the viewer engine and then choose to print to pdf, this works,
>>>> but when i try to generate a pdf file from a rptdesign file using the
>>>> engine API, the error occurs
>>>>
>>>>
>>>> I think that I have all the required files in the right place, I
>>>> followed the instructions of the following url
>>>> " http://www.eclipse.org/birt/index.php?page=build/install.htm l"
>>>>
>>>> iText.jar is placed in "plugins\org.eclipse.birt.report.engine.pdf\lib"
>>>>
>>>> In my application, the engine directory points to the viewer root
>>>> directory. I have also tried using the 'Report Engine' directory of the
>>>> runtime distribution, with similar results.
>>>>
>>>> In attachment I send a java file that i think that could be the
>>>> problem...
>>>>
>>>> I'll wait for your answer..
>>>> Thanks
>>>>
>>>> Humberto Carvalho
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Jason Weathersby wrote:
>>>>> Can you upload the Stacktrace?
>>>>> Also verify that you have the other required files under the proper
>>>>> location, like the iText jar file.
>>>>>
>>>>> Jason Weathersby
>>>>> BIRT PMC
>>>>>
>>>>>
>>>>> "Humberto Carvalho" <carvalho.humberto@gmail.com> wrote in message
>>>>> news:51ff09d618a253c7540a8c0018bd62e5$1@www.eclipse.org...
>>>>>> Hello,
>>>>>>
>>>>>> i need some help.
>>>>>>
>>>>>> I'm trying to generate a pdf file, but the following error occurs.
>>>>>>
>>>>>>
>>>>>> SEVERE: Report engine can not create pdf emitter.
>>>>>> Report C:/Program Files/Apache/Tomcat
>>>>>> 5.5/webapps/BI/Documentos/estat.rptdesign
>>>>>> run failed.
>>>>>> org.eclipse.birt.report.engine.api.EngineException: Report engine
>>>>>> fails to
>>>>>> creat
>>>>>> e extension to handle this request.
>>>>>>
>>>>>> The software that i'm using are:
>>>>>> Windows XP SP2
>>>>>> Eclipse 3.1.1
>>>>>> BIRT 2.0.0
>>>>>> EMF 2.1.*
>>>>>> GEF 3.1.1
>>>>>>
>>>>>> I hope that someone can help me.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>
>>> ------------------------------------------------------------ --------------------
>>>
>>>
>>>> package pt.almedina.reports;
>>>>
>>>> /*
>>>> * Example command-line utility to generate BIRT reports. Shows the
>>>> basics
>>>> * of integrating the BIRT report engine into a simple Java application.
>>>> */
>>>>
>>>>
>>>> import java.util.Collection;
>>>> import java.util.HashMap;
>>>> import java.util.Iterator;
>>>> import java.util.Map;
>>>>
>>>>
>>>>
>>>> import org.eclipse.birt.report.engine.api.EngineConfig;
>>>> import org.eclipse.birt.report.engine.api.EngineConstants;
>>>> import org.eclipse.birt.report.engine.api.EngineException;
>>>> import org.eclipse.birt.report.engine.api.HTMLCompleteImageHandler;
>>>> import org.eclipse.birt.report.engine.api.HTMLEmitterConfig;
>>>> import org.eclipse.birt.report.engine.api.HTMLRenderContext;
>>>> import org.eclipse.birt.report.engine.api.HTMLRenderOption;
>>>> import org.eclipse.birt.report.engine.api.IGetParameterDefinitionTa sk;
>>>> import org.eclipse.birt.report.engine.api.IHTMLActionHandler;
>>>> import org.eclipse.birt.report.engine.api.IParameterDefnBase;
>>>> import org.eclipse.birt.report.engine.api.IParameterGroupDefn;
>>>> import org.eclipse.birt.report.engine.api.IReportRunnable;
>>>> import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
>>>> import org.eclipse.birt.report.engine.api.IScalarParameterDefn;
>>>> import org.eclipse.birt.report.engine.api.ReportEngine;
>>>> import org.eclipse.birt.report.engine.api.ReportParameterConverter;
>>>>
>>>>
>>>> /**
>>>> * Runs a BIRT report and writes the output to a directory.
>>>> *
>>>> * RunReport report-name -[h|p] [-i] param=value
>>>> *
>>>> * -h HTML (default)
>>>> * -p PDF
>>>> * -i Display report info.
>>>> * param=value Set parameter "param" to the value "value".
>>>> */
>>>>
>>>> public class Conversor
>>>> {
>>>>
>>>> static String REPORTENGINE_URL = "C:/Program Files/Apache/Tomcat
>>>> 5.5/webapps/Viewer";//c:/reportengine";
>>>> static String IMAGE_URL = "C:/Program Files/Apache/Tomcat
>>>> 5.5/webapps/BI/Documentos";
>>>>
>>>> // Command-line main to parse arguments described above.
>>>>
>>>> public static void main(String[] args) throws EngineException
>>>> {
>>>>
>>>> int i = 0;
>>>> if ( i >= args.length )
>>>> {
>>>> System.out.println( "Nao foi especificado qualquer relatorio" );
>>>> return;
>>>> }
>>>> String reportName = args[i++];
>>>> String format = null;
>>>> boolean showInfo = false;
>>>>
>>>> // Stoare parameter values into a hash map to later pass to the
>>>> // BIRT report engine.
>>>>
>>>> HashMap params = new HashMap( );
>>>> for ( ; i < args.length; i++ )
>>>> {
>>>> if ( args[i].charAt(0) == '-' )
>>>> {
>>>> char flag = Character.toLowerCase( args[i].charAt( 1 ) );
>>>> if ( flag == 'p' )
>>>> {
>>>> format = HTMLRenderOption.OUTPUT_FORMAT_PDF;
>>>> }
>>>> else if ( flag == 'h' )
>>>> {
>>>> format = HTMLRenderOption.OUTPUT_FORMAT_HTML;
>>>> }
>>>> else if ( flag == 'i' )
>>>> {
>>>> showInfo = true;
>>>> }
>>>> else
>>>> {
>>>> usage( );
>>>> return;
>>>> }
>>>> }
>>>> else
>>>> {
>>>>
>>>> // Get a parameter value. Note, this example code only works
>>>> // for string parameters. If you have date or number parameters,
>>>> // your application should parse them, then put the corresponding
>>>> // objects into the hash map.
>>>>
>>>> String arg = args[i];
>>>> int posn = arg.indexOf( '=' );
>>>> if ( posn == -1 )
>>>> {
>>>> usage( );
>>>> return;
>>>> }
>>>> String param = arg.substring( 0, posn );
>>>> String value = arg.substring( posn + 1 );
>>>> Object put = params.put( param, value );
>>>>
>>>> }
>>>> }
>>>>
>>>>
>>>> run( reportName, params, format, showInfo );
>>>>
>>>> }
>>>>
>>>> public static void usage( )
>>>> {
>>>> System.out.println( "Sintaxe:\n java RunReport rptName [-h|p]\n
>>>> param=value ..." );
>>>> }
>>>>
>>>> // Example function to run a report given the report name, parameters
>>>> and
>>>> // output type. The output is put into a file in the same directory as
>>>> the
>>>> // report itself.
>>>>
>>>> public static void run( String name, HashMap params,
>>>> String format, boolean showInfo ) throws EngineException
>>>> {
>>>> // The EngineConfig is used to set up engine-wide configuration
>>>> // information.
>>>>
>>>> EngineConfig config = new EngineConfig( );
>>>>
>>>> // The Engine home is the location of the BIRT engine runtime.
>>>> // M3 Note: Use the report engine installed as part of the BIRT web app
>>>> // used to preview reports. Alter this path to the location of your
>>>> // Eclipse installation.
>>>>
>>>> config.setEngineHome(REPORTENGINE_URL);
>>>>
>>>> // HTML reports can have embedded images or charts. Set up the
>>>> configuration
>>>> // required to write these into a directory in the output directory.
>>>> // The HTMLCompleteImageHandler is one provided by BIRT for this
>>>> purpose.
>>>> // Your application can create a customized version to provide
>>>> alternative
>>>> // ways to handle images.
>>>>
>>>> HTMLEmitterConfig hc = new HTMLEmitterConfig( );
>>>>
>>>>
>>>> HTMLCompleteImageHandler imageHandler = new HTMLCompleteImageHandler( );
>>>> hc.setImageHandler( imageHandler );
>>>> config.setEmitterConfiguration( HTMLRenderOption.OUTPUT_FORMAT_HTML,
>>>> hc );
>>>>
>>>> // Create the report engine itself. This engine can be used to
>>>> run
>>>> // multiple reports.
>>>>
>>>> ReportEngine engine = new ReportEngine( config );
>>>>
>>>> // Open the report design.
>>>>
>>>> IReportRunnable report = null;
>>>>
>>>>
>>>> try {
>>>> report = engine.openReportDesign( name );
>>>> } catch ( EngineException e) {
>>>>
>>>> System.out.println("ERRO: PT.ALMEDINA.REPORTS.CONVERSOR.RUN\n
>>>> EXCEPTION: "+e);
>>>>
>>>> }
>>>>
>>>>
>>>> if ( showInfo )
>>>> {
>>>> showReportInfo( engine, report );
>>>> }
>>>>
>>>> // Create a task to run the report and convert the output to HTML
>>>> // or PDF.
>>>>
>>>> if ( format != null )
>>>> {
>>>>
>>>> parseParams( engine, report, params );
>>>>
>>>> IRunAndRenderTask task = engine.createRunAndRenderTask( report );
>>>> /*
>>>> //HTMLRenderContext renderContext = new HTMLRenderContext();
>>>> //renderContext.setImageDirectory(IMAGE_URL);
>>>>
>>>> HTMLRenderContext renderContext = new HTMLRenderContext( );
>>>> renderContext.setImageDirectory( IMAGE_URL ); //"image"//$NON-NLS-1$
>>>> HashMap appContext = new HashMap( );
>>>> appContext.put("PDF_RENDER_CONTEXT",
>>>> renderContext );//EngineConstants.APPCONTEXT_PDF_RENDER_CONTEXT
>>>> task.setAppContext( appContext );
>>>>
>>>> //task.setContext((Map) renderContext);
>>>> */
>>>> HTMLRenderOption options = new HTMLRenderOption( );
>>>> options.setOutputFormat( format );
>>>> String output = name.replaceFirst( ".rptdesign", "." + format );
>>>> options.setOutputFileName( output );
>>>> task.setRenderOption( options );
>>>> String str = params.toString();
>>>>
>>>>
>>>> //task.setParameterValues( params );
>>>>
>>>> // Run the report.
>>>>
>>>> try
>>>> {
>>>> task.run( );
>>>> }
>>>> catch (EngineException e)
>>>> {
>>>> }
>>>> }
>>>>
>>>> engine.destroy( );
>>>> }
>>>>
>>>> // Display properties of the report and the list of report parameters.
>>>>
>>>> static void showReportInfo( ReportEngine engine, IReportRunnable
>>>> report )
>>>> {
>>>> // Display some of the general report properties.
>>>> // See the ROM Design specification for a list of properties.
>>>>
>>>> System.out.print( "Report Name: " + report.getReportName() +
>>>> "\nTitle: " + report.getProperty( "title" ) +
>>>> "\nComments: " + report.getProperty( "comments" ) +
>>>> "\nDescription: " + report.getProperty( "description" ) +
>>>> "\nAuthor: " + report.getProperty( "author" ) +
>>>> "\nCreated By: " + report.getProperty( "createdBy" ) +
>>>> "\n" );
>>>>
>>>> // Display the list of report parameters with their groups.
>>>> // Parameters defined outside a group appear inside a default, unnamed
>>>> // group.
>>>>
>>>> IGetParameterDefinitionTask task =
>>>> engine.createGetParameterDefinitionTask( report );
>>>> Collection params = task.getParameterDefns( true );
>>>> if ( params.isEmpty() )
>>>> {
>>>> System.out.print( "This report has no parameters.\n" );
>>>> return;
>>>> }
>>>>
>>>> Iterator iter = params.iterator( );
>>>> while ( iter.hasNext( ) )
>>>> {
>>>> IParameterDefnBase param = (IParameterDefnBase) iter.next( );
>>>> if ( param instanceof IParameterGroupDefn )
>>>> {
>>>> IParameterGroupDefn group = (IParameterGroupDefn) param;
>>>> System.out.println( "Parameter Group: " + group.getDisplayName( ) );
>>>> Iterator i2 = group.getContents( ).iterator( );
>>>> while ( iter.hasNext( ) )
>>>> {
>>>> IScalarParameterDefn member = (IScalarParameterDefn) i2.next( );
>>>> showParam( task, member, " " );
>>>> }
>>>> }
>>>> else
>>>> showParam( task, param, "" );
>>>> }
>>>> }
>>>>
>>>> // Show information for one parameter.
>>>> // Release 1 supports only scalar (single-value) parameters.
>>>>
>>>> static void showParam( IGetParameterDefinitionTask task,
>>>> IParameterDefnBase defn,
>>>> String prefix )
>>>> {
>>>> IScalarParameterDefn param = (IScalarParameterDefn) defn;
>>>> System.out.println( prefix + "Parameter: " + param.getName( ) );
>>>> System.out.println( prefix + " Display Name: " +
>>>> param.getDisplayName( ) );
>>>> System.out.println( prefix + " Type: " + param.getDataType( ) );
>>>> System.out.print( prefix + " Default Value: " );
>>>>
>>>> // The default value is an expression. Evaluate it.
>>>>
>>>> Object value = task.getDefaultValue( param );
>>>> System.out.println( value == null ? "none" : value.toString( ) );
>>>> }
>>>>
>>>> static void parseParams( ReportEngine engine, IReportRunnable report,
>>>> HashMap values )
>>>> {
>>>>
>>>> System.out.println("ENTREI!!! VALORES: "+values);
>>>> if ( values.isEmpty( ) )
>>>> return;
>>>>
>>>> IGetParameterDefinitionTask task =
>>>> engine.createGetParameterDefinitionTask( report );
>>>> Collection params = task.getParameterDefns( false );
>>>> Iterator iter = values.keySet( ).iterator( );
>>>> System.out.println("VOU ENTRAR NO WHILE!!!");
>>>> int xxx = 1;
>>>> while ( iter.hasNext( ) )
>>>> {
>>>> System.out.println("WHILE: "+xxx);
>>>> String name = (String) iter.next( );
>>>>
>>>> IScalarParameterDefn found = null;
>>>> Iterator i2 = params.iterator( );
>>>> while ( i2.hasNext( ) )
>>>> {
>>>> IParameterDefnBase param = (IParameterDefnBase) i2.next( );
>>>> if ( param instanceof IParameterGroupDefn )
>>>> continue;
>>>> if ( param.getName( ).equals( name ) )
>>>> {
>>>> found = (IScalarParameterDefn) param;
>>>> break;
>>>> }
>>>> }
>>>> if ( found == null )
>>>> {
>>>> System.err.println( "Parameter " + name + " not found in the report." );
>>>> continue;
>>>> }
>>>> String value = (String) values.get( name );
>>>> // ReportParameterConverter cfgConverter = new
>>>> ReportParameterConverter( "", Locale.getDefault( ) );
>>>> // Object obj = cfgConverter.parse( value, found.getDataType( ) );
>>>> // values.put( name, obj );
>>>> values.put( name, value );
>>>> }
>>>> }
>>>> }
>


--------------050008050901040404000204
Content-Type: application/octet-stream;
name="logs.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="logs.zip"

UEsDBBQAAgAIABdYMzQtB4d18gAAAM4CAAAXAAAAY2F0YWxpbmEuMjAwNi0w MS0xOS5sb2e9
kM9OwzAMxu+T9g5+gqwZXSUihASiSEMCpDJxz1pTWUudKHHfn2yFAxQ4ASf/ +WT/7E+fr+4s
r9ZFUYEuzKY0WoOPvcLWUUio9hRFtT6iGoWcus7ljgaM4Hx/THb2gLxcbB9u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xsT
Re: SEVERE: Report engine can not create pdf emitter [message #111700 is a reply to message #111469] Thu, 19 January 2006 17:19 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Humberto,

When I ran the file you sent me I ran it from Eclipse using the JDT.
I copied itext to the Report Engine Directory
I added the jars from the Report Engine Directory to my build path.
Everything worked fine.

If the issue is in tomcat using the Web Viewer, I did the following to get
BIRT to work.
copied the Web Viewer Example directory to Webapps under tomcat.
Renamed it Birt-viewer.
Copied prototype.js to birt-viewer/ajax/lib
Copied itext-1.3.jar to
birt-viewer/plugins/org.eclipse.birt.report.engine.pdf/lib
Copied
axis.jar
axis-ant.jar
commons-discovery-0.2.jar
jaxrpc.jar
saaj.jar
wsdl4j-1.5.1.jar
to birt-viewer/WEB-INF/lib

Jason

"HC" <carvalho.humberto@almedina.net> wrote in message
news:dqnsv4$p59$1@utils.eclipse.org...
> Jason,
>
> I'm using:
> Windows XP SP2
> Tomcat 5.5.12
> Eclipse 3.1.1
> BIRT 2.0.0
> EMF 2.1.*
> GEF 3.1.1
>
> The Report Engine and the Viewer that I use came in the
> birt-runtime-2.0RC1.zip from BIRT download page.
>
> In attachment I send you a zip file with 2 files that I think you asked
> for.
>
> Thanks for your help
>
> Humberto
>
>
> Jason Weathersby wrote:
>> Humberto,
>>
>> What version of BIRT are you using?
>> Are you getting a stack trace?
>> Also are you using Eclipse or something like Ant to build your class?
>> Thanks
>>
>> Jason
>>
>> "HC" <carvalho.humberto@almedina.net> wrote in message
>> news:43CE8A3E.60607@almedina.net...
>>> Hello,
>>>
>>> I've tried what you said in your last e-mail, but the result was the
>>> same.
>>>
>>> In my last e-mail I didn't told you that if I try to generate a pdf file
>>> or a html file in either cases the error occurs, and not only when I try
>>> to generate a pdf file.
>>>
>>> One thing that I saw comparing your list files with my Report Engine
>>> files, is that model.jar in your Report Engine it's bigger than mine.
>>> The
>>> other files i think that are identical.
>>>
>>> I think that this isn't the problem, but I don't know.
>>>
>>> Thanks
>>>
>>> Humberto Carvalho
>>>
>>> Jason Weathersby wrote:
>>>> Humberto,
>>>>
>>>> I just tried your sample and it worked fine.
>>>> I set my home to "c:/myruntime/report engine".
>>>> Below is a directory listing of the report engine directory. Notice I
>>>> added iText.
>>>>
>>>> 12/31/2005 11:50a 77,586 birt-oda.jar
>>>> 12/31/2005 11:50a 956,273 chart-engine.jar
>>>> 12/31/2005 11:50a 30,117 commons-cli-1.0.jar
>>>> 12/31/2005 11:50a 37,754 commons-codec-1.3.jar
>>>> 12/31/2005 11:50a 132,596 core.jar
>>>> 12/31/2005 11:50a 569,702 dte.jar
>>>> 12/31/2005 11:50a 870,507 engine.jar
>>>> 12/31/2005 11:50a 71,513 flute.jar
>>>> 11/29/2005 05:41p 1,145,105 itext-1.3.jar
>>>> 12/31/2005 11:50a 699,081 js.jar
>>>> 01/15/2006 11:33p 1,552 libs.txt
>>>> 12/31/2005 11:50a 3,316,129 model.jar
>>>> 12/31/2005 11:50a 80,541 oda.jar
>>>> 12/31/2005 11:50a 69,367 odaconsumer-helper.jar
>>>> 12/31/2005 11:50a 137,063 org.eclipse.emf.common_2.1.0.jar
>>>> 12/31/2005 11:50a 144,460
>>>> org.eclipse.emf.ecore.xmi_2.1.0.jar
>>>> 12/31/2005 11:50a 639,778 org.eclipse.emf.ecore_2.1.0.jar
>>>> 01/04/2006 04:48p <DIR> plugins
>>>> 12/31/2005 11:50a 14,526 sac.jar
>>>> 01/04/2006 04:48p <DIR> samples
>>>> 12/31/2005 11:50a 43,275 scriptapi.jar
>>>> 01/18/2006 11:00a 0 test.txt
>>>> 12/31/2005 11:50a 161,563 Tidy.jar
>>>>
>>>> Jason
>>>>
>>>> "HC" <carvalho.humberto@almedina.net> wrote in message
>>>> news:43CE2F39.9030104@almedina.net...
>>>>> Thanks for your help,
>>>>>
>>>>> First I have to say that i'm using a Birt viewer and the Birt engine
>>>>> API.
>>>>>
>>>>> If i use the viewer engine and then choose to print to pdf, this
>>>>> works,
>>>>> but when i try to generate a pdf file from a rptdesign file using the
>>>>> engine API, the error occurs
>>>>>
>>>>>
>>>>> I think that I have all the required files in the right place, I
>>>>> followed the instructions of the following url
>>>>> " http://www.eclipse.org/birt/index.php?page=build/install.htm l"
>>>>>
>>>>> iText.jar is placed in
>>>>> "plugins\org.eclipse.birt.report.engine.pdf\lib"
>>>>>
>>>>> In my application, the engine directory points to the viewer root
>>>>> directory. I have also tried using the 'Report Engine' directory of
>>>>> the
>>>>> runtime distribution, with similar results.
>>>>>
>>>>> In attachment I send a java file that i think that could be the
>>>>> problem...
>>>>>
>>>>> I'll wait for your answer..
>>>>> Thanks
>>>>>
>>>>> Humberto Carvalho
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Jason Weathersby wrote:
>>>>>> Can you upload the Stacktrace?
>>>>>> Also verify that you have the other required files under the proper
>>>>>> location, like the iText jar file.
>>>>>>
>>>>>> Jason Weathersby
>>>>>> BIRT PMC
>>>>>>
>>>>>>
>>>>>> "Humberto Carvalho" <carvalho.humberto@gmail.com> wrote in message
>>>>>> news:51ff09d618a253c7540a8c0018bd62e5$1@www.eclipse.org...
>>>>>>> Hello,
>>>>>>>
>>>>>>> i need some help.
>>>>>>>
>>>>>>> I'm trying to generate a pdf file, but the following error occurs.
>>>>>>>
>>>>>>>
>>>>>>> SEVERE: Report engine can not create pdf emitter.
>>>>>>> Report C:/Program Files/Apache/Tomcat
>>>>>>> 5.5/webapps/BI/Documentos/estat.rptdesign
>>>>>>> run failed.
>>>>>>> org.eclipse.birt.report.engine.api.EngineException: Report engine
>>>>>>> fails to
>>>>>>> creat
>>>>>>> e extension to handle this request.
>>>>>>>
>>>>>>> The software that i'm using are:
>>>>>>> Windows XP SP2
>>>>>>> Eclipse 3.1.1
>>>>>>> BIRT 2.0.0
>>>>>>> EMF 2.1.*
>>>>>>> GEF 3.1.1
>>>>>>>
>>>>>>> I hope that someone can help me.
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>
>>>> ------------------------------------------------------------ --------------------
>>>>
>>>>
>>>>> package pt.almedina.reports;
>>>>>
>>>>> /*
>>>>> * Example command-line utility to generate BIRT reports. Shows the
>>>>> basics
>>>>> * of integrating the BIRT report engine into a simple Java
>>>>> application.
>>>>> */
>>>>>
>>>>>
>>>>> import java.util.Collection;
>>>>> import java.util.HashMap;
>>>>> import java.util.Iterator;
>>>>> import java.util.Map;
>>>>>
>>>>>
>>>>>
>>>>> import org.eclipse.birt.report.engine.api.EngineConfig;
>>>>> import org.eclipse.birt.report.engine.api.EngineConstants;
>>>>> import org.eclipse.birt.report.engine.api.EngineException;
>>>>> import org.eclipse.birt.report.engine.api.HTMLCompleteImageHandler;
>>>>> import org.eclipse.birt.report.engine.api.HTMLEmitterConfig;
>>>>> import org.eclipse.birt.report.engine.api.HTMLRenderContext;
>>>>> import org.eclipse.birt.report.engine.api.HTMLRenderOption;
>>>>> import org.eclipse.birt.report.engine.api.IGetParameterDefinitionTa sk;
>>>>> import org.eclipse.birt.report.engine.api.IHTMLActionHandler;
>>>>> import org.eclipse.birt.report.engine.api.IParameterDefnBase;
>>>>> import org.eclipse.birt.report.engine.api.IParameterGroupDefn;
>>>>> import org.eclipse.birt.report.engine.api.IReportRunnable;
>>>>> import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
>>>>> import org.eclipse.birt.report.engine.api.IScalarParameterDefn;
>>>>> import org.eclipse.birt.report.engine.api.ReportEngine;
>>>>> import org.eclipse.birt.report.engine.api.ReportParameterConverter;
>>>>>
>>>>>
>>>>> /**
>>>>> * Runs a BIRT report and writes the output to a directory.
>>>>> *
>>>>> * RunReport report-name -[h|p] [-i] param=value
>>>>> *
>>>>> * -h HTML (default)
>>>>> * -p PDF
>>>>> * -i Display report info.
>>>>> * param=value Set parameter "param" to the value "value".
>>>>> */
>>>>>
>>>>> public class Conversor
>>>>> {
>>>>>
>>>>> static String REPORTENGINE_URL = "C:/Program Files/Apache/Tomcat
>>>>> 5.5/webapps/Viewer";//c:/reportengine";
>>>>> static String IMAGE_URL = "C:/Program Files/Apache/Tomcat
>>>>> 5.5/webapps/BI/Documentos";
>>>>>
>>>>> // Command-line main to parse arguments described above.
>>>>>
>>>>> public static void main(String[] args) throws EngineException
>>>>> {
>>>>>
>>>>> int i = 0;
>>>>> if ( i >= args.length )
>>>>> {
>>>>> System.out.println( "Nao foi especificado qualquer relatorio" );
>>>>> return;
>>>>> }
>>>>> String reportName = args[i++];
>>>>> String format = null;
>>>>> boolean showInfo = false;
>>>>>
>>>>> // Stoare parameter values into a hash map to later pass to the
>>>>> // BIRT report engine.
>>>>>
>>>>> HashMap params = new HashMap( );
>>>>> for ( ; i < args.length; i++ )
>>>>> {
>>>>> if ( args[i].charAt(0) == '-' )
>>>>> {
>>>>> char flag = Character.toLowerCase( args[i].charAt( 1 ) );
>>>>> if ( flag == 'p' )
>>>>> {
>>>>> format = HTMLRenderOption.OUTPUT_FORMAT_PDF;
>>>>> }
>>>>> else if ( flag == 'h' )
>>>>> {
>>>>> format = HTMLRenderOption.OUTPUT_FORMAT_HTML;
>>>>> }
>>>>> else if ( flag == 'i' )
>>>>> {
>>>>> showInfo = true;
>>>>> }
>>>>> else
>>>>> {
>>>>> usage( );
>>>>> return;
>>>>> }
>>>>> }
>>>>> else
>>>>> {
>>>>>
>>>>> // Get a parameter value. Note, this example code only works
>>>>> // for string parameters. If you have date or number parameters,
>>>>> // your application should parse them, then put the corresponding
>>>>> // objects into the hash map.
>>>>>
>>>>> String arg = args[i];
>>>>> int posn = arg.indexOf( '=' );
>>>>> if ( posn == -1 )
>>>>> {
>>>>> usage( );
>>>>> return;
>>>>> }
>>>>> String param = arg.substring( 0, posn );
>>>>> String value = arg.substring( posn + 1 );
>>>>> Object put = params.put( param, value );
>>>>>
>>>>> }
>>>>> }
>>>>>
>>>>>
>>>>> run( reportName, params, format, showInfo );
>>>>>
>>>>> }
>>>>>
>>>>> public static void usage( )
>>>>> {
>>>>> System.out.println( "Sintaxe:\n java RunReport rptName [-h|p]\n
>>>>> param=value ..." );
>>>>> }
>>>>>
>>>>> // Example function to run a report given the report name, parameters
>>>>> and
>>>>> // output type. The output is put into a file in the same directory as
>>>>> the
>>>>> // report itself.
>>>>>
>>>>> public static void run( String name, HashMap params,
>>>>> String format, boolean showInfo ) throws EngineException
>>>>> {
>>>>> // The EngineConfig is used to set up engine-wide configuration
>>>>> // information.
>>>>>
>>>>> EngineConfig config = new EngineConfig( );
>>>>>
>>>>> // The Engine home is the location of the BIRT engine runtime.
>>>>> // M3 Note: Use the report engine installed as part of the BIRT web
>>>>> app
>>>>> // used to preview reports. Alter this path to the location of your
>>>>> // Eclipse installation.
>>>>>
>>>>> config.setEngineHome(REPORTENGINE_URL);
>>>>>
>>>>> // HTML reports can have embedded images or charts. Set up the
>>>>> configuration
>>>>> // required to write these into a directory in the output directory.
>>>>> // The HTMLCompleteImageHandler is one provided by BIRT for this
>>>>> purpose.
>>>>> // Your application can create a customized version to provide
>>>>> alternative
>>>>> // ways to handle images.
>>>>>
>>>>> HTMLEmitterConfig hc = new HTMLEmitterConfig( );
>>>>>
>>>>>
>>>>> HTMLCompleteImageHandler imageHandler = new
>>>>> HTMLCompleteImageHandler( );
>>>>> hc.setImageHandler( imageHandler );
>>>>> config.setEmitterConfiguration( HTMLRenderOption.OUTPUT_FORMAT_HTML,
>>>>> hc );
>>>>>
>>>>> // Create the report engine itself. This engine can be used to
>>>>> run
>>>>> // multiple reports.
>>>>>
>>>>> ReportEngine engine = new ReportEngine( config );
>>>>>
>>>>> // Open the report design.
>>>>>
>>>>> IReportRunnable report = null;
>>>>>
>>>>>
>>>>> try {
>>>>> report = engine.openReportDesign( name );
>>>>> } catch ( EngineException e) {
>>>>>
>>>>> System.out.println("ERRO: PT.ALMEDINA.REPORTS.CONVERSOR.RUN\n
>>>>> EXCEPTION: "+e);
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>> if ( showInfo )
>>>>> {
>>>>> showReportInfo( engine, report );
>>>>> }
>>>>>
>>>>> // Create a task to run the report and convert the output to HTML
>>>>> // or PDF.
>>>>>
>>>>> if ( format != null )
>>>>> {
>>>>>
>>>>> parseParams( engine, report, params );
>>>>>
>>>>> IRunAndRenderTask task = engine.createRunAndRenderTask( report );
>>>>> /*
>>>>> //HTMLRenderContext renderContext = new HTMLRenderContext();
>>>>> //renderContext.setImageDirectory(IMAGE_URL);
>>>>>
>>>>> HTMLRenderContext renderContext = new HTMLRenderContext( );
>>>>> renderContext.setImageDirectory( IMAGE_URL ); //"image"//$NON-NLS-1$
>>>>> HashMap appContext = new HashMap( );
>>>>> appContext.put("PDF_RENDER_CONTEXT",
>>>>> renderContext );//EngineConstants.APPCONTEXT_PDF_RENDER_CONTEXT
>>>>> task.setAppContext( appContext );
>>>>>
>>>>> //task.setContext((Map) renderContext);
>>>>> */
>>>>> HTMLRenderOption options = new HTMLRenderOption( );
>>>>> options.setOutputFormat( format );
>>>>> String output = name.replaceFirst( ".rptdesign", "." + format );
>>>>> options.setOutputFileName( output );
>>>>> task.setRenderOption( options );
>>>>> String str = params.toString();
>>>>>
>>>>>
>>>>> //task.setParameterValues( params );
>>>>>
>>>>> // Run the report.
>>>>>
>>>>> try
>>>>> {
>>>>> task.run( );
>>>>> }
>>>>> catch (EngineException e)
>>>>> {
>>>>> }
>>>>> }
>>>>>
>>>>> engine.destroy( );
>>>>> }
>>>>>
>>>>> // Display properties of the report and the list of report parameters.
>>>>>
>>>>> static void showReportInfo( ReportEngine engine, IReportRunnable
>>>>> report )
>>>>> {
>>>>> // Display some of the general report properties.
>>>>> // See the ROM Design specification for a list of properties.
>>>>>
>>>>> System.out.print( "Report Name: " + report.getReportName() +
>>>>> "\nTitle: " + report.getProperty( "title" ) +
>>>>> "\nComments: " + report.getProperty( "comments" ) +
>>>>> "\nDescription: " + report.getProperty( "description" ) +
>>>>> "\nAuthor: " + report.getProperty( "author" ) +
>>>>> "\nCreated By: " + report.getProperty( "createdBy" ) +
>>>>> "\n" );
>>>>>
>>>>> // Display the list of report parameters with their groups.
>>>>> // Parameters defined outside a group appear inside a default, unnamed
>>>>> // group.
>>>>>
>>>>> IGetParameterDefinitionTask task =
>>>>> engine.createGetParameterDefinitionTask( report );
>>>>> Collection params = task.getParameterDefns( true );
>>>>> if ( params.isEmpty() )
>>>>> {
>>>>> System.out.print( "This report has no parameters.\n" );
>>>>> return;
>>>>> }
>>>>>
>>>>> Iterator iter = params.iterator( );
>>>>> while ( iter.hasNext( ) )
>>>>> {
>>>>> IParameterDefnBase param = (IParameterDefnBase) iter.next( );
>>>>> if ( param instanceof IParameterGroupDefn )
>>>>> {
>>>>> IParameterGroupDefn group = (IParameterGroupDefn) param;
>>>>> System.out.println( "Parameter Group: " + group.getDisplayName( ) );
>>>>> Iterator i2 = group.getContents( ).iterator( );
>>>>> while ( iter.hasNext( ) )
>>>>> {
>>>>> IScalarParameterDefn member = (IScalarParameterDefn) i2.next( );
>>>>> showParam( task, member, " " );
>>>>> }
>>>>> }
>>>>> else
>>>>> showParam( task, param, "" );
>>>>> }
>>>>> }
>>>>>
>>>>> // Show information for one parameter.
>>>>> // Release 1 supports only scalar (single-value) parameters.
>>>>>
>>>>> static void showParam( IGetParameterDefinitionTask task,
>>>>> IParameterDefnBase defn,
>>>>> String prefix )
>>>>> {
>>>>> IScalarParameterDefn param = (IScalarParameterDefn) defn;
>>>>> System.out.println( prefix + "Parameter: " + param.getName( ) );
>>>>> System.out.println( prefix + " Display Name: " +
>>>>> param.getDisplayName( ) );
>>>>> System.out.println( prefix + " Type: " + param.getDataType( ) );
>>>>> System.out.print( prefix + " Default Value: " );
>>>>>
>>>>> // The default value is an expression. Evaluate it.
>>>>>
>>>>> Object value = task.getDefaultValue( param );
>>>>> System.out.println( value == null ? "none" : value.toString( ) );
>>>>> }
>>>>>
>>>>> static void parseParams( ReportEngine engine, IReportRunnable report,
>>>>> HashMap values )
>>>>> {
>>>>>
>>>>> System.out.println("ENTREI!!! VALORES: "+values);
>>>>> if ( values.isEmpty( ) )
>>>>> return;
>>>>>
>>>>> IGetParameterDefinitionTask task =
>>>>> engine.createGetParameterDefinitionTask( report );
>>>>> Collection params = task.getParameterDefns( false );
>>>>> Iterator iter = values.keySet( ).iterator( );
>>>>> System.out.println("VOU ENTRAR NO WHILE!!!");
>>>>> int xxx = 1;
>>>>> while ( iter.hasNext( ) )
>>>>> {
>>>>> System.out.println("WHILE: "+xxx);
>>>>> String name = (String) iter.next( );
>>>>>
>>>>> IScalarParameterDefn found = null;
>>>>> Iterator i2 = params.iterator( );
>>>>> while ( i2.hasNext( ) )
>>>>> {
>>>>> IParameterDefnBase param = (IParameterDefnBase) i2.next( );
>>>>> if ( param instanceof IParameterGroupDefn )
>>>>> continue;
>>>>> if ( param.getName( ).equals( name ) )
>>>>> {
>>>>> found = (IScalarParameterDefn) param;
>>>>> break;
>>>>> }
>>>>> }
>>>>> if ( found == null )
>>>>> {
>>>>> System.err.println( "Parameter " + name + " not found in the
>>>>> report." );
>>>>> continue;
>>>>> }
>>>>> String value = (String) values.get( name );
>>>>> // ReportParameterConverter cfgConverter = new
>>>>> ReportParameterConverter( "", Locale.getDefault( ) );
>>>>> // Object obj = cfgConverter.parse( value, found.getDataType( ) );
>>>>> // values.put( name, obj );
>>>>> values.put( name, value );
>>>>> }
>>>>> }
>>>>> }
>>
>
>
Re: SEVERE: Report engine can not create pdf emitter [message #111736 is a reply to message #111700] Thu, 19 January 2006 18:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: carvalho.humberto.almedina.net

Jason,

I have all the files exactly as you said in your last e-mail and even so
this don't work.

Thanks

Humberto Carvalho


Jason Weathersby wrote:
> Humberto,
>
> When I ran the file you sent me I ran it from Eclipse using the JDT.
> I copied itext to the Report Engine Directory
> I added the jars from the Report Engine Directory to my build path.
> Everything worked fine.
>
> If the issue is in tomcat using the Web Viewer, I did the following to get
> BIRT to work.
> copied the Web Viewer Example directory to Webapps under tomcat.
> Renamed it Birt-viewer.
> Copied prototype.js to birt-viewer/ajax/lib
> Copied itext-1.3.jar to
> birt-viewer/plugins/org.eclipse.birt.report.engine.pdf/lib
> Copied
> axis.jar
> axis-ant.jar
> commons-discovery-0.2.jar
> jaxrpc.jar
> saaj.jar
> wsdl4j-1.5.1.jar
> to birt-viewer/WEB-INF/lib
>
> Jason
>
> "HC" <carvalho.humberto@almedina.net> wrote in message
> news:dqnsv4$p59$1@utils.eclipse.org...
>> Jason,
>>
>> I'm using:
>> Windows XP SP2
>> Tomcat 5.5.12
>> Eclipse 3.1.1
>> BIRT 2.0.0
>> EMF 2.1.*
>> GEF 3.1.1
>>
>> The Report Engine and the Viewer that I use came in the
>> birt-runtime-2.0RC1.zip from BIRT download page.
>>
>> In attachment I send you a zip file with 2 files that I think you asked
>> for.
>>
>> Thanks for your help
>>
>> Humberto
>>
>>
>> Jason Weathersby wrote:
>>> Humberto,
>>>
>>> What version of BIRT are you using?
>>> Are you getting a stack trace?
>>> Also are you using Eclipse or something like Ant to build your class?
>>> Thanks
>>>
>>> Jason
>>>
>>> "HC" <carvalho.humberto@almedina.net> wrote in message
>>> news:43CE8A3E.60607@almedina.net...
>>>> Hello,
>>>>
>>>> I've tried what you said in your last e-mail, but the result was the
>>>> same.
>>>>
>>>> In my last e-mail I didn't told you that if I try to generate a pdf file
>>>> or a html file in either cases the error occurs, and not only when I try
>>>> to generate a pdf file.
>>>>
>>>> One thing that I saw comparing your list files with my Report Engine
>>>> files, is that model.jar in your Report Engine it's bigger than mine.
>>>> The
>>>> other files i think that are identical.
>>>>
>>>> I think that this isn't the problem, but I don't know.
>>>>
>>>> Thanks
>>>>
>>>> Humberto Carvalho
>>>>
>>>> Jason Weathersby wrote:
>>>>> Humberto,
>>>>>
>>>>> I just tried your sample and it worked fine.
>>>>> I set my home to "c:/myruntime/report engine".
>>>>> Below is a directory listing of the report engine directory. Notice I
>>>>> added iText.
>>>>>
>>>>> 12/31/2005 11:50a 77,586 birt-oda.jar
>>>>> 12/31/2005 11:50a 956,273 chart-engine.jar
>>>>> 12/31/2005 11:50a 30,117 commons-cli-1.0.jar
>>>>> 12/31/2005 11:50a 37,754 commons-codec-1.3.jar
>>>>> 12/31/2005 11:50a 132,596 core.jar
>>>>> 12/31/2005 11:50a 569,702 dte.jar
>>>>> 12/31/2005 11:50a 870,507 engine.jar
>>>>> 12/31/2005 11:50a 71,513 flute.jar
>>>>> 11/29/2005 05:41p 1,145,105 itext-1.3.jar
>>>>> 12/31/2005 11:50a 699,081 js.jar
>>>>> 01/15/2006 11:33p 1,552 libs.txt
>>>>> 12/31/2005 11:50a 3,316,129 model.jar
>>>>> 12/31/2005 11:50a 80,541 oda.jar
>>>>> 12/31/2005 11:50a 69,367 odaconsumer-helper.jar
>>>>> 12/31/2005 11:50a 137,063 org.eclipse.emf.common_2.1.0.jar
>>>>> 12/31/2005 11:50a 144,460
>>>>> org.eclipse.emf.ecore.xmi_2.1.0.jar
>>>>> 12/31/2005 11:50a 639,778 org.eclipse.emf.ecore_2.1.0.jar
>>>>> 01/04/2006 04:48p <DIR> plugins
>>>>> 12/31/2005 11:50a 14,526 sac.jar
>>>>> 01/04/2006 04:48p <DIR> samples
>>>>> 12/31/2005 11:50a 43,275 scriptapi.jar
>>>>> 01/18/2006 11:00a 0 test.txt
>>>>> 12/31/2005 11:50a 161,563 Tidy.jar
>>>>>
>>>>> Jason
>>>>>
>>>>> "HC" <carvalho.humberto@almedina.net> wrote in message
>>>>> news:43CE2F39.9030104@almedina.net...
>>>>>> Thanks for your help,
>>>>>>
>>>>>> First I have to say that i'm using a Birt viewer and the Birt engine
>>>>>> API.
>>>>>>
>>>>>> If i use the viewer engine and then choose to print to pdf, this
>>>>>> works,
>>>>>> but when i try to generate a pdf file from a rptdesign file using the
>>>>>> engine API, the error occurs
>>>>>>
>>>>>>
>>>>>> I think that I have all the required files in the right place, I
>>>>>> followed the instructions of the following url
>>>>>> " http://www.eclipse.org/birt/index.php?page=build/install.htm l"
>>>>>>
>>>>>> iText.jar is placed in
>>>>>> "plugins\org.eclipse.birt.report.engine.pdf\lib"
>>>>>>
>>>>>> In my application, the engine directory points to the viewer root
>>>>>> directory. I have also tried using the 'Report Engine' directory of
>>>>>> the
>>>>>> runtime distribution, with similar results.
>>>>>>
>>>>>> In attachment I send a java file that i think that could be the
>>>>>> problem...
>>>>>>
>>>>>> I'll wait for your answer..
>>>>>> Thanks
>>>>>>
>>>>>> Humberto Carvalho
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Jason Weathersby wrote:
>>>>>>> Can you upload the Stacktrace?
>>>>>>> Also verify that you have the other required files under the proper
>>>>>>> location, like the iText jar file.
>>>>>>>
>>>>>>> Jason Weathersby
>>>>>>> BIRT PMC
>>>>>>>
>>>>>>>
>>>>>>> "Humberto Carvalho" <carvalho.humberto@gmail.com> wrote in message
>>>>>>> news:51ff09d618a253c7540a8c0018bd62e5$1@www.eclipse.org...
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> i need some help.
>>>>>>>>
>>>>>>>> I'm trying to generate a pdf file, but the following error occurs.
>>>>>>>>
>>>>>>>>
>>>>>>>> SEVERE: Report engine can not create pdf emitter.
>>>>>>>> Report C:/Program Files/Apache/Tomcat
>>>>>>>> 5.5/webapps/BI/Documentos/estat.rptdesign
>>>>>>>> run failed.
>>>>>>>> org.eclipse.birt.report.engine.api.EngineException: Report engine
>>>>>>>> fails to
>>>>>>>> creat
>>>>>>>> e extension to handle this request.
>>>>>>>>
>>>>>>>> The software that i'm using are:
>>>>>>>> Windows XP SP2
>>>>>>>> Eclipse 3.1.1
>>>>>>>> BIRT 2.0.0
>>>>>>>> EMF 2.1.*
>>>>>>>> GEF 3.1.1
>>>>>>>>
>>>>>>>> I hope that someone can help me.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>> ------------------------------------------------------------ --------------------
>>>>>
>>>>>
>>>>>> package pt.almedina.reports;
>>>>>>
>>>>>> /*
>>>>>> * Example command-line utility to generate BIRT reports. Shows the
>>>>>> basics
>>>>>> * of integrating the BIRT report engine into a simple Java
>>>>>> application.
>>>>>> */
>>>>>>
>>>>>>
>>>>>> import java.util.Collection;
>>>>>> import java.util.HashMap;
>>>>>> import java.util.Iterator;
>>>>>> import java.util.Map;
>>>>>>
>>>>>>
>>>>>>
>>>>>> import org.eclipse.birt.report.engine.api.EngineConfig;
>>>>>> import org.eclipse.birt.report.engine.api.EngineConstants;
>>>>>> import org.eclipse.birt.report.engine.api.EngineException;
>>>>>> import org.eclipse.birt.report.engine.api.HTMLCompleteImageHandler;
>>>>>> import org.eclipse.birt.report.engine.api.HTMLEmitterConfig;
>>>>>> import org.eclipse.birt.report.engine.api.HTMLRenderContext;
>>>>>> import org.eclipse.birt.report.engine.api.HTMLRenderOption;
>>>>>> import org.eclipse.birt.report.engine.api.IGetParameterDefinitionTa sk;
>>>>>> import org.eclipse.birt.report.engine.api.IHTMLActionHandler;
>>>>>> import org.eclipse.birt.report.engine.api.IParameterDefnBase;
>>>>>> import org.eclipse.birt.report.engine.api.IParameterGroupDefn;
>>>>>> import org.eclipse.birt.report.engine.api.IReportRunnable;
>>>>>> import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
>>>>>> import org.eclipse.birt.report.engine.api.IScalarParameterDefn;
>>>>>> import org.eclipse.birt.report.engine.api.ReportEngine;
>>>>>> import org.eclipse.birt.report.engine.api.ReportParameterConverter;
>>>>>>
>>>>>>
>>>>>> /**
>>>>>> * Runs a BIRT report and writes the output to a directory.
>>>>>> *
>>>>>> * RunReport report-name -[h|p] [-i] param=value
>>>>>> *
>>>>>> * -h HTML (default)
>>>>>> * -p PDF
>>>>>> * -i Display report info.
>>>>>> * param=value Set parameter "param" to the value "value".
>>>>>> */
>>>>>>
>>>>>> public class Conversor
>>>>>> {
>>>>>>
>>>>>> static String REPORTENGINE_URL = "C:/Program Files/Apache/Tomcat
>>>>>> 5.5/webapps/Viewer";//c:/reportengine";
>>>>>> static String IMAGE_URL = "C:/Program Files/Apache/Tomcat
>>>>>> 5.5/webapps/BI/Documentos";
>>>>>>
>>>>>> // Command-line main to parse arguments described above.
>>>>>>
>>>>>> public static void main(String[] args) throws EngineException
>>>>>> {
>>>>>>
>>>>>> int i = 0;
>>>>>> if ( i >= args.length )
>>>>>> {
>>>>>> System.out.println( "Nao foi especificado qualquer relatorio" );
>>>>>> return;
>>>>>> }
>>>>>> String reportName = args[i++];
>>>>>> String format = null;
>>>>>> boolean showInfo = false;
>>>>>>
>>>>>> // Stoare parameter values into a hash map to later pass to the
>>>>>> // BIRT report engine.
>>>>>>
>>>>>> HashMap params = new HashMap( );
>>>>>> for ( ; i < args.length; i++ )
>>>>>> {
>>>>>> if ( args[i].charAt(0) == '-' )
>>>>>> {
>>>>>> char flag = Character.toLowerCase( args[i].charAt( 1 ) );
>>>>>> if ( flag == 'p' )
>>>>>> {
>>>>>> format = HTMLRenderOption.OUTPUT_FORMAT_PDF;
>>>>>> }
>>>>>> else if ( flag == 'h' )
>>>>>> {
>>>>>> format = HTMLRenderOption.OUTPUT_FORMAT_HTML;
>>>>>> }
>>>>>> else if ( flag == 'i' )
>>>>>> {
>>>>>> showInfo = true;
>>>>>> }
>>>>>> else
>>>>>> {
>>>>>> usage( );
>>>>>> return;
>>>>>> }
>>>>>> }
>>>>>> else
>>>>>> {
>>>>>>
>>>>>> // Get a parameter value. Note, this example code only works
>>>>>> // for string parameters. If you have date or number parameters,
>>>>>> // your application should parse them, then put the corresponding
>>>>>> // objects into the hash map.
>>>>>>
>>>>>> String arg = args[i];
>>>>>> int posn = arg.indexOf( '=' );
>>>>>> if ( posn == -1 )
>>>>>> {
>>>>>> usage( );
>>>>>> return;
>>>>>> }
>>>>>> String param = arg.substring( 0, posn );
>>>>>> String value = arg.substring( posn + 1 );
>>>>>> Object put = params.put( param, value );
>>>>>>
>>>>>> }
>>>>>> }
>>>>>>
>>>>>>
>>>>>> run( reportName, params, format, showInfo );
>>>>>>
>>>>>> }
>>>>>>
>>>>>> public static void usage( )
>>>>>> {
>>>>>> System.out.println( "Sintaxe:\n java RunReport rptName [-h|p]\n
>>>>>> param=value ..." );
>>>>>> }
>>>>>>
>>>>>> // Example function to run a report given the report name, parameters
>>>>>> and
>>>>>> // output type. The output is put into a file in the same directory as
>>>>>> the
>>>>>> // report itself.
>>>>>>
>>>>>> public static void run( String name, HashMap params,
>>>>>> String format, boolean showInfo ) throws EngineException
>>>>>> {
>>>>>> // The EngineConfig is used to set up engine-wide configuration
>>>>>> // information.
>>>>>>
>>>>>> EngineConfig config = new EngineConfig( );
>>>>>>
>>>>>> // The Engine home is the location of the BIRT engine runtime.
>>>>>> // M3 Note: Use the report engine installed as part of the BIRT web
>>>>>> app
>>>>>> // used to preview reports. Alter this path to the location of your
>>>>>> // Eclipse installation.
>>>>>>
>>>>>> config.setEngineHome(REPORTENGINE_URL);
>>>>>>
>>>>>> // HTML reports can have embedded images or charts. Set up the
>>>>>> configuration
>>>>>> // required to write these into a directory in the output directory.
>>>>>> // The HTMLCompleteImageHandler is one provided by BIRT for this
>>>>>> purpose.
>>>>>> // Your application can create a customized version to provide
>>>>>> alternative
>>>>>> // ways to handle images.
>>>>>>
>>>>>> HTMLEmitterConfig hc = new HTMLEmitterConfig( );
>>>>>>
>>>>>>
>>>>>> HTMLCompleteImageHandler imageHandler = new
>>>>>> HTMLCompleteImageHandler( );
>>>>>> hc.setImageHandler( imageHandler );
>>>>>> config.setEmitterConfiguration( HTMLRenderOption.OUTPUT_FORMAT_HTML,
>>>>>> hc );
>>>>>>
>>>>>> // Create the report engine itself. This engine can be used to
>>>>>> run
>>>>>> // multiple reports.
>>>>>>
>>>>>> ReportEngine engine = new ReportEngine( config );
>>>>>>
>>>>>> // Open the report design.
>>>>>>
>>>>>> IReportRunnable report = null;
>>>>>>
>>>>>>
>>>>>> try {
>>>>>> report = engine.openReportDesign( name );
>>>>>> } catch ( EngineException e) {
>>>>>>
>>>>>> System.out.println("ERRO: PT.ALMEDINA.REPORTS.CONVERSOR.RUN\n
>>>>>> EXCEPTION: "+e);
>>>>>>
>>>>>> }
>>>>>>
>>>>>>
>>>>>> if ( showInfo )
>>>>>> {
>>>>>> showReportInfo( engine, report );
>>>>>> }
>>>>>>
>>>>>> // Create a task to run the report and convert the output to HTML
>>>>>> // or PDF.
>>>>>>
>>>>>> if ( format != null )
>>>>>> {
>>>>>>
>>>>>> parseParams( engine, report, params );
>>>>>>
>>>>>> IRunAndRenderTask task = engine.createRunAndRenderTask( report );
>>>>>> /*
>>>>>> //HTMLRenderContext renderContext = new HTMLRenderContext();
>>>>>> //renderContext.setImageDirectory(IMAGE_URL);
>>>>>>
>>>>>> HTMLRenderContext renderContext = new HTMLRenderContext( );
>>>>>> renderContext.setImageDirectory( IMAGE_URL ); //"image"//$NON-NLS-1$
>>>>>> HashMap appContext = new HashMap( );
>>>>>> appContext.put("PDF_RENDER_CONTEXT",
>>>>>> renderContext );//EngineConstants.APPCONTEXT_PDF_RENDER_CONTEXT
>>>>>> task.setAppContext( appContext );
>>>>>>
>>>>>> //task.setContext((Map) renderContext);
>>>>>> */
>>>>>> HTMLRenderOption options = new HTMLRenderOption( );
>>>>>> options.setOutputFormat( format );
>>>>>> String output = name.replaceFirst( ".rptdesign", "." + format );
>>>>>> options.setOutputFileName( output );
>>>>>> task.setRenderOption( options );
>>>>>> String str = params.toString();
>>>>>>
>>>>>>
>>>>>> //task.setParameterValues( params );
>>>>>>
>>>>>> // Run the report.
>>>>>>
>>>>>> try
>>>>>> {
>>>>>> task.run( );
>>>>>> }
>>>>>> catch (EngineException e)
>>>>>> {
>>>>>> }
>>>>>> }
>>>>>>
>>>>>> engine.destroy( );
>>>>>> }
>>>>>>
>>>>>> // Display properties of the report and the list of report parameters.
>>>>>>
>>>>>> static void showReportInfo( ReportEngine engine, IReportRunnable
>>>>>> report )
>>>>>> {
>>>>>> // Display some of the general report properties.
>>>>>> // See the ROM Design specification for a list of properties.
>>>>>>
>>>>>> System.out.print( "Report Name: " + report.getReportName() +
>>>>>> "\nTitle: " + report.getProperty( "title" ) +
>>>>>> "\nComments: " + report.getProperty( "comments" ) +
>>>>>> "\nDescription: " + report.getProperty( "description" ) +
>>>>>> "\nAuthor: " + report.getProperty( "author" ) +
>>>>>> "\nCreated By: " + report.getProperty( "createdBy" ) +
>>>>>> "\n" );
>>>>>>
>>>>>> // Display the list of report parameters with their groups.
>>>>>> // Parameters defined outside a group appear inside a default, unnamed
>>>>>> // group.
>>>>>>
>>>>>> IGetParameterDefinitionTask task =
>>>>>> engine.createGetParameterDefinitionTask( report );
>>>>>> Collection params = task.getParameterDefns( true );
>>>>>> if ( params.isEmpty() )
>>>>>> {
>>>>>> System.out.print( "This report has no parameters.\n" );
>>>>>> return;
>>>>>> }
>>>>>>
>>>>>> Iterator iter = params.iterator( );
>>>>>> while ( iter.hasNext( ) )
>>>>>> {
>>>>>> IParameterDefnBase param = (IParameterDefnBase) iter.next( );
>>>>>> if ( param instanceof IParameterGroupDefn )
>>>>>> {
>>>>>> IParameterGroupDefn group = (IParameterGroupDefn) param;
>>>>>> System.out.println( "Parameter Group: " + group.getDisplayName( ) );
>>>>>> Iterator i2 = group.getContents( ).iterator( );
>>>>>> while ( iter.hasNext( ) )
>>>>>> {
>>>>>> IScalarParameterDefn member = (IScalarParameterDefn) i2.next( );
>>>>>> showParam( task, member, " " );
>>>>>> }
>>>>>> }
>>>>>> else
>>>>>> showParam( task, param, "" );
>>>>>> }
>>>>>> }
>>>>>>
>>>>>> // Show information for one parameter.
>>>>>> // Release 1 supports only scalar (single-value) parameters.
>>>>>>
>>>>>> static void showParam( IGetParameterDefinitionTask task,
>>>>>> IParameterDefnBase defn,
>>>>>> String prefix )
>>>>>> {
>>>>>> IScalarParameterDefn param = (IScalarParameterDefn) defn;
>>>>>> System.out.println( prefix + "Parameter: " + param.getName( ) );
>>>>>> System.out.println( prefix + " Display Name: " +
>>>>>> param.getDisplayName( ) );
>>>>>> System.out.println( prefix + " Type: " + param.getDataType( ) );
>>>>>> System.out.print( prefix + " Default Value: " );
>>>>>>
>>>>>> // The default value is an expression. Evaluate it.
>>>>>>
>>>>>> Object value = task.getDefaultValue( param );
>>>>>> System.out.println( value == null ? "none" : value.toString( ) );
>>>>>> }
>>>>>>
>>>>>> static void parseParams( ReportEngine engine, IReportRunnable report,
>>>>>> HashMap values )
>>>>>> {
>>>>>>
>>>>>> System.out.println("ENTREI!!! VALORES: "+values);
>>>>>> if ( values.isEmpty( ) )
>>>>>> return;
>>>>>>
>>>>>> IGetParameterDefinitionTask task =
>>>>>> engine.createGetParameterDefinitionTask( report );
>>>>>> Collection params = task.getParameterDefns( false );
>>>>>> Iterator iter = values.keySet( ).iterator( );
>>>>>> System.out.println("VOU ENTRAR NO WHILE!!!");
>>>>>> int xxx = 1;
>>>>>> while ( iter.hasNext( ) )
>>>>>> {
>>>>>> System.out.println("WHILE: "+xxx);
>>>>>> String name = (String) iter.next( );
>>>>>>
>>>>>> IScalarParameterDefn found = null;
>>>>>> Iterator i2 = params.iterator( );
>>>>>> while ( i2.hasNext( ) )
>>>>>> {
>>>>>> IParameterDefnBase param = (IParameterDefnBase) i2.next( );
>>>>>> if ( param instanceof IParameterGroupDefn )
>>>>>> continue;
>>>>>> if ( param.getName( ).equals( name ) )
>>>>>> {
>>>>>> found = (IScalarParameterDefn) param;
>>>>>> break;
>>>>>> }
>>>>>> }
>>>>>> if ( found == null )
>>>>>> {
>>>>>> System.err.println( "Parameter " + name + " not found in the
>>>>>> report." );
>>>>>> continue;
>>>>>> }
>>>>>> String value = (String) values.get( name );
>>>>>> // ReportParameterConverter cfgConverter = new
>>>>>> ReportParameterConverter( "", Locale.getDefault( ) );
>>>>>> // Object obj = cfgConverter.parse( value, found.getDataType( ) );
>>>>>> // values.put( name, obj );
>>>>>> values.put( name, value );
>>>>>> }
>>>>>> }
>>>>>> }
>>
>
>
Re: SEVERE: Report engine can not create pdf emitter [message #111806 is a reply to message #111736] Thu, 19 January 2006 20:26 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Humberto,

Attached is an ant project with the code you sent me slightly modified.
Look at the readme and let me know if it runs the runreport.rptdesign.

Thanks

Jason

"HC" <carvalho.humberto@almedina.net> wrote in message
news:dqoksg$k74$1@utils.eclipse.org...
> Jason,
>
> I have all the files exactly as you said in your last e-mail and even so
> this don't work.
>
> Thanks
>
> Humberto Carvalho
>
>
> Jason Weathersby wrote:
>> Humberto,
>>
>> When I ran the file you sent me I ran it from Eclipse using the JDT.
>> I copied itext to the Report Engine Directory
>> I added the jars from the Report Engine Directory to my build path.
>> Everything worked fine.
>>
>> If the issue is in tomcat using the Web Viewer, I did the following to
>> get
>> BIRT to work.
>> copied the Web Viewer Example directory to Webapps under tomcat.
>> Renamed it Birt-viewer.
>> Copied prototype.js to birt-viewer/ajax/lib
>> Copied itext-1.3.jar to
>> birt-viewer/plugins/org.eclipse.birt.report.engine.pdf/lib
>> Copied
>> axis.jar
>> axis-ant.jar
>> commons-discovery-0.2.jar
>> jaxrpc.jar
>> saaj.jar
>> wsdl4j-1.5.1.jar
>> to birt-viewer/WEB-INF/lib
>>
>> Jason
>>
>> "HC" <carvalho.humberto@almedina.net> wrote in message
>> news:dqnsv4$p59$1@utils.eclipse.org...
>>> Jason,
>>>
>>> I'm using:
>>> Windows XP SP2
>>> Tomcat 5.5.12
>>> Eclipse 3.1.1
>>> BIRT 2.0.0
>>> EMF 2.1.*
>>> GEF 3.1.1
>>>
>>> The Report Engine and the Viewer that I use came in the
>>> birt-runtime-2.0RC1.zip from BIRT download page.
>>>
>>> In attachment I send you a zip file with 2 files that I think you asked
>>> for.
>>>
>>> Thanks for your help
>>>
>>> Humberto
>>>
>>>
>>> Jason Weathersby wrote:
>>>> Humberto,
>>>>
>>>> What version of BIRT are you using?
>>>> Are you getting a stack trace?
>>>> Also are you using Eclipse or something like Ant to build your class?
>>>> Thanks
>>>>
>>>> Jason
>>>>
>>>> "HC" <carvalho.humberto@almedina.net> wrote in message
>>>> news:43CE8A3E.60607@almedina.net...
>>>>> Hello,
>>>>>
>>>>> I've tried what you said in your last e-mail, but the result was the
>>>>> same.
>>>>>
>>>>> In my last e-mail I didn't told you that if I try to generate a pdf
>>>>> file
>>>>> or a html file in either cases the error occurs, and not only when I
>>>>> try
>>>>> to generate a pdf file.
>>>>>
>>>>> One thing that I saw comparing your list files with my Report Engine
>>>>> files, is that model.jar in your Report Engine it's bigger than mine.
>>>>> The
>>>>> other files i think that are identical.
>>>>>
>>>>> I think that this isn't the problem, but I don't know.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Humberto Carvalho
>>>>>
>>>>> Jason Weathersby wrote:
>>>>>> Humberto,
>>>>>>
>>>>>> I just tried your sample and it worked fine.
>>>>>> I set my home to "c:/myruntime/report engine".
>>>>>> Below is a directory listing of the report engine directory. Notice
>>>>>> I
>>>>>> added iText.
>>>>>>
>>>>>> 12/31/2005 11:50a 77,586 birt-oda.jar
>>>>>> 12/31/2005 11:50a 956,273 chart-engine.jar
>>>>>> 12/31/2005 11:50a 30,117 commons-cli-1.0.jar
>>>>>> 12/31/2005 11:50a 37,754 commons-codec-1.3.jar
>>>>>> 12/31/2005 11:50a 132,596 core.jar
>>>>>> 12/31/2005 11:50a 569,702 dte.jar
>>>>>> 12/31/2005 11:50a 870,507 engine.jar
>>>>>> 12/31/2005 11:50a 71,513 flute.jar
>>>>>> 11/29/2005 05:41p 1,145,105 itext-1.3.jar
>>>>>> 12/31/2005 11:50a 699,081 js.jar
>>>>>> 01/15/2006 11:33p 1,552 libs.txt
>>>>>> 12/31/2005 11:50a 3,316,129 model.jar
>>>>>> 12/31/2005 11:50a 80,541 oda.jar
>>>>>> 12/31/2005 11:50a 69,367 odaconsumer-helper.jar
>>>>>> 12/31/2005 11:50a 137,063
>>>>>> org.eclipse.emf.common_2.1.0.jar
>>>>>> 12/31/2005 11:50a 144,460
>>>>>> org.eclipse.emf.ecore.xmi_2.1.0.jar
>>>>>> 12/31/2005 11:50a 639,778
>>>>>> org.eclipse.emf.ecore_2.1.0.jar
>>>>>> 01/04/2006 04:48p <DIR> plugins
>>>>>> 12/31/2005 11:50a 14,526 sac.jar
>>>>>> 01/04/2006 04:48p <DIR> samples
>>>>>> 12/31/2005 11:50a 43,275 scriptapi.jar
>>>>>> 01/18/2006 11:00a 0 test.txt
>>>>>> 12/31/2005 11:50a 161,563 Tidy.jar
>>>>>>
>>>>>> Jason
>>>>>>
>>>>>> "HC" <carvalho.humberto@almedina.net> wrote in message
>>>>>> news:43CE2F39.9030104@almedina.net...
>>>>>>> Thanks for your help,
>>>>>>>
>>>>>>> First I have to say that i'm using a Birt viewer and the Birt engine
>>>>>>> API.
>>>>>>>
>>>>>>> If i use the viewer engine and then choose to print to pdf, this
>>>>>>> works,
>>>>>>> but when i try to generate a pdf file from a rptdesign file using
>>>>>>> the
>>>>>>> engine API, the error occurs
>>>>>>>
>>>>>>>
>>>>>>> I think that I have all the required files in the right place, I
>>>>>>> followed the instructions of the following url
>>>>>>> " http://www.eclipse.org/birt/index.php?page=build/install.htm l"
>>>>>>>
>>>>>>> iText.jar is placed in
>>>>>>> "plugins\org.eclipse.birt.report.engine.pdf\lib"
>>>>>>>
>>>>>>> In my application, the engine directory points to the viewer root
>>>>>>> directory. I have also tried using the 'Report Engine' directory of
>>>>>>> the
>>>>>>> runtime distribution, with similar results.
>>>>>>>
>>>>>>> In attachment I send a java file that i think that could be the
>>>>>>> problem...
>>>>>>>
>>>>>>> I'll wait for your answer..
>>>>>>> Thanks
>>>>>>>
>>>>>>> Humberto Carvalho
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Jason Weathersby wrote:
>>>>>>>> Can you upload the Stacktrace?
>>>>>>>> Also verify that you have the other required files under the proper
>>>>>>>> location, like the iText jar file.
>>>>>>>>
>>>>>>>> Jason Weathersby
>>>>>>>> BIRT PMC
>>>>>>>>
>>>>>>>>
>>>>>>>> "Humberto Carvalho" <carvalho.humberto@gmail.com> wrote in message
>>>>>>>> news:51ff09d618a253c7540a8c0018bd62e5$1@www.eclipse.org...
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> i need some help.
>>>>>>>>>
>>>>>>>>> I'm trying to generate a pdf file, but the following error occurs.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> SEVERE: Report engine can not create pdf emitter.
>>>>>>>>> Report C:/Program Files/Apache/Tomcat
>>>>>>>>> 5.5/webapps/BI/Documentos/estat.rptdesign
>>>>>>>>> run failed.
>>>>>>>>> org.eclipse.birt.report.engine.api.EngineException: Report engine
>>>>>>>>> fails to
>>>>>>>>> creat
>>>>>>>>> e extension to handle this request.
>>>>>>>>>
>>>>>>>>> The software that i'm using are:
>>>>>>>>> Windows XP SP2
>>>>>>>>> Eclipse 3.1.1
>>>>>>>>> BIRT 2.0.0
>>>>>>>>> EMF 2.1.*
>>>>>>>>> GEF 3.1.1
>>>>>>>>>
>>>>>>>>> I hope that someone can help me.
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>> ------------------------------------------------------------ --------------------
>>>>>>
>>>>>>
>>>>>>> package pt.almedina.reports;
>>>>>>>
>>>>>>> /*
>>>>>>> * Example command-line utility to generate BIRT reports. Shows the
>>>>>>> basics
>>>>>>> * of integrating the BIRT report engine into a simple Java
>>>>>>> application.
>>>>>>> */
>>>>>>>
>>>>>>>
>>>>>>> import java.util.Collection;
>>>>>>> import java.util.HashMap;
>>>>>>> import java.util.Iterator;
>>>>>>> import java.util.Map;
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> import org.eclipse.birt.report.engine.api.EngineConfig;
>>>>>>> import org.eclipse.birt.report.engine.api.EngineConstants;
>>>>>>> import org.eclipse.birt.report.engine.api.EngineException;
>>>>>>> import org.eclipse.birt.report.engine.api.HTMLCompleteImageHandler;
>>>>>>> import org.eclipse.birt.report.engine.api.HTMLEmitterConfig;
>>>>>>> import org.eclipse.birt.report.engine.api.HTMLRenderContext;
>>>>>>> import org.eclipse.birt.report.engine.api.HTMLRenderOption;
>>>>>>> import
>>>>>>> org.eclipse.birt.report.engine.api.IGetParameterDefinitionTa sk;
>>>>>>> import org.eclipse.birt.report.engine.api.IHTMLActionHandler;
>>>>>>> import org.eclipse.birt.report.engine.api.IParameterDefnBase;
>>>>>>> import org.eclipse.birt.report.engine.api.IParameterGroupDefn;
>>>>>>> import org.eclipse.birt.report.engine.api.IReportRunnable;
>>>>>>> import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
>>>>>>> import org.eclipse.birt.report.engine.api.IScalarParameterDefn;
>>>>>>> import org.eclipse.birt.report.engine.api.ReportEngine;
>>>>>>> import org.eclipse.birt.report.engine.api.ReportParameterConverter;
>>>>>>>
>>>>>>>
>>>>>>> /**
>>>>>>> * Runs a BIRT report and writes the output to a directory.
>>>>>>> *
>>>>>>> * RunReport report-name -[h|p] [-i] param=value
>>>>>>> *
>>>>>>> * -h HTML (default)
>>>>>>> * -p PDF
>>>>>>> * -i Display report info.
>>>>>>> * param=value Set parameter "param" to the value "value".
>>>>>>> */
>>>>>>>
>>>>>>> public class Conversor
>>>>>>> {
>>>>>>>
>>>>>>> static String REPORTENGINE_URL = "C:/Program Files/Apache/Tomcat
>>>>>>> 5.5/webapps/Viewer";//c:/reportengine";
>>>>>>> static String IMAGE_URL = "C:/Program Files/Apache/Tomcat
>>>>>>> 5.5/webapps/BI/Documentos";
>>>>>>>
>>>>>>> // Command-line main to parse arguments described above.
>>>>>>>
>>>>>>> public static void main(String[] args) throws EngineException
>>>>>>> {
>>>>>>>
>>>>>>> int i = 0;
>>>>>>> if ( i >= args.length )
>>>>>>> {
>>>>>>> System.out.println( "Nao foi especificado qualquer relatorio" );
>>>>>>> return;
>>>>>>> }
>>>>>>> String reportName = args[i++];
>>>>>>> String format = null;
>>>>>>> boolean showInfo = false;
>>>>>>>
>>>>>>> // Stoare parameter values into a hash map to later pass to the
>>>>>>> // BIRT report engine.
>>>>>>>
>>>>>>> HashMap params = new HashMap( );
>>>>>>> for ( ; i < args.length; i++ )
>>>>>>> {
>>>>>>> if ( args[i].charAt(0) == '-' )
>>>>>>> {
>>>>>>> char flag = Character.toLowerCase( args[i].charAt( 1 ) );
>>>>>>> if ( flag == 'p' )
>>>>>>> {
>>>>>>> format = HTMLRenderOption.OUTPUT_FORMAT_PDF;
>>>>>>> }
>>>>>>> else if ( flag == 'h' )
>>>>>>> {
>>>>>>> format = HTMLRenderOption.OUTPUT_FORMAT_HTML;
>>>>>>> }
>>>>>>> else if ( flag == 'i' )
>>>>>>> {
>>>>>>> showInfo = true;
>>>>>>> }
>>>>>>> else
>>>>>>> {
>>>>>>> usage( );
>>>>>>> return;
>>>>>>> }
>>>>>>> }
>>>>>>> else
>>>>>>> {
>>>>>>>
>>>>>>> // Get a parameter value. Note, this example code only works
>>>>>>> // for string parameters. If you have date or number parameters,
>>>>>>> // your application should parse them, then put the corresponding
>>>>>>> // objects into the hash map.
>>>>>>>
>>>>>>> String arg = args[i];
>>>>>>> int posn = arg.indexOf( '=' );
>>>>>>> if ( posn == -1 )
>>>>>>> {
>>>>>>> usage( );
>>>>>>> return;
>>>>>>> }
>>>>>>> String param = arg.substring( 0, posn );
>>>>>>> String value = arg.substring( posn + 1 );
>>>>>>> Object put = params.put( param, value );
>>>>>>>
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>> run( reportName, params, format, showInfo );
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>> public static void usage( )
>>>>>>> {
>>>>>>> System.out.println( "Sintaxe:\n java RunReport rptName
>>>>>>> [-h|p]\n
>>>>>>> param=value ..." );
>>>>>>> }
>>>>>>>
>>>>>>> // Example function to run a report given the report name,
>>>>>>> parameters
>>>>>>> and
>>>>>>> // output type. The output is put into a file in the same directory
>>>>>>> as
>>>>>>> the
>>>>>>> // report itself.
>>>>>>>
>>>>>>> public static void run( String name, HashMap params,
>>>>>>> String format, boolean showInfo ) throws EngineException
>>>>>>> {
>>>>>>> // The EngineConfig is used to set up engine-wide configuration
>>>>>>> // information.
>>>>>>>
>>>>>>> EngineConfig config = new EngineConfig( );
>>>>>>>
>>>>>>> // The Engine home is the location of the BIRT engine runtime.
>>>>>>> // M3 Note: Use the report engine installed as part of the BIRT web
>>>>>>> app
>>>>>>> // used to preview reports. Alter this path to the location of your
>>>>>>> // Eclipse installation.
>>>>>>>
>>>>>>> config.setEngineHome(REPORTENGINE_URL);
>>>>>>>
>>>>>>> // HTML reports can have embedded images or charts. Set up the
>>>>>>> configuration
>>>>>>> // required to write these into a directory in the output directory.
>>>>>>> // The HTMLCompleteImageHandler is one provided by BIRT for this
>>>>>>> purpose.
>>>>>>> // Your application can create a customized version to provide
>>>>>>> alternative
>>>>>>> // ways to handle images.
>>>>>>>
>>>>>>> HTMLEmitterConfig hc = new HTMLEmitterConfig( );
>>>>>>>
>>>>>>>
>>>>>>> HTMLCompleteImageHandler imageHandler = new
>>>>>>> HTMLCompleteImageHandler( );
>>>>>>> hc.setImageHandler( imageHandler );
>>>>>>> config.setEmitterConfiguration( HTMLRenderOption.OUTPUT_FORMAT_HTML,
>>>>>>> hc );
>>>>>>>
>>>>>>> // Create the report engine itself. This engine can be used
>>>>>>> to
>>>>>>> run
>>>>>>> // multiple reports.
>>>>>>>
>>>>>>> ReportEngine engine = new ReportEngine( config );
>>>>>>>
>>>>>>> // Open the report design.
>>>>>>>
>>>>>>> IReportRunnable report = null;
>>>>>>>
>>>>>>>
>>>>>>> try {
>>>>>>> report = engine.openReportDesign( name );
>>>>>>> } catch ( EngineException e) {
>>>>>>>
>>>>>>> System.out.println("ERRO: PT.ALMEDINA.REPORTS.CONVERSOR.RUN\n
>>>>>>> EXCEPTION: "+e);
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>> if ( showInfo )
>>>>>>> {
>>>>>>> showReportInfo( engine, report );
>>>>>>> }
>>>>>>>
>>>>>>> // Create a task to run the report and convert the output to HTML
>>>>>>> // or PDF.
>>>>>>>
>>>>>>> if ( format != null )
>>>>>>> {
>>>>>>>
>>>>>>> parseParams( engine, report, params );
>>>>>>>
>>>>>>> IRunAndRenderTask task = engine.createRunAndRenderTask( report );
>>>>>>> /*
>>>>>>> //HTMLRenderContext renderContext = new HTMLRenderContext();
>>>>>>> //renderContext.setImageDirectory(IMAGE_URL);
>>>>>>>
>>>>>>> HTMLRenderContext renderContext = new HTMLRenderContext( );
>>>>>>> renderContext.setImageDirectory( IMAGE_URL ); //"image"//$NON-NLS-1$
>>>>>>> HashMap appContext = new HashMap( );
>>>>>>> appContext.put("PDF_RENDER_CONTEXT",
>>>>>>> renderContext );//EngineConstants.APPCONTEXT_PDF_RENDER_CONTEXT
>>>>>>> task.setAppContext( appContext );
>>>>>>>
>>>>>>> //task.setContext((Map) renderContext);
>>>>>>> */
>>>>>>> HTMLRenderOption options = new HTMLRenderOption( );
>>>>>>> options.setOutputFormat( format );
>>>>>>> String output = name.replaceFirst( ".rptdesign", "." + format );
>>>>>>> options.setOutputFileName( output );
>>>>>>> task.setRenderOption( options );
>>>>>>> String str = params.toString();
>>>>>>>
>>>>>>>
>>>>>>> //task.setParameterValues( params );
>>>>>>>
>>>>>>> // Run the report.
>>>>>>>
>>>>>>> try
>>>>>>> {
>>>>>>> task.run( );
>>>>>>> }
>>>>>>> catch (EngineException e)
>>>>>>> {
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>> engine.destroy( );
>>>>>>> }
>>>>>>>
>>>>>>> // Display properties of the report and the list of report
>>>>>>> parameters.
>>>>>>>
>>>>>>> static void showReportInfo( ReportEngine engine, IReportRunnable
>>>>>>> report )
>>>>>>> {
>>>>>>> // Display some of the general report properties.
>>>>>>> // See the ROM Design specification for a list of properties.
>>>>>>>
>>>>>>> System.out.print( "Report Name: " + report.getReportName() +
>>>>>>> "\nTitle: " + report.getProperty( "title" ) +
>>>>>>> "\nComments: " + report.getProperty( "comments" ) +
>>>>>>> "\nDescription: " + report.getProperty( "description" ) +
>>>>>>> "\nAuthor: " + report.getProperty( "author" ) +
>>>>>>> "\nCreated By: " + report.getProperty( "createdBy" ) +
>>>>>>> "\n" );
>>>>>>>
>>>>>>> // Display the list of report parameters with their groups.
>>>>>>> // Parameters defined outside a group appear inside a default,
>>>>>>> unnamed
>>>>>>> // group.
>>>>>>>
>>>>>>> IGetParameterDefinitionTask task =
>>>>>>> engine.createGetParameterDefinitionTask( report );
>>>>>>> Collection params = task.getParameterDefns( true );
>>>>>>> if ( params.isEmpty() )
>>>>>>> {
>>>>>>> System.out.print( "This report has no parameters.\n" );
>>>>>>> return;
>>>>>>> }
>>>>>>>
>>>>>>> Iterator iter = params.iterator( );
>>>>>>> while ( iter.hasNext( ) )
>>>>>>> {
>>>>>>> IParameterDefnBase param = (IParameterDefnBase) iter.next( );
>>>>>>> if ( param instanceof IParameterGroupDefn )
>>>>>>> {
>>>>>>> IParameterGroupDefn group = (IParameterGroupDefn) param;
>>>>>>> System.out.println( "Parameter Group: " + group.getDisplayName( ) );
>>>>>>> Iterator i2 = group.getContents( ).iterator( );
>>>>>>> while ( iter.hasNext( ) )
>>>>>>> {
>>>>>>> IScalarParameterDefn member = (IScalarParameterDefn) i2.next( );
>>>>>>> showParam( task, member, " " );
>>>>>>> }
>>>>>>> }
>>>>>>> else
>>>>>>> showParam( task, param, "" );
>>>>>>> }
>>>>>>> }
>>>>>>>
>>>>>>> // Show information for one parameter.
>>>>>>> // Release 1 supports only scalar (single-value) parameters.
>>>>>>>
>>>>>>> static void showParam( IGetParameterDefinitionTask task,
>>>>>>> IParameterDefnBase defn,
>>>>>>> String prefix )
>>>>>>> {
>>>>>>> IScalarParameterDefn param = (IScalarParameterDefn) defn;
>>>>>>> System.out.println( prefix + "Parameter: " + param.getName( ) );
>>>>>>> System.out.println( prefix + " Display Name: " +
>>>>>>> param.getDisplayName( ) );
>>>>>>> System.out.println( prefix + " Type: " + param.getDataType( ) );
>>>>>>> System.out.print( prefix + " Default Value: " );
>>>>>>>
>>>>>>> // The default value is an expression. Evaluate it.
>>>>>>>
>>>>>>> Object value = task.getDefaultValue( param );
>>>>>>> System.out.println( value == null ? "none" : value.toString( ) );
>>>>>>> }
>>>>>>>
>>>>>>> static void parseParams( ReportEngine engine, IReportRunnable
>>>>>>> report,
>>>>>>> HashMap values )
>>>>>>> {
>>>>>>>
>>>>>>> System.out.println("ENTREI!!! VALORES: "+values);
>>>>>>> if ( values.isEmpty( ) )
>>>>>>> return;
>>>>>>>
>>>>>>> IGetParameterDefinitionTask task =
>>>>>>> engine.createGetParameterDefinitionTask( report );
>>>>>>> Collection params = task.getParameterDefns( false );
>>>>>>> Iterator iter = values.keySet( ).iterator( );
>>>>>>> System.out.println("VOU ENTRAR NO WHILE!!!");
>>>>>>> int xxx = 1;
>>>>>>> while ( iter.hasNext( ) )
>>>>>>> {
>>>>>>> System.out.println("WHILE: "+xxx);
>>>>>>> String name = (String) iter.next( );
>>>>>>>
>>>>>>> IScalarParameterDefn found = null;
>>>>>>> Iterator i2 = params.iterator( );
>>>>>>> while ( i2.hasNext( ) )
>>>>>>> {
>>>>>>> IParameterDefnBase param = (IParameterDefnBase) i2.next( );
>>>>>>> if ( param instanceof IParameterGroupDefn )
>>>>>>> continue;
>>>>>>> if ( param.getName( ).equals( name ) )
>>>>>>> {
>>>>>>> found = (IScalarParameterDefn) param;
>>>>>>> break;
>>>>>>> }
>>>>>>> }
>>>>>>> if ( found == null )
>>>>>>> {
>>>>>>> System.err.println( "Parameter " + name + " not found in the
>>>>>>> report." );
>>>>>>> continue;
>>>>>>> }
>>>>>>> String value = (String) values.get( name );
>>>>>>> // ReportParameterConverter cfgConverter = new
>>>>>>> ReportParameterConverter( "", Locale.getDefault( ) );
>>>>>>> // Object obj = cfgConverter.parse( value, found.getDataType( ) );
>>>>>>> // values.put( name, obj );
>>>>>>> values.put( name, value );
>>>>>>> }
>>>>>>> }
>>>>>>> }
>>>
>>
>>


Re: SEVERE: Report engine can not create pdf emitter [message #112093 is a reply to message #111806] Fri, 20 January 2006 11:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: carvalho.humberto.almedina.net

Jason,

I followed the readme and your example runs fine.
When I tried the example in my project, the error appears again.

I then verified the libs in the WEB-INF directory of my application and
found out that I had some jars left from other version of the report
engine. I removed them and everything works.
I get the EXTENSION_POINT_NOT_FOUND error (which I believe is a known
bug) but the report runs and creates the files.

I want to thank all the patience and the help you gave me.

Thanks

Humberto Carvalho

Jason Weathersby wrote:
> Humberto,
>
> Attached is an ant project with the code you sent me slightly modified.
> Look at the readme and let me know if it runs the runreport.rptdesign.
>
> Thanks
>
> Jason
>
> "HC" <carvalho.humberto@almedina.net> wrote in message
> news:dqoksg$k74$1@utils.eclipse.org...
>> Jason,
>>
>> I have all the files exactly as you said in your last e-mail and even so
>> this don't work.
>>
>> Thanks
>>
>> Humberto Carvalho
>>
>>
>> Jason Weathersby wrote:
>>> Humberto,
>>>
>>> When I ran the file you sent me I ran it from Eclipse using the JDT.
>>> I copied itext to the Report Engine Directory
>>> I added the jars from the Report Engine Directory to my build path.
>>> Everything worked fine.
>>>
>>> If the issue is in tomcat using the Web Viewer, I did the following to
>>> get
>>> BIRT to work.
>>> copied the Web Viewer Example directory to Webapps under tomcat.
>>> Renamed it Birt-viewer.
>>> Copied prototype.js to birt-viewer/ajax/lib
>>> Copied itext-1.3.jar to
>>> birt-viewer/plugins/org.eclipse.birt.report.engine.pdf/lib
>>> Copied
>>> axis.jar
>>> axis-ant.jar
>>> commons-discovery-0.2.jar
>>> jaxrpc.jar
>>> saaj.jar
>>> wsdl4j-1.5.1.jar
>>> to birt-viewer/WEB-INF/lib
>>>
>>> Jason
>>>
>>> "HC" <carvalho.humberto@almedina.net> wrote in message
>>> news:dqnsv4$p59$1@utils.eclipse.org...
>>>> Jason,
>>>>
>>>> I'm using:
>>>> Windows XP SP2
>>>> Tomcat 5.5.12
>>>> Eclipse 3.1.1
>>>> BIRT 2.0.0
>>>> EMF 2.1.*
>>>> GEF 3.1.1
>>>>
>>>> The Report Engine and the Viewer that I use came in the
>>>> birt-runtime-2.0RC1.zip from BIRT download page.
>>>>
>>>> In attachment I send you a zip file with 2 files that I think you asked
>>>> for.
>>>>
>>>> Thanks for your help
>>>>
>>>> Humberto
>>>>
>>>>
>>>> Jason Weathersby wrote:
>>>>> Humberto,
>>>>>
>>>>> What version of BIRT are you using?
>>>>> Are you getting a stack trace?
>>>>> Also are you using Eclipse or something like Ant to build your class?
>>>>> Thanks
>>>>>
>>>>> Jason
>>>>>
>>>>> "HC" <carvalho.humberto@almedina.net> wrote in message
>>>>> news:43CE8A3E.60607@almedina.net...
>>>>>> Hello,
>>>>>>
>>>>>> I've tried what you said in your last e-mail, but the result was the
>>>>>> same.
>>>>>>
>>>>>> In my last e-mail I didn't told you that if I try to generate a pdf
>>>>>> file
>>>>>> or a html file in either cases the error occurs, and not only when I
>>>>>> try
>>>>>> to generate a pdf file.
>>>>>>
>>>>>> One thing that I saw comparing your list files with my Report Engine
>>>>>> files, is that model.jar in your Report Engine it's bigger than mine.
>>>>>> The
>>>>>> other files i think that are identical.
>>>>>>
>>>>>> I think that this isn't the problem, but I don't know.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Humberto Carvalho
>>>>>>
>>>>>> Jason Weathersby wrote:
>>>>>>> Humberto,
>>>>>>>
>>>>>>> I just tried your sample and it worked fine.
>>>>>>> I set my home to "c:/myruntime/report engine".
>>>>>>> Below is a directory listing of the report engine directory. Notice
>>>>>>> I
>>>>>>> added iText.
>>>>>>>
>>>>>>> 12/31/2005 11:50a 77,586 birt-oda.jar
>>>>>>> 12/31/2005 11:50a 956,273 chart-engine.jar
>>>>>>> 12/31/2005 11:50a 30,117 commons-cli-1.0.jar
>>>>>>> 12/31/2005 11:50a 37,754 commons-codec-1.3.jar
>>>>>>> 12/31/2005 11:50a 132,596 core.jar
>>>>>>> 12/31/2005 11:50a 569,702 dte.jar
>>>>>>> 12/31/2005 11:50a 870,507 engine.jar
>>>>>>> 12/31/2005 11:50a 71,513 flute.jar
>>>>>>> 11/29/2005 05:41p 1,145,105 itext-1.3.jar
>>>>>>> 12/31/2005 11:50a 699,081 js.jar
>>>>>>> 01/15/2006 11:33p 1,552 libs.txt
>>>>>>> 12/31/2005 11:50a 3,316,129 model.jar
>>>>>>> 12/31/2005 11:50a 80,541 oda.jar
>>>>>>> 12/31/2005 11:50a 69,367 odaconsumer-helper.jar
>>>>>>> 12/31/2005 11:50a 137,063
>>>>>>> org.eclipse.emf.common_2.1.0.jar
>>>>>>> 12/31/2005 11:50a 144,460
>>>>>>> org.eclipse.emf.ecore.xmi_2.1.0.jar
>>>>>>> 12/31/2005 11:50a 639,778
>>>>>>> org.eclipse.emf.ecore_2.1.0.jar
>>>>>>> 01/04/2006 04:48p <DIR> plugins
>>>>>>> 12/31/2005 11:50a 14,526 sac.jar
>>>>>>> 01/04/2006 04:48p <DIR> samples
>>>>>>> 12/31/2005 11:50a 43,275 scriptapi.jar
>>>>>>> 01/18/2006 11:00a 0 test.txt
>>>>>>> 12/31/2005 11:50a 161,563 Tidy.jar
>>>>>>>
>>>>>>> Jason
>>>>>>>
>>>>>>> "HC" <carvalho.humberto@almedina.net> wrote in message
>>>>>>> news:43CE2F39.9030104@almedina.net...
>>>>>>>> Thanks for your help,
>>>>>>>>
>>>>>>>> First I have to say that i'm using a Birt viewer and the Birt engine
>>>>>>>> API.
>>>>>>>>
>>>>>>>> If i use the viewer engine and then choose to print to pdf, this
>>>>>>>> works,
>>>>>>>> but when i try to generate a pdf file from a rptdesign file using
>>>>>>>> the
>>>>>>>> engine API, the error occurs
>>>>>>>>
>>>>>>>>
>>>>>>>> I think that I have all the required files in the right place, I
>>>>>>>> followed the instructions of the following url
>>>>>>>> " http://www.eclipse.org/birt/index.php?page=build/install.htm l"
>>>>>>>>
>>>>>>>> iText.jar is placed in
>>>>>>>> "plugins\org.eclipse.birt.report.engine.pdf\lib"
>>>>>>>>
>>>>>>>> In my application, the engine directory points to the viewer root
>>>>>>>> directory. I have also tried using the 'Report Engine' directory of
>>>>>>>> the
>>>>>>>> runtime distribution, with similar results.
>>>>>>>>
>>>>>>>> In attachment I send a java file that i think that could be the
>>>>>>>> problem...
>>>>>>>>
>>>>>>>> I'll wait for your answer..
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> Humberto Carvalho
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Jason Weathersby wrote:
>>>>>>>>> Can you upload the Stacktrace?
>>>>>>>>> Also verify that you have the other required files under the proper
>>>>>>>>> location, like the iText jar file.
>>>>>>>>>
>>>>>>>>> Jason Weathersby
>>>>>>>>> BIRT PMC
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> "Humberto Carvalho" <carvalho.humberto@gmail.com> wrote in message
>>>>>>>>> news:51ff09d618a253c7540a8c0018bd62e5$1@www.eclipse.org...
>>>>>>>>>> Hello,
>>>>>>>>>>
>>>>>>>>>> i need some help.
>>>>>>>>>>
>>>>>>>>>> I'm trying to generate a pdf file, but the following error occurs.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> SEVERE: Report engine can not create pdf emitter.
>>>>>>>>>> Report C:/Program Files/Apache/Tomcat
>>>>>>>>>> 5.5/webapps/BI/Documentos/estat.rptdesign
>>>>>>>>>> run failed.
>>>>>>>>>> org.eclipse.birt.report.engine.api.EngineException: Report engine
>>>>>>>>>> fails to
>>>>>>>>>> creat
>>>>>>>>>> e extension to handle this request.
>>>>>>>>>>
>>>>>>>>>> The software that i'm using are:
>>>>>>>>>> Windows XP SP2
>>>>>>>>>> Eclipse 3.1.1
>>>>>>>>>> BIRT 2.0.0
>>>>>>>>>> EMF 2.1.*
>>>>>>>>>> GEF 3.1.1
>>>>>>>>>>
>>>>>>>>>> I hope that someone can help me.
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>> ------------------------------------------------------------ --------------------
>>>>>>>
>>>>>>>
>>>>>>>> package pt.almedina.reports;
>>>>>>>>
>>>>>>>> /*
>>>>>>>> * Example command-line utility to generate BIRT reports. Shows the
>>>>>>>> basics
>>>>>>>> * of integrating the BIRT report engine into a simple Java
>>>>>>>> application.
>>>>>>>> */
>>>>>>>>
>>>>>>>>
>>>>>>>> import java.util.Collection;
>>>>>>>> import java.util.HashMap;
>>>>>>>> import java.util.Iterator;
>>>>>>>> import java.util.Map;
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> import org.eclipse.birt.report.engine.api.EngineConfig;
>>>>>>>> import org.eclipse.birt.report.engine.api.EngineConstants;
>>>>>>>> import org.eclipse.birt.report.engine.api.EngineException;
>>>>>>>> import org.eclipse.birt.report.engine.api.HTMLCompleteImageHandler;
>>>>>>>> import org.eclipse.birt.report.engine.api.HTMLEmitterConfig;
>>>>>>>> import org.eclipse.birt.report.engine.api.HTMLRenderContext;
>>>>>>>> import org.eclipse.birt.report.engine.api.HTMLRenderOption;
>>>>>>>> import
>>>>>>>> org.eclipse.birt.report.engine.api.IGetParameterDefinitionTa sk;
>>>>>>>> import org.eclipse.birt.report.engine.api.IHTMLActionHandler;
>>>>>>>> import org.eclipse.birt.report.engine.api.IParameterDefnBase;
>>>>>>>> import org.eclipse.birt.report.engine.api.IParameterGroupDefn;
>>>>>>>> import org.eclipse.birt.report.engine.api.IReportRunnable;
>>>>>>>> import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
>>>>>>>> import org.eclipse.birt.report.engine.api.IScalarParameterDefn;
>>>>>>>> import org.eclipse.birt.report.engine.api.ReportEngine;
>>>>>>>> import org.eclipse.birt.report.engine.api.ReportParameterConverter;
>>>>>>>>
>>>>>>>>
>>>>>>>> /**
>>>>>>>> * Runs a BIRT report and writes the output to a directory.
>>>>>>>> *
>>>>>>>> * RunReport report-name -[h|p] [-i] param=value
>>>>>>>> *
>>>>>>>> * -h HTML (default)
>>>>>>>> * -p PDF
>>>>>>>> * -i Display report info.
>>>>>>>> * param=value Set parameter "param" to the value "value".
>>>>>>>> */
>>>>>>>>
>>>>>>>> public class Conversor
>>>>>>>> {
>>>>>>>>
>>>>>>>> static String REPORTENGINE_URL = "C:/Program Files/Apache/Tomcat
>>>>>>>> 5.5/webapps/Viewer";//c:/reportengine";
>>>>>>>> static String IMAGE_URL = "C:/Program Files/Apache/Tomcat
>>>>>>>> 5.5/webapps/BI/Documentos";
>>>>>>>>
>>>>>>>> // Command-line main to parse arguments described above.
>>>>>>>>
>>>>>>>> public static void main(String[] args) throws EngineException
>>>>>>>> {
>>>>>>>>
>>>>>>>> int i = 0;
>>>>>>>> if ( i >= args.length )
>>>>>>>> {
>>>>>>>> System.out.println( "Nao foi especificado qualquer relatorio" );
>>>>>>>> return;
>>>>>>>> }
>>>>>>>> String reportName = args[i++];
>>>>>>>> String format = null;
>>>>>>>> boolean showInfo = false;
>>>>>>>>
>>>>>>>> // Stoare parameter values into a hash map to later pass to the
>>>>>>>> // BIRT report engine.
>>>>>>>>
>>>>>>>> HashMap params = new HashMap( );
>>>>>>>> for ( ; i < args.length; i++ )
>>>>>>>> {
>>>>>>>> if ( args[i].charAt(0) == '-' )
>>>>>>>> {
>>>>>>>> char flag = Character.toLowerCase( args[i].charAt( 1 ) );
>>>>>>>> if ( flag == 'p' )
>>>>>>>> {
>>>>>>>> format = HTMLRenderOption.OUTPUT_FORMAT_PDF;
>>>>>>>> }
>>>>>>>> else if ( flag == 'h' )
>>>>>>>> {
>>>>>>>> format = HTMLRenderOption.OUTPUT_FORMAT_HTML;
>>>>>>>> }
>>>>>>>> else if ( flag == 'i' )
>>>>>>>> {
>>>>>>>> showInfo = true;
>>>>>>>> }
>>>>>>>> else
>>>>>>>> {
>>>>>>>> usage( );
>>>>>>>> return;
>>>>>>>> }
>>>>>>>> }
>>>>>>>> else
>>>>>>>> {
>>>>>>>>
>>>>>>>> // Get a parameter value. Note, this example code only works
>>>>>>>> // for string parameters. If you have date or number parameters,
>>>>>>>> // your application should parse them, then put the corresponding
>>>>>>>> // objects into the hash map.
>>>>>>>>
>>>>>>>> String arg = args[i];
>>>>>>>> int posn = arg.indexOf( '=' );
>>>>>>>> if ( posn == -1 )
>>>>>>>> {
>>>>>>>> usage( );
>>>>>>>> return;
>>>>>>>> }
>>>>>>>> String param = arg.substring( 0, posn );
>>>>>>>> String value = arg.substring( posn + 1 );
>>>>>>>> Object put = params.put( param, value );
>>>>>>>>
>>>>>>>> }
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>> run( reportName, params, format, showInfo );
>>>>>>>>
>>>>>>>> }
>>>>>>>>
>>>>>>>> public static void usage( )
>>>>>>>> {
>>>>>>>> System.out.println( "Sintaxe:\n java RunReport rptName
>>>>>>>> [-h|p]\n
>>>>>>>> param=value ..." );
>>>>>>>> }
>>>>>>>>
>>>>>>>> // Example function to run a report given the report name,
>>>>>>>> parameters
>>>>>>>> and
>>>>>>>> // output type. The output is put into a file in the same directory
>>>>>>>> as
>>>>>>>> the
>>>>>>>> // report itself.
>>>>>>>>
>>>>>>>> public static void run( String name, HashMap params,
>>>>>>>> String format, boolean showInfo ) throws EngineException
>>>>>>>> {
>>>>>>>> // The EngineConfig is used to set up engine-wide configuration
>>>>>>>> // information.
>>>>>>>>
>>>>>>>> EngineConfig config = new EngineConfig( );
>>>>>>>>
>>>>>>>> // The Engine home is the location of the BIRT engine runtime.
>>>>>>>> // M3 Note: Use the report engine installed as part of the BIRT web
>>>>>>>> app
>>>>>>>> // used to preview reports. Alter this path to the location of your
>>>>>>>> // Eclipse installation.
>>>>>>>>
>>>>>>>> config.setEngineHome(REPORTENGINE_URL);
>>>>>>>>
>>>>>>>> // HTML reports can have embedded images or charts. Set up the
>>>>>>>> configuration
>>>>>>>> // required to write these into a directory in the output directory.
>>>>>>>> // The HTMLCompleteImageHandler is one provided by BIRT for this
>>>>>>>> purpose.
>>>>>>>> // Your application can create a customized version to provide
>>>>>>>> alternative
>>>>>>>> // ways to handle images.
>>>>>>>>
>>>>>>>> HTMLEmitterConfig hc = new HTMLEmitterConfig( );
>>>>>>>>
>>>>>>>>
>>>>>>>> HTMLCompleteImageHandler imageHandler = new
>>>>>>>> HTMLCompleteImageHandler( );
>>>>>>>> hc.setImageHandler( imageHandler );
>>>>>>>> config.setEmitterConfiguration( HTMLRenderOption.OUTPUT_FORMAT_HTML,
>>>>>>>> hc );
>>>>>>>>
>>>>>>>> // Create the report engine itself. This engine can be used
>>>>>>>> to
>>>>>>>> run
>>>>>>>> // multiple reports.
>>>>>>>>
>>>>>>>> ReportEngine engine = new ReportEngine( config );
>>>>>>>>
>>>>>>>> // Open the report design.
>>>>>>>>
>>>>>>>> IReportRunnable report = null;
>>>>>>>>
>>>>>>>>
>>>>>>>> try {
>>>>>>>> report = engine.openReportDesign( name );
>>>>>>>> } catch ( EngineException e) {
>>>>>>>>
>>>>>>>> System.out.println("ERRO: PT.ALMEDINA.REPORTS.CONVERSOR.RUN\n
>>>>>>>> EXCEPTION: "+e);
>>>>>>>>
>>>>>>>> }
>>>>>>>>
>>>>>>>>
>>>>>>>> if ( showInfo )
>>>>>>>> {
>>>>>>>> showReportInfo( engine, report );
>>>>>>>> }
>>>>>>>>
>>>>>>>> // Create a task to run the report and convert the output to HTML
>>>>>>>> // or PDF.
>>>>>>>>
>>>>>>>> if ( format != null )
>>>>>>>> {
>>>>>>>>
>>>>>>>> parseParams( engine, report, params );
>>>>>>>>
>>>>>>>> IRunAndRenderTask task = engine.createRunAndRenderTask( report );
>>>>>>>> /*
>>>>>>>> //HTMLRenderContext renderContext = new HTMLRenderContext();
>>>>>>>> //renderContext.setImageDirectory(IMAGE_URL);
>>>>>>>>
>>>>>>>> HTMLRenderContext renderContext = new HTMLRenderContext( );
>>>>>>>> renderContext.setImageDirectory( IMAGE_URL ); //"image"//$NON-NLS-1$
>>>>>>>> HashMap appContext = new HashMap( );
>>>>>>>> appContext.put("PDF_RENDER_CONTEXT",
>>>>>>>> renderContext );//EngineConstants.APPCONTEXT_PDF_RENDER_CONTEXT
>>>>>>>> task.setAppContext( appContext );
>>>>>>>>
>>>>>>>> //task.setContext((Map) renderContext);
>>>>>>>> */
>>>>>>>> HTMLRenderOption options = new HTMLRenderOption( );
>>>>>>>> options.setOutputFormat( format );
>>>>>>>> String output = name.replaceFirst( ".rptdesign", "." + format );
>>>>>>>> options.setOutputFileName( output );
>>>>>>>> task.setRenderOption( options );
>>>>>>>> String str = params.toString();
>>>>>>>>
>>>>>>>>
>>>>>>>> //task.setParameterValues( params );
>>>>>>>>
>>>>>>>> // Run the report.
>>>>>>>>
>>>>>>>> try
>>>>>>>> {
>>>>>>>> task.run( );
>>>>>>>> }
>>>>>>>> catch (EngineException e)
>>>>>>>> {
>>>>>>>> }
>>>>>>>> }
>>>>>>>>
>>>>>>>> engine.destroy( );
>>>>>>>> }
>>>>>>>>
>>>>>>>> // Display properties of the report and the list of report
>>>>>>>> parameters.
>>>>>>>>
>>>>>>>> static void showReportInfo( ReportEngine engine, IReportRunnable
>>>>>>>> report )
>>>>>>>> {
>>>>>>>> // Display some of the general report properties.
>>>>>>>> // See the ROM Design specification for a list of properties.
>>>>>>>>
>>>>>>>> System.out.print( "Report Name: " + report.getReportName() +
>>>>>>>> "\nTitle: " + report.getProperty( "title" ) +
>>>>>>>> "\nComments: " + report.getProperty( "comments" ) +
>>>>>>>> "\nDescription: " + report.getProperty( "description" ) +
>>>>>>>> "\nAuthor: " + report.getProperty( "author" ) +
>>>>>>>> "\nCreated By: " + report.getProperty( "createdBy" ) +
>>>>>>>> "\n" );
>>>>>>>>
>>>>>>>> // Display the list of report parameters with their groups.
>>>>>>>> // Parameters defined outside a group appear inside a default,
>>>>>>>> unnamed
>>>>>>>> // group.
>>>>>>>>
>>>>>>>> IGetParameterDefinitionTask task =
>>>>>>>> engine.createGetParameterDefinitionTask( report );
>>>>>>>> Collection params = task.getParameterDefns( true );
>>>>>>>> if ( params.isEmpty() )
>>>>>>>> {
>>>>>>>> System.out.print( "This report has no parameters.\n" );
>>>>>>>> return;
>>>>>>>> }
>>>>>>>>
>>>>>>>> Iterator iter = params.iterator( );
>>>>>>>> while ( iter.hasNext( ) )
>>>>>>>> {
>>>>>>>> IParameterDefnBase param = (IParameterDefnBase) iter.next( );
>>>>>>>> if ( param instanceof IParameterGroupDefn )
>>>>>>>> {
>>>>>>>> IParameterGroupDefn group = (IParameterGroupDefn) param;
>>>>>>>> System.out.println( "Parameter Group: " + group.getDisplayName( ) );
>>>>>>>> Iterator i2 = group.getContents( ).iterator( );
>>>>>>>> while ( iter.hasNext( ) )
>>>>>>>> {
>>>>>>>> IScalarParameterDefn member = (IScalarParameterDefn) i2.next( );
>>>>>>>> showParam( task, member, " " );
>>>>>>>> }
>>>>>>>> }
>>>>>>>> else
>>>>>>>> showParam( task, param, "" );
>>>>>>>> }
>>>>>>>> }
>>>>>>>>
>>>>>>>> // Show information for one parameter.
>>>>>>>> // Release 1 supports only scalar (single-value) parameters.
>>>>>>>>
>>>>>>>> static void showParam( IGetParameterDefinitionTask task,
>>>>>>>> IParameterDefnBase defn,
>>>>>>>> String prefix )
>>>>>>>> {
>>>>>>>> IScalarParameterDefn param = (IScalarParameterDefn) defn;
>>>>>>>> System.out.println( prefix + "Parameter: " + param.getName( ) );
>>>>>>>> System.out.println( prefix + " Display Name: " +
>>>>>>>> param.getDisplayName( ) );
>>>>>>>> System.out.println( prefix + " Type: " + param.getDataType( ) );
>>>>>>>> System.out.print( prefix + " Default Value: " );
>>>>>>>>
>>>>>>>> // The default value is an expression. Evaluate it.
>>>>>>>>
>>>>>>>> Object value = task.getDefaultValue( param );
>>>>>>>> System.out.println( value == null ? "none" : value.toString( ) );
>>>>>>>> }
>>>>>>>>
>>>>>>>> static void parseParams( ReportEngine engine, IReportRunnable
>>>>>>>> report,
>>>>>>>> HashMap values )
>>>>>>>> {
>>>>>>>>
>>>>>>>> System.out.println("ENTREI!!! VALORES: "+values);
>>>>>>>> if ( values.isEmpty( ) )
>>>>>>>> return;
>>>>>>>>
>>>>>>>> IGetParameterDefinitionTask task =
>>>>>>>> engine.createGetParameterDefinitionTask( report );
>>>>>>>> Collection params = task.getParameterDefns( false );
>>>>>>>> Iterator iter = values.keySet( ).iterator( );
>>>>>>>> System.out.println("VOU ENTRAR NO WHILE!!!");
>>>>>>>> int xxx = 1;
>>>>>>>> while ( iter.hasNext( ) )
>>>>>>>> {
>>>>>>>> System.out.println("WHILE: "+xxx);
>>>>>>>> String name = (String) iter.next( );
>>>>>>>>
>>>>>>>> IScalarParameterDefn found = null;
>>>>>>>> Iterator i2 = params.iterator( );
>>>>>>>> while ( i2.hasNext( ) )
>>>>>>>> {
>>>>>>>> IParameterDefnBase param = (IParameterDefnBase) i2.next( );
>>>>>>>> if ( param instanceof IParameterGroupDefn )
>>>>>>>> continue;
>>>>>>>> if ( param.getName( ).equals( name ) )
>>>>>>>> {
>>>>>>>> found = (IScalarParameterDefn) param;
>>>>>>>> break;
>>>>>>>> }
>>>>>>>> }
>>>>>>>> if ( found == null )
>>>>>>>> {
>>>>>>>> System.err.println( "Parameter " + name + " not found in the
>>>>>>>> report." );
>>>>>>>> continue;
>>>>>>>> }
>>>>>>>> String value = (String) values.get( name );
>>>>>>>> // ReportParameterConverter cfgConverter = new
>>>>>>>> ReportParameterConverter( "", Locale.getDefault( ) );
>>>>>>>> // Object obj = cfgConverter.parse( value, found.getDataType( ) );
>>>>>>>> // values.put( name, obj );
>>>>>>>> values.put( name, value );
>>>>>>>> }
>>>>>>>> }
>>>>>>>> }
>>>
>
>
Re: SEVERE: Report engine can not create pdf emitter [message #112272 is a reply to message #112093] Fri, 20 January 2006 14:47 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Glad to hear it is working!
Jason

"HC" <carvalho.humberto@almedina.net> wrote in message
news:dqqgpk$5tj$1@utils.eclipse.org...
> Jason,
>
> I followed the readme and your example runs fine.
> When I tried the example in my project, the error appears again.
>
> I then verified the libs in the WEB-INF directory of my application and
> found out that I had some jars left from other version of the report
> engine. I removed them and everything works.
> I get the EXTENSION_POINT_NOT_FOUND error (which I believe is a known bug)
> but the report runs and creates the files.
>
> I want to thank all the patience and the help you gave me.
>
> Thanks
>
> Humberto Carvalho
>
> Jason Weathersby wrote:
>> Humberto,
>>
>> Attached is an ant project with the code you sent me slightly modified.
>> Look at the readme and let me know if it runs the runreport.rptdesign.
>>
>> Thanks
>>
>> Jason
>>
>> "HC" <carvalho.humberto@almedina.net> wrote in message
>> news:dqoksg$k74$1@utils.eclipse.org...
>>> Jason,
>>>
>>> I have all the files exactly as you said in your last e-mail and even so
>>> this don't work.
>>>
>>> Thanks
>>>
>>> Humberto Carvalho
>>>
>>>
>>> Jason Weathersby wrote:
>>>> Humberto,
>>>>
>>>> When I ran the file you sent me I ran it from Eclipse using the JDT.
>>>> I copied itext to the Report Engine Directory
>>>> I added the jars from the Report Engine Directory to my build path.
>>>> Everything worked fine.
>>>>
>>>> If the issue is in tomcat using the Web Viewer, I did the following to
>>>> get
>>>> BIRT to work.
>>>> copied the Web Viewer Example directory to Webapps under tomcat.
>>>> Renamed it Birt-viewer.
>>>> Copied prototype.js to birt-viewer/ajax/lib
>>>> Copied itext-1.3.jar to
>>>> birt-viewer/plugins/org.eclipse.birt.report.engine.pdf/lib
>>>> Copied
>>>> axis.jar
>>>> axis-ant.jar
>>>> commons-discovery-0.2.jar
>>>> jaxrpc.jar
>>>> saaj.jar
>>>> wsdl4j-1.5.1.jar
>>>> to birt-viewer/WEB-INF/lib
>>>>
>>>> Jason
>>>>
>>>> "HC" <carvalho.humberto@almedina.net> wrote in message
>>>> news:dqnsv4$p59$1@utils.eclipse.org...
>>>>> Jason,
>>>>>
>>>>> I'm using:
>>>>> Windows XP SP2
>>>>> Tomcat 5.5.12
>>>>> Eclipse 3.1.1
>>>>> BIRT 2.0.0
>>>>> EMF 2.1.*
>>>>> GEF 3.1.1
>>>>>
>>>>> The Report Engine and the Viewer that I use came in the
>>>>> birt-runtime-2.0RC1.zip from BIRT download page.
>>>>>
>>>>> In attachment I send you a zip file with 2 files that I think you
>>>>> asked
>>>>> for.
>>>>>
>>>>> Thanks for your help
>>>>>
>>>>> Humberto
>>>>>
>>>>>
>>>>> Jason Weathersby wrote:
>>>>>> Humberto,
>>>>>>
>>>>>> What version of BIRT are you using?
>>>>>> Are you getting a stack trace?
>>>>>> Also are you using Eclipse or something like Ant to build your class?
>>>>>> Thanks
>>>>>>
>>>>>> Jason
>>>>>>
>>>>>> "HC" <carvalho.humberto@almedina.net> wrote in message
>>>>>> news:43CE8A3E.60607@almedina.net...
>>>>>>> Hello,
>>>>>>>
>>>>>>> I've tried what you said in your last e-mail, but the result was the
>>>>>>> same.
>>>>>>>
>>>>>>> In my last e-mail I didn't told you that if I try to generate a pdf
>>>>>>> file
>>>>>>> or a html file in either cases the error occurs, and not only when I
>>>>>>> try
>>>>>>> to generate a pdf file.
>>>>>>>
>>>>>>> One thing that I saw comparing your list files with my Report Engine
>>>>>>> files, is that model.jar in your Report Engine it's bigger than
>>>>>>> mine.
>>>>>>> The
>>>>>>> other files i think that are identical.
>>>>>>>
>>>>>>> I think that this isn't the problem, but I don't know.
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Humberto Carvalho
>>>>>>>
>>>>>>> Jason Weathersby wrote:
>>>>>>>> Humberto,
>>>>>>>>
>>>>>>>> I just tried your sample and it worked fine.
>>>>>>>> I set my home to "c:/myruntime/report engine".
>>>>>>>> Below is a directory listing of the report engine directory.
>>>>>>>> Notice I
>>>>>>>> added iText.
>>>>>>>>
>>>>>>>> 12/31/2005 11:50a 77,586 birt-oda.jar
>>>>>>>> 12/31/2005 11:50a 956,273 chart-engine.jar
>>>>>>>> 12/31/2005 11:50a 30,117 commons-cli-1.0.jar
>>>>>>>> 12/31/2005 11:50a 37,754 commons-codec-1.3.jar
>>>>>>>> 12/31/2005 11:50a 132,596 core.jar
>>>>>>>> 12/31/2005 11:50a 569,702 dte.jar
>>>>>>>> 12/31/2005 11:50a 870,507 engine.jar
>>>>>>>> 12/31/2005 11:50a 71,513 flute.jar
>>>>>>>> 11/29/2005 05:41p 1,145,105 itext-1.3.jar
>>>>>>>> 12/31/2005 11:50a 699,081 js.jar
>>>>>>>> 01/15/2006 11:33p 1,552 libs.txt
>>>>>>>> 12/31/2005 11:50a 3,316,129 model.jar
>>>>>>>> 12/31/2005 11:50a 80,541 oda.jar
>>>>>>>> 12/31/2005 11:50a 69,367 odaconsumer-helper.jar
>>>>>>>> 12/31/2005 11:50a 137,063
>>>>>>>> org.eclipse.emf.common_2.1.0.jar
>>>>>>>> 12/31/2005 11:50a 144,460
>>>>>>>> org.eclipse.emf.ecore.xmi_2.1.0.jar
>>>>>>>> 12/31/2005 11:50a 639,778
>>>>>>>> org.eclipse.emf.ecore_2.1.0.jar
>>>>>>>> 01/04/2006 04:48p <DIR> plugins
>>>>>>>> 12/31/2005 11:50a 14,526 sac.jar
>>>>>>>> 01/04/2006 04:48p <DIR> samples
>>>>>>>> 12/31/2005 11:50a 43,275 scriptapi.jar
>>>>>>>> 01/18/2006 11:00a 0 test.txt
>>>>>>>> 12/31/2005 11:50a 161,563 Tidy.jar
>>>>>>>>
>>>>>>>> Jason
>>>>>>>>
>>>>>>>> "HC" <carvalho.humberto@almedina.net> wrote in message
>>>>>>>> news:43CE2F39.9030104@almedina.net...
>>>>>>>>> Thanks for your help,
>>>>>>>>>
>>>>>>>>> First I have to say that i'm using a Birt viewer and the Birt
>>>>>>>>> engine
>>>>>>>>> API.
>>>>>>>>>
>>>>>>>>> If i use the viewer engine and then choose to print to pdf, this
>>>>>>>>> works,
>>>>>>>>> but when i try to generate a pdf file from a rptdesign file using
>>>>>>>>> the
>>>>>>>>> engine API, the error occurs
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I think that I have all the required files in the right place, I
>>>>>>>>> followed the instructions of the following url
>>>>>>>>> " http://www.eclipse.org/birt/index.php?page=build/install.htm l"
>>>>>>>>>
>>>>>>>>> iText.jar is placed in
>>>>>>>>> "plugins\org.eclipse.birt.report.engine.pdf\lib"
>>>>>>>>>
>>>>>>>>> In my application, the engine directory points to the viewer root
>>>>>>>>> directory. I have also tried using the 'Report Engine' directory
>>>>>>>>> of
>>>>>>>>> the
>>>>>>>>> runtime distribution, with similar results.
>>>>>>>>>
>>>>>>>>> In attachment I send a java file that i think that could be the
>>>>>>>>> problem...
>>>>>>>>>
>>>>>>>>> I'll wait for your answer..
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> Humberto Carvalho
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Jason Weathersby wrote:
>>>>>>>>>> Can you upload the Stacktrace?
>>>>>>>>>> Also verify that you have the other required files under the
>>>>>>>>>> proper
>>>>>>>>>> location, like the iText jar file.
>>>>>>>>>>
>>>>>>>>>> Jason Weathersby
>>>>>>>>>> BIRT PMC
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> "Humberto Carvalho" <carvalho.humberto@gmail.com> wrote in
>>>>>>>>>> message
>>>>>>>>>> news:51ff09d618a253c7540a8c0018bd62e5$1@www.eclipse.org...
>>>>>>>>>>> Hello,
>>>>>>>>>>>
>>>>>>>>>>> i need some help.
>>>>>>>>>>>
>>>>>>>>>>> I'm trying to generate a pdf file, but the following error
>>>>>>>>>>> occurs.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> SEVERE: Report engine can not create pdf emitter.
>>>>>>>>>>> Report C:/Program Files/Apache/Tomcat
>>>>>>>>>>> 5.5/webapps/BI/Documentos/estat.rptdesign
>>>>>>>>>>> run failed.
>>>>>>>>>>> org.eclipse.birt.report.engine.api.EngineException: Report
>>>>>>>>>>> engine
>>>>>>>>>>> fails to
>>>>>>>>>>> creat
>>>>>>>>>>> e extension to handle this request.
>>>>>>>>>>>
>>>>>>>>>>> The software that i'm using are:
>>>>>>>>>>> Windows XP SP2
>>>>>>>>>>> Eclipse 3.1.1
>>>>>>>>>>> BIRT 2.0.0
>>>>>>>>>>> EMF 2.1.*
>>>>>>>>>>> GEF 3.1.1
>>>>>>>>>>>
>>>>>>>>>>> I hope that someone can help me.
>>>>>>>>>>>
>>>>>>>>>>> Thanks
>>>>>>>>>>>
>>>>>>>> ------------------------------------------------------------ --------------------
>>>>>>>>
>>>>>>>>
>>>>>>>>> package pt.almedina.reports;
>>>>>>>>>
>>>>>>>>> /*
>>>>>>>>> * Example command-line utility to generate BIRT reports. Shows the
>>>>>>>>> basics
>>>>>>>>> * of integrating the BIRT report engine into a simple Java
>>>>>>>>> application.
>>>>>>>>> */
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> import java.util.Collection;
>>>>>>>>> import java.util.HashMap;
>>>>>>>>> import java.util.Iterator;
>>>>>>>>> import java.util.Map;
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> import org.eclipse.birt.report.engine.api.EngineConfig;
>>>>>>>>> import org.eclipse.birt.report.engine.api.EngineConstants;
>>>>>>>>> import org.eclipse.birt.report.engine.api.EngineException;
>>>>>>>>> import
>>>>>>>>> org.eclipse.birt.report.engine.api.HTMLCompleteImageHandler;
>>>>>>>>> import org.eclipse.birt.report.engine.api.HTMLEmitterConfig;
>>>>>>>>> import org.eclipse.birt.report.engine.api.HTMLRenderContext;
>>>>>>>>> import org.eclipse.birt.report.engine.api.HTMLRenderOption;
>>>>>>>>> import
>>>>>>>>> org.eclipse.birt.report.engine.api.IGetParameterDefinitionTa sk;
>>>>>>>>> import org.eclipse.birt.report.engine.api.IHTMLActionHandler;
>>>>>>>>> import org.eclipse.birt.report.engine.api.IParameterDefnBase;
>>>>>>>>> import org.eclipse.birt.report.engine.api.IParameterGroupDefn;
>>>>>>>>> import org.eclipse.birt.report.engine.api.IReportRunnable;
>>>>>>>>> import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
>>>>>>>>> import org.eclipse.birt.report.engine.api.IScalarParameterDefn;
>>>>>>>>> import org.eclipse.birt.report.engine.api.ReportEngine;
>>>>>>>>> import
>>>>>>>>> org.eclipse.birt.report.engine.api.ReportParameterConverter;
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> /**
>>>>>>>>> * Runs a BIRT report and writes the output to a directory.
>>>>>>>>> *
>>>>>>>>> * RunReport report-name -[h|p] [-i] param=value
>>>>>>>>> *
>>>>>>>>> * -h HTML (default)
>>>>>>>>> * -p PDF
>>>>>>>>> * -i Display report info.
>>>>>>>>> * param=value Set parameter "param" to the value "value".
>>>>>>>>> */
>>>>>>>>>
>>>>>>>>> public class Conversor
>>>>>>>>> {
>>>>>>>>>
>>>>>>>>> static String REPORTENGINE_URL = "C:/Program Files/Apache/Tomcat
>>>>>>>>> 5.5/webapps/Viewer";//c:/reportengine";
>>>>>>>>> static String IMAGE_URL = "C:/Program Files/Apache/Tomcat
>>>>>>>>> 5.5/webapps/BI/Documentos";
>>>>>>>>>
>>>>>>>>> // Command-line main to parse arguments described above.
>>>>>>>>>
>>>>>>>>> public static void main(String[] args) throws EngineException
>>>>>>>>> {
>>>>>>>>>
>>>>>>>>> int i = 0;
>>>>>>>>> if ( i >= args.length )
>>>>>>>>> {
>>>>>>>>> System.out.println( "Nao foi especificado qualquer relatorio" );
>>>>>>>>> return;
>>>>>>>>> }
>>>>>>>>> String reportName = args[i++];
>>>>>>>>> String format = null;
>>>>>>>>> boolean showInfo = false;
>>>>>>>>>
>>>>>>>>> // Stoare parameter values into a hash map to later pass to the
>>>>>>>>> // BIRT report engine.
>>>>>>>>>
>>>>>>>>> HashMap params = new HashMap( );
>>>>>>>>> for ( ; i < args.length; i++ )
>>>>>>>>> {
>>>>>>>>> if ( args[i].charAt(0) == '-' )
>>>>>>>>> {
>>>>>>>>> char flag = Character.toLowerCase( args[i].charAt( 1 ) );
>>>>>>>>> if ( flag == 'p' )
>>>>>>>>> {
>>>>>>>>> format = HTMLRenderOption.OUTPUT_FORMAT_PDF;
>>>>>>>>> }
>>>>>>>>> else if ( flag == 'h' )
>>>>>>>>> {
>>>>>>>>> format = HTMLRenderOption.OUTPUT_FORMAT_HTML;
>>>>>>>>> }
>>>>>>>>> else if ( flag == 'i' )
>>>>>>>>> {
>>>>>>>>> showInfo = true;
>>>>>>>>> }
>>>>>>>>> else
>>>>>>>>> {
>>>>>>>>> usage( );
>>>>>>>>> return;
>>>>>>>>> }
>>>>>>>>> }
>>>>>>>>> else
>>>>>>>>> {
>>>>>>>>>
>>>>>>>>> // Get a parameter value. Note, this example code only works
>>>>>>>>> // for string parameters. If you have date or number parameters,
>>>>>>>>> // your application should parse them, then put the corresponding
>>>>>>>>> // objects into the hash map.
>>>>>>>>>
>>>>>>>>> String arg = args[i];
>>>>>>>>> int posn = arg.indexOf( '=' );
>>>>>>>>> if ( posn == -1 )
>>>>>>>>> {
>>>>>>>>> usage( );
>>>>>>>>> return;
>>>>>>>>> }
>>>>>>>>> String param = arg.substring( 0, posn );
>>>>>>>>> String value = arg.substring( posn + 1 );
>>>>>>>>> Object put = params.put( param, value );
>>>>>>>>>
>>>>>>>>> }
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> run( reportName, params, format, showInfo );
>>>>>>>>>
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> public static void usage( )
>>>>>>>>> {
>>>>>>>>> System.out.println( "Sintaxe:\n java RunReport rptName
>>>>>>>>> [-h|p]\n
>>>>>>>>> param=value ..." );
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> // Example function to run a report given the report name,
>>>>>>>>> parameters
>>>>>>>>> and
>>>>>>>>> // output type. The output is put into a file in the same
>>>>>>>>> directory as
>>>>>>>>> the
>>>>>>>>> // report itself.
>>>>>>>>>
>>>>>>>>> public static void run( String name, HashMap params,
>>>>>>>>> String format, boolean showInfo ) throws EngineException
>>>>>>>>> {
>>>>>>>>> // The EngineConfig is used to set up engine-wide configuration
>>>>>>>>> // information.
>>>>>>>>>
>>>>>>>>> EngineConfig config = new EngineConfig( );
>>>>>>>>>
>>>>>>>>> // The Engine home is the location of the BIRT engine runtime.
>>>>>>>>> // M3 Note: Use the report engine installed as part of the BIRT
>>>>>>>>> web
>>>>>>>>> app
>>>>>>>>> // used to preview reports. Alter this path to the location of
>>>>>>>>> your
>>>>>>>>> // Eclipse installation.
>>>>>>>>>
>>>>>>>>> config.setEngineHome(REPORTENGINE_URL);
>>>>>>>>>
>>>>>>>>> // HTML reports can have embedded images or charts. Set up the
>>>>>>>>> configuration
>>>>>>>>> // required to write these into a directory in the output
>>>>>>>>> directory.
>>>>>>>>> // The HTMLCompleteImageHandler is one provided by BIRT for this
>>>>>>>>> purpose.
>>>>>>>>> // Your application can create a customized version to provide
>>>>>>>>> alternative
>>>>>>>>> // ways to handle images.
>>>>>>>>>
>>>>>>>>> HTMLEmitterConfig hc = new HTMLEmitterConfig( );
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> HTMLCompleteImageHandler imageHandler = new
>>>>>>>>> HTMLCompleteImageHandler( );
>>>>>>>>> hc.setImageHandler( imageHandler );
>>>>>>>>> config.setEmitterConfiguration(
>>>>>>>>> HTMLRenderOption.OUTPUT_FORMAT_HTML,
>>>>>>>>> hc );
>>>>>>>>>
>>>>>>>>> // Create the report engine itself. This engine can be used
>>>>>>>>> to
>>>>>>>>> run
>>>>>>>>> // multiple reports.
>>>>>>>>>
>>>>>>>>> ReportEngine engine = new ReportEngine( config );
>>>>>>>>>
>>>>>>>>> // Open the report design.
>>>>>>>>>
>>>>>>>>> IReportRunnable report = null;
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> try {
>>>>>>>>> report = engine.openReportDesign( name );
>>>>>>>>> } catch ( EngineException e) {
>>>>>>>>>
>>>>>>>>> System.out.println("ERRO:
>>>>>>>>> PT.ALMEDINA.REPORTS.CONVERSOR.RUN\n
>>>>>>>>> EXCEPTION: "+e);
>>>>>>>>>
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> if ( showInfo )
>>>>>>>>> {
>>>>>>>>> showReportInfo( engine, report );
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> // Create a task to run the report and convert the output to HTML
>>>>>>>>> // or PDF.
>>>>>>>>>
>>>>>>>>> if ( format != null )
>>>>>>>>> {
>>>>>>>>>
>>>>>>>>> parseParams( engine, report, params );
>>>>>>>>>
>>>>>>>>> IRunAndRenderTask task = engine.createRunAndRenderTask( report );
>>>>>>>>> /*
>>>>>>>>> //HTMLRenderContext renderContext = new HTMLRenderContext();
>>>>>>>>> //renderContext.setImageDirectory(IMAGE_URL);
>>>>>>>>>
>>>>>>>>> HTMLRenderContext renderContext = new HTMLRenderContext( );
>>>>>>>>> renderContext.setImageDirectory( IMAGE_URL );
>>>>>>>>> //"image"//$NON-NLS-1$
>>>>>>>>> HashMap appContext = new HashMap( );
>>>>>>>>> appContext.put("PDF_RENDER_CONTEXT",
>>>>>>>>> renderContext );//EngineConstants.APPCONTEXT_PDF_RENDER_CONTEXT
>>>>>>>>> task.setAppContext( appContext );
>>>>>>>>>
>>>>>>>>> //task.setContext((Map) renderContext);
>>>>>>>>> */
>>>>>>>>> HTMLRenderOption options = new HTMLRenderOption( );
>>>>>>>>> options.setOutputFormat( format );
>>>>>>>>> String output = name.replaceFirst( ".rptdesign", "." + format );
>>>>>>>>> options.setOutputFileName( output );
>>>>>>>>> task.setRenderOption( options );
>>>>>>>>> String str = params.toString();
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> //task.setParameterValues( params );
>>>>>>>>>
>>>>>>>>> // Run the report.
>>>>>>>>>
>>>>>>>>> try
>>>>>>>>> {
>>>>>>>>> task.run( );
>>>>>>>>> }
>>>>>>>>> catch (EngineException e)
>>>>>>>>> {
>>>>>>>>> }
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> engine.destroy( );
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> // Display properties of the report and the list of report
>>>>>>>>> parameters.
>>>>>>>>>
>>>>>>>>> static void showReportInfo( ReportEngine engine, IReportRunnable
>>>>>>>>> report )
>>>>>>>>> {
>>>>>>>>> // Display some of the general report properties.
>>>>>>>>> // See the ROM Design specification for a list of properties.
>>>>>>>>>
>>>>>>>>> System.out.print( "Report Name: " + report.getReportName() +
>>>>>>>>> "\nTitle: " + report.getProperty( "title" ) +
>>>>>>>>> "\nComments: " + report.getProperty( "comments" ) +
>>>>>>>>> "\nDescription: " + report.getProperty( "description" ) +
>>>>>>>>> "\nAuthor: " + report.getProperty( "author" ) +
>>>>>>>>> "\nCreated By: " + report.getProperty( "createdBy" ) +
>>>>>>>>> "\n" );
>>>>>>>>>
>>>>>>>>> // Display the list of report parameters with their groups.
>>>>>>>>> // Parameters defined outside a group appear inside a default,
>>>>>>>>> unnamed
>>>>>>>>> // group.
>>>>>>>>>
>>>>>>>>> IGetParameterDefinitionTask task =
>>>>>>>>> engine.createGetParameterDefinitionTask( report );
>>>>>>>>> Collection params = task.getParameterDefns( true );
>>>>>>>>> if ( params.isEmpty() )
>>>>>>>>> {
>>>>>>>>> System.out.print( "This report has no parameters.\n" );
>>>>>>>>> return;
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> Iterator iter = params.iterator( );
>>>>>>>>> while ( iter.hasNext( ) )
>>>>>>>>> {
>>>>>>>>> IParameterDefnBase param = (IParameterDefnBase) iter.next( );
>>>>>>>>> if ( param instanceof IParameterGroupDefn )
>>>>>>>>> {
>>>>>>>>> IParameterGroupDefn group = (IParameterGroupDefn) param;
>>>>>>>>> System.out.println( "Parameter Group: " +
>>>>>>>>> group.getDisplayName( ) );
>>>>>>>>> Iterator i2 = group.getContents( ).iterator( );
>>>>>>>>> while ( iter.hasNext( ) )
>>>>>>>>> {
>>>>>>>>> IScalarParameterDefn member = (IScalarParameterDefn) i2.next( );
>>>>>>>>> showParam( task, member, " " );
>>>>>>>>> }
>>>>>>>>> }
>>>>>>>>> else
>>>>>>>>> showParam( task, param, "" );
>>>>>>>>> }
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> // Show information for one parameter.
>>>>>>>>> // Release 1 supports only scalar (single-value) parameters.
>>>>>>>>>
>>>>>>>>> static void showParam( IGetParameterDefinitionTask task,
>>>>>>>>> IParameterDefnBase defn,
>>>>>>>>> String prefix )
>>>>>>>>> {
>>>>>>>>> IScalarParameterDefn param = (IScalarParameterDefn) defn;
>>>>>>>>> System.out.println( prefix + "Parameter: " + param.getName( ) );
>>>>>>>>> System.out.println( prefix + " Display Name: " +
>>>>>>>>> param.getDisplayName( ) );
>>>>>>>>> System.out.println( prefix + " Type: " + param.getDataType( ) );
>>>>>>>>> System.out.print( prefix + " Default Value: " );
>>>>>>>>>
>>>>>>>>> // The default value is an expression. Evaluate it.
>>>>>>>>>
>>>>>>>>> Object value = task.getDefaultValue( param );
>>>>>>>>> System.out.println( value == null ? "none" : value.toString( ) );
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> static void parseParams( ReportEngine engine, IReportRunnable
>>>>>>>>> report,
>>>>>>>>> HashMap values )
>>>>>>>>> {
>>>>>>>>>
>>>>>>>>> System.out.println("ENTREI!!! VALORES: "+values);
>>>>>>>>> if ( values.isEmpty( ) )
>>>>>>>>> return;
>>>>>>>>>
>>>>>>>>> IGetParameterDefinitionTask task =
>>>>>>>>> engine.createGetParameterDefinitionTask( report );
>>>>>>>>> Collection params = task.getParameterDefns( false );
>>>>>>>>> Iterator iter = values.keySet( ).iterator( );
>>>>>>>>> System.out.println("VOU ENTRAR NO WHILE!!!");
>>>>>>>>> int xxx = 1;
>>>>>>>>> while ( iter.hasNext( ) )
>>>>>>>>> {
>>>>>>>>> System.out.println("WHILE: "+xxx);
>>>>>>>>> String name = (String) iter.next( );
>>>>>>>>>
>>>>>>>>> IScalarParameterDefn found = null;
>>>>>>>>> Iterator i2 = params.iterator( );
>>>>>>>>> while ( i2.hasNext( ) )
>>>>>>>>> {
>>>>>>>>> IParameterDefnBase param = (IParameterDefnBase) i2.next( );
>>>>>>>>> if ( param instanceof IParameterGroupDefn )
>>>>>>>>> continue;
>>>>>>>>> if ( param.getName( ).equals( name ) )
>>>>>>>>> {
>>>>>>>>> found = (IScalarParameterDefn) param;
>>>>>>>>> break;
>>>>>>>>> }
>>>>>>>>> }
>>>>>>>>> if ( found == null )
>>>>>>>>> {
>>>>>>>>> System.err.println( "Parameter " + name + " not found in the
>>>>>>>>> report." );
>>>>>>>>> continue;
>>>>>>>>> }
>>>>>>>>> String value = (String) values.get( name );
>>>>>>>>> // ReportParameterConverter cfgConverter = new
>>>>>>>>> ReportParameterConverter( "", Locale.getDefault( ) );
>>>>>>>>> // Object obj = cfgConverter.parse( value, found.getDataType( ) );
>>>>>>>>> // values.put( name, obj );
>>>>>>>>> values.put( name, value );
>>>>>>>>> }
>>>>>>>>> }
>>>>>>>>> }
>>>>
>>
Previous Topic:ReportDesign scripting question
Next Topic:Parameter Input Validation
Goto Forum:
  


Current Time: Sun Dec 22 02:08:26 GMT 2024

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

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

Back to the top