Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Dynamically generate pie chart in script
Dynamically generate pie chart in script [message #901128] Thu, 09 August 2012 21:56 Go to next message
zubin Missing name is currently offline zubin Missing nameFriend
Messages: 32
Registered: July 2009
Member
Following are my code to create in script, and i am getting following error when I try it on eclipse 4.2:
ReferenceError: "ChartWithAxesImpl" is not defined. (/report/method[@name="beforeFactory"]#168)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine.evaluate(JavascriptEngine.java:295)

it seems i am missing jar file on my path, any other thought? thx

importPackage( Packages.org.eclipse.birt.report.model.api );
importPackage( Packages.org.eclipse.birt.chart.model.impl );

var pieChartComponent = elementFactory.newExtendedItem( null, "Chart" );

pieChartComponent.setHeight( "5.406in" );//$NON-NLS-1$
pieChartComponent.setWidth( "7.927in" );//$NON-NLS-1$
pieChartComponent.setProperty( "dataSet", "CampaignSummaryQuery" );//$NON-NLS-1$

pieChartComponent.setProperty( "chart.instance", createMultiYAxisChart( ) );
reportDesignHandle.getBody( ).add(pieChartComponent);

function createMultiYAxisChart( )
{
cwaBar = ChartWithAxesImpl.create( );

// Plot
cwaBar.getBlock( ).setBackground( ColorDefinitionImpl.WHITE( ) );
p = cwaBar.getPlot( );
p.getClientArea( ).setBackground( ColorDefinitionImpl.create( 255,
245,
255 ) );

// Title
cwaBar.getTitle( )
.getLabel( )
.getCaption( )
.setValue( "Line Chart with Multiple Y Axis" );//$NON-NLS-1$

// Legend
lg = cwaBar.getLegend( );
lia = lg.getOutline( );
lg.getText( ).getFont( ).setSize( 16 );
lia.setStyle( LineStyle.SOLID_LITERAL );
lg.getInsets( ).set( 10, 5, 0, 0 );
lg.getOutline( ).setVisible( false );
lg.setAnchor( Anchor.NORTH_LITERAL );

// X-Axis
xAxisPrimary = cwaBar.getPrimaryBaseAxes( )[0];
xAxisPrimary.setType( AxisType.TEXT_LITERAL );
xAxisPrimary.getMajorGrid( ).setTickStyle( TickStyle.BELOW_LITERAL );
xAxisPrimary.getOrigin( ).setType( IntersectionType.VALUE_LITERAL );
xAxisPrimary.getTitle( ).setVisible( false );

// Y-Axis
yAxisPrimary = cwaBar.getPrimaryOrthogonalAxis( xAxisPrimary );
yAxisPrimary.getMajorGrid( ).setTickStyle( TickStyle.LEFT_LITERAL );
yAxisPrimary.getTitle( )
.getCaption( )
.setValue( "Sales Growth ($Million)" );//$NON-NLS-1$

// Y-Axis (2)
yAxis = AxisImpl.create( Axis.ORTHOGONAL );
yAxis.setType( AxisType.LINEAR_LITERAL );
yAxis.getMajorGrid( ).setTickStyle( TickStyle.RIGHT_LITERAL );
yAxis.setLabelPosition( Position.RIGHT_LITERAL );
xAxisPrimary.getAssociatedAxes( ).add( yAxis );

// Data Set
// TextDataSet categoryValues = TextDataSetImpl.create( new String[]{
// "March", "April", "May", "June", "July"} );//$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$//$NON-NLS-5$
// NumberDataSet orthoValues1 = NumberDataSetImpl.create( new double[]{
// 12.5, 19.6, 18.3, 13.2, 26.5
// } );
// NumberDataSet orthoValues2 = NumberDataSetImpl.create( new double[]{
// 22.7, 23.6, 38.3, 43.2, 40.5
// } );

// X-Series
seCategory = SeriesImpl.create( );
query = QueryImpl.create( "row[\"ProductLine\"]" );//$NON-NLS-1$
seCategory.getDataDefinition( ).add( query );
// seCategory.setDataSet( categoryValues );

sdX = SeriesDefinitionImpl.create( );
xAxisPrimary.getSeriesDefinitions( ).add( sdX );
sdX.getSeries( ).add( seCategory );

// Y-Series (1)
ls1 = LineSeriesImpl.create( );
ls1.setSeriesIdentifier( "A Corp." );//$NON-NLS-1$

query1 = QueryImpl.create( "row[\"buyprice\"]" );//$NON-NLS-1$
ls1.getDataDefinition( ).add( query1 );

//ls1.setDataSet( orthoValues1 );
ls1.getLineAttributes( ).setColor( ColorDefinitionImpl.CREAM( ) );
ls1.getMarker( ).setType( MarkerType.TRIANGLE_LITERAL );
ls1.getMarker( ).setSize( 10 );
ls1.getLabel( ).setVisible( true );

sdY1 = SeriesDefinitionImpl.create( );
sdY1.getSeriesPalette( ).update( -2 );
yAxisPrimary.getSeriesDefinitions( ).add( sdY1 );
sdY1.getSeries( ).add( ls1 );

// Y-Serires (2)
ls2 = LineSeriesImpl.create( );
ls2.setSeriesIdentifier( "B Corp." );//$NON-NLS-1$

query2 = QueryImpl.create( "row[\"quantityinstock\"]" );//$NON-NLS-1$
ls1.getDataDefinition( ).add( query2 );

// ls2.setDataSet( orthoValues2 );
ls2.getLineAttributes( ).setColor( ColorDefinitionImpl.CREAM( ) );
ls2.getMarker( ).setType( MarkerType.CIRCLE_LITERAL );
ls2.getMarker( ).setSize( 10 );
ls2.getLabel( ).setVisible( true );

sdY2 = SeriesDefinitionImpl.create( );
sdY2.getSeriesPalette( ).update( -3 );
yAxis.getSeriesDefinitions( ).add( sdY2 );
sdY2.getSeries( ).add( ls2 );

return cwaBar;
}
Re: Dynamically generate pie chart in script [message #901260 is a reply to message #901128] Fri, 10 August 2012 14:05 Go to previous messageGo to next message
zubin Missing name is currently offline zubin Missing nameFriend
Messages: 32
Registered: July 2009
Member
The following example actually tried to created an bar chart. but the same issue will happens when creating bar chart. How can I use chart api in script?

I added the chart engine jar to be included in report jar file section and imported all of following to script:

importPackage( Packages.org.eclipse.birt.report.model.api );
importPackage( Packages.com.coresecuirty.report );
importPackage( Packages.org.eclipse.birt.chart.model.impl );
importPackage( Packages.org.eclipse.birt.chart.model.attribute.impl );
importPackage( Packages.org.eclipse.birt.chart.model.attribute );
importPackage( Packages.org.eclipse.birt.chart.model.component.impl );
importPackage( Packages.org.eclipse.birt.chart.model.component );
importPackage( Packages.org.eclipse.birt.chart.model.data.impl );
importPackage( Packages.org.eclipse.birt.chart.model.type.impl );

But I am keep getting this error:

ReferenceError: "ChartWithAxesImpl" is not defined. (/report/method[@name="beforeFactory"]#180)
at org.eclipse.birt.report.engine.javascript.JavascriptEngine.evaluate(JavascriptEngine.java:295)
Re: Dynamically generate pie chart in script [message #901327 is a reply to message #901128] Fri, 10 August 2012 20:05 Go to previous messageGo to next message
zubin Missing name is currently offline zubin Missing nameFriend
Messages: 32
Registered: July 2009
Member

Following are my code to create in script, and i am getting following error when I try it on eclipse 4.2:

var pieChartComponent = elementFactory.newExtendedItem( null, "Chart" );

pieChartComponent.setHeight( "5.406in" );//$NON-NLS-1$
pieChartComponent.setWidth( "7.927in" );//$NON-NLS-1$
pieChartComponent.setProperty( "dataSet", "CampaignSummaryQuery" );//$NON-NLS-1$

pieChartComponent.getReportItem().setProperty( "chart.instance", createPieChart());

reportDesignHandle.getBody( ).add(pieChartComponent);


function createPieChart()
{
cwoaPie = ChartWithoutAxesImpl.create( );
cwoaPie.setDimension( ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL );
cwoaPie.setType( "Pie Chart" ); //$NON-NLS-1$
cwoaPie.setSubType( "Standard Pie Chart" ); //$NON-NLS-1$

// Plot
cwoaPie.setSeriesThickness( 10 );

// Legend
lg = cwoaPie.getLegend( );
lg.getOutline( ).setVisible( true );

// Title
cwoaPie.getTitle( ).getLabel( ).getCaption( ).setValue( "Pie Chart" );//$NON-NLS-1$

// Data Set
categoryValues = TextDataSetImpl.create( new Array(
"New York", "Boston", "Chicago", "San Francisco", "Dallas") );//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
seriesOneValues = NumberDataSetImpl.create( new Array(
54.65, 21, 75.95, 91.28, 37.43
) );

sdata = DataFactory.eINSTANCE.createSampleData( );
sdBase = DataFactory.eINSTANCE.createBaseSampleData( );
sdBase.setDataSetRepresentation( "" );//$NON-NLS-1$
sdata.getBaseSampleData( ).add( sdBase );

sdOrthogonal = DataFactory.eINSTANCE.createOrthogonalSampleData( );
sdOrthogonal.setDataSetRepresentation( "" );//$NON-NLS-1$
sdOrthogonal.setSeriesDefinitionIndex( 0 );
sdata.getOrthogonalSampleData( ).add( sdOrthogonal );

cwoaPie.setSampleData( sdata );

// Base Series
seCategory = SeriesImpl.create( );
seCategory.setDataSet( categoryValues );

sd = SeriesDefinitionImpl.create( );
cwoaPie.getSeriesDefinitions( ).add( sd );
sd.getSeriesPalette( ).shift( 0 );
sd.getSeries( ).add( seCategory );

// Orthogonal Series
sePie = PieSeriesImpl.create( );
sePie.setDataSet( seriesOneValues );
sePie.setSeriesIdentifier( "Cities" );//$NON-NLS-1$
sePie.setExplosion( 5 );

sdCity = SeriesDefinitionImpl.create( );
sd.getSeriesDefinitions( ).add( sdCity );
sdCity.getSeries( ).add( sePie );

return cwoaPie;
}



-------------------------------error----------------------------------


org.eclipse.birt.report.service.api.ReportServiceException: Error happened while running the report.
at org.eclipse.birt.report.service.ReportEngineService.throwDummyException(ReportEngineService.java:1115)
at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:943)
at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
at org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler.__execute(BirtGetPageAllActionHandler.java:131)
at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
at org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47)
at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143)
at org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPageAll(BirtDocumentProcessor.java:183)
at sun.reflect.GeneratedMethodAccessor140.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112)
at org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:265)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
at org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:384)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:350)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
at java.lang.Thread.run(Unknown Source)
Caused by: org.eclipse.birt.report.engine.api.EngineException: Error happened while running the report.
at org.eclipse.birt.report.engine.api.impl.EngineTask.handleFatalExceptions(EngineTask.java:2248)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:190)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:937)
... 55 more
Caused by: java.lang.NullPointerException
at org.eclipse.birt.chart.reportitem.api.ChartItemUtil.isBaseGroupingDefined(ChartItemUtil.java:570)
at org.eclipse.birt.chart.reportitem.AbstractChartBaseQueryGenerator.createBaseGroupingDefinition(AbstractChartBaseQueryGenerator.java:877)
at org.eclipse.birt.chart.reportitem.AbstractChartBaseQueryGenerator.initCategoryGrouping(AbstractChartBaseQueryGenerator.java:645)
at org.eclipse.birt.chart.reportitem.AbstractChartBaseQueryGenerator.generateExtraBindings(AbstractChartBaseQueryGenerator.java:336)
at org.eclipse.birt.chart.reportitem.ChartBaseQueryHelper.createBaseQuery(ChartBaseQueryHelper.java:106)
at org.eclipse.birt.chart.reportitem.ChartReportItemQueryImpl.createQuery(ChartReportItemQueryImpl.java:171)
at org.eclipse.birt.chart.reportitem.ChartReportItemQueryImpl.createReportQueries(ChartReportItemQueryImpl.java:107)
at org.eclipse.birt.report.engine.data.dte.ReportQueryBuilder$QueryBuilderVisitor.visitExtendedItem(ReportQueryBuilder.java:689)
at org.eclipse.birt.report.engine.ir.ExtendedItemDesign.accept(ExtendedItemDesign.java:45)
at org.eclipse.birt.report.engine.data.dte.ReportQueryBuilder.build(ReportQueryBuilder.java:256)
at org.eclipse.birt.report.engine.data.dte.ReportQueryBuilder.build(ReportQueryBuilder.java:237)
at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.prepare(AbstractDataEngine.java:180)
at org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:122)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:60)
at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplciateReportExecutor.execute(SuppressDuplciateReportExecutor.java:42)
at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:60)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportExecutor.execute(LocalizedReportExecutor.java:61)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:178)
... 57 more




Re: Dynamically generate pie chart in script [message #901612 is a reply to message #901327] Mon, 13 August 2012 16:21 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Take a look at the attached example.

Jason


On 8/10/2012 4:05 PM, zubin Mising name wrote:
>
> Following are my code to create in script, and i am getting following
> error when I try it on eclipse 4.2:
>
> var pieChartComponent = elementFactory.newExtendedItem( null, "Chart" );
>
> pieChartComponent.setHeight( "5.406in" );//$NON-NLS-1$
> pieChartComponent.setWidth( "7.927in" );//$NON-NLS-1$
> pieChartComponent.setProperty( "dataSet",
> "CampaignSummaryQuery" );//$NON-NLS-1$
> pieChartComponent.getReportItem().setProperty(
> "chart.instance", createPieChart());
> reportDesignHandle.getBody( ).add(pieChartComponent);
>
> function createPieChart()
> {
> cwoaPie = ChartWithoutAxesImpl.create( );
> cwoaPie.setDimension(
> ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL );
> cwoaPie.setType( "Pie Chart" ); //$NON-NLS-1$
> cwoaPie.setSubType( "Standard Pie Chart" ); //$NON-NLS-1$
>
> // Plot
> cwoaPie.setSeriesThickness( 10 );
>
> // Legend
> lg = cwoaPie.getLegend( );
> lg.getOutline( ).setVisible( true );
>
> // Title
> cwoaPie.getTitle( ).getLabel( ).getCaption( ).setValue( "Pie
> Chart" );//$NON-NLS-1$
>
> // Data Set
> categoryValues = TextDataSetImpl.create( new Array(
> "New York", "Boston", "Chicago", "San Francisco",
> "Dallas") );//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
> //$NON-NLS-5$
> seriesOneValues = NumberDataSetImpl.create( new Array(
> 54.65, 21, 75.95, 91.28, 37.43
> ) );
>
> sdata = DataFactory.eINSTANCE.createSampleData( );
> sdBase = DataFactory.eINSTANCE.createBaseSampleData( );
> sdBase.setDataSetRepresentation( "" );//$NON-NLS-1$
> sdata.getBaseSampleData( ).add( sdBase );
>
> sdOrthogonal =
> DataFactory.eINSTANCE.createOrthogonalSampleData( );
> sdOrthogonal.setDataSetRepresentation( "" );//$NON-NLS-1$
> sdOrthogonal.setSeriesDefinitionIndex( 0 );
> sdata.getOrthogonalSampleData( ).add( sdOrthogonal );
>
> cwoaPie.setSampleData( sdata );
>
> // Base Series
> seCategory = SeriesImpl.create( );
> seCategory.setDataSet( categoryValues );
>
> sd = SeriesDefinitionImpl.create( );
> cwoaPie.getSeriesDefinitions( ).add( sd );
> sd.getSeriesPalette( ).shift( 0 );
> sd.getSeries( ).add( seCategory );
>
> // Orthogonal Series
> sePie = PieSeriesImpl.create( );
> sePie.setDataSet( seriesOneValues );
> sePie.setSeriesIdentifier( "Cities" );//$NON-NLS-1$
> sePie.setExplosion( 5 );
>
> sdCity = SeriesDefinitionImpl.create( );
> sd.getSeriesDefinitions( ).add( sdCity );
> sdCity.getSeries( ).add( sePie );
>
> return cwoaPie;
> }
>
>
>
> -------------------------------error----------------------------------
>
>
> org.eclipse.birt.report.service.api.ReportServiceException: Error
> happened while running the report.
> at
> org.eclipse.birt.report.service.ReportEngineService.throwDummyException(ReportEngineService.java:1115)
>
> at
> org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:943)
>
> at
> org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
>
> at
> org.eclipse.birt.report.service.actionhandler.BirtGetPageAllActionHandler.__execute(BirtGetPageAllActionHandler.java:131)
>
> at
> org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
>
> at
> org.eclipse.birt.report.soapengine.processor.AbstractBaseDocumentProcessor.__executeAction(AbstractBaseDocumentProcessor.java:47)
>
> at
> org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.executeAction(AbstractBaseComponentProcessor.java:143)
>
> at
> org.eclipse.birt.report.soapengine.processor.BirtDocumentProcessor.handleGetPageAll(BirtDocumentProcessor.java:183)
>
> at sun.reflect.GeneratedMethodAccessor140.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.eclipse.birt.report.soapengine.processor.AbstractBaseComponentProcessor.process(AbstractBaseComponentProcessor.java:112)
>
> at
> org.eclipse.birt.report.soapengine.endpoint.BirtSoapBindingImpl.getUpdatedObjects(BirtSoapBindingImpl.java:66)
>
> at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at
> org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
>
> at
> org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
>
> at
> org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
> at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>
> at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
> at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
> at
> org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
> at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
> at
> org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
> at
> org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doPost(BirtSoapMessageDispatcherServlet.java:265)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
> at
> org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> at
> org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
>
> at
> org.eclipse.equinox.http.registry.internal.ServletManager$ServletWrapper.service(ServletManager.java:180)
>
> at
> org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
>
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
>
> at
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:60)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
> at
> org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:384)
>
> at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598)
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486)
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
>
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
>
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
>
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
>
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
>
> at org.eclipse.jetty.server.Server.handle(Server.java:350)
> at
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
>
> at
> org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900)
>
> at
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954)
>
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851)
> at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:230)
> at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
>
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
>
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
>
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
>
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
>
> at java.lang.Thread.run(Unknown Source)
> Caused by: org.eclipse.birt.report.engine.api.EngineException: Error
> happened while running the report.
> at
> org.eclipse.birt.report.engine.api.impl.EngineTask.handleFatalExceptions(EngineTask.java:2248)
>
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:190)
>
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
>
> at
> org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:937)
>
> ... 55 more
> Caused by: java.lang.NullPointerException
> at
> org.eclipse.birt.chart.reportitem.api.ChartItemUtil.isBaseGroupingDefined(ChartItemUtil.java:570)
>
> at
> org.eclipse.birt.chart.reportitem.AbstractChartBaseQueryGenerator.createBaseGroupingDefinition(AbstractChartBaseQueryGenerator.java:877)
>
> at
> org.eclipse.birt.chart.reportitem.AbstractChartBaseQueryGenerator.initCategoryGrouping(AbstractChartBaseQueryGenerator.java:645)
>
> at
> org.eclipse.birt.chart.reportitem.AbstractChartBaseQueryGenerator.generateExtraBindings(AbstractChartBaseQueryGenerator.java:336)
>
> at
> org.eclipse.birt.chart.reportitem.ChartBaseQueryHelper.createBaseQuery(ChartBaseQueryHelper.java:106)
>
> at
> org.eclipse.birt.chart.reportitem.ChartReportItemQueryImpl.createQuery(ChartReportItemQueryImpl.java:171)
>
> at
> org.eclipse.birt.chart.reportitem.ChartReportItemQueryImpl.createReportQueries(ChartReportItemQueryImpl.java:107)
>
> at
> org.eclipse.birt.report.engine.data.dte.ReportQueryBuilder$QueryBuilderVisitor.visitExtendedItem(ReportQueryBuilder.java:689)
>
> at
> org.eclipse.birt.report.engine.ir.ExtendedItemDesign.accept(ExtendedItemDesign.java:45)
>
> at
> org.eclipse.birt.report.engine.data.dte.ReportQueryBuilder.build(ReportQueryBuilder.java:256)
>
> at
> org.eclipse.birt.report.engine.data.dte.ReportQueryBuilder.build(ReportQueryBuilder.java:237)
>
> at
> org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.prepare(AbstractDataEngine.java:180)
>
> at
> org.eclipse.birt.report.engine.executor.ReportExecutor.execute(ReportExecutor.java:122)
>
> at
> org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:60)
>
> at
> org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplciateReportExecutor.execute(SuppressDuplciateReportExecutor.java:42)
>
> at
> org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportExecutor.execute(WrappedReportExecutor.java:60)
>
> at
> org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportExecutor.execute(LocalizedReportExecutor.java:61)
>
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:178)
>
> ... 57 more
>
>
>
>
>
Re: Dynamically generate pie chart in script [message #1051948 is a reply to message #901612] Mon, 29 April 2013 12:12 Go to previous message
Alon R is currently offline Alon RFriend
Messages: 1
Registered: April 2013
Junior Member
Hi
The attached example does generate the report however Eclipse 4.2 still complains with the same error message.
It there something different about Bar charts? Can you please add an example that shows how to create one?
Thanks a lot.
Previous Topic:Custom emitter configuring
Next Topic:Extra border in HTML output using Birt 4.2.2 viewer
Goto Forum:
  


Current Time: Sun Nov 23 06:12:47 GMT 2014

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

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