Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Chart Grouping problem BIRT 2.3
Chart Grouping problem BIRT 2.3 [message #368745] Tue, 23 June 2009 18:31 Go to next message
Mehrab is currently offline MehrabFriend
Messages: 14
Registered: July 2009
Junior Member
Hi All,
I upgrade my application form BIRT 2.1 to 2.3. In the application I use DE
api to create chart. The code working fine on BIRT 2.1 but generate error
in BIRT 2.3. Basically it generate error when grouping on base category
and without grouping its working fine. Please anybody help me. My sample
code, some part of .rptdesign file and error as follows:

sample Code

private Chart createLineChart(LineChartDTO lineChartDTO){

ChartWithAxes cwaLine = ChartWithAxesImpl.create( );

//get the primary base x axis
Axis xAxisPrimary = cwaLine.getPrimaryBaseAxes( )[0];

//y axis as the orthogonal axis
Axis yAxisPrimary = cwaLine.getPrimaryOrthogonalAxis( xAxisPrimary
);

//create base category
Series seCategory = SeriesImpl.create( );
Query query = QueryImpl.create("row[\"CREATOR\"]");
seCategory.getDataDefinition( ).add( query );

//create series definition for the x axis or the base axis
SeriesDefinition sdX = SeriesDefinitionImpl.create( );
sdX.getSeries( ).add( seCategory );


//Grouping
sdX.getGrouping().setEnabled(true);

sdX.getGrouping().setGroupingInterval(0);

sdX.getGrouping().setGroupType(DataType.DATE_TIME_LITERAL);

sdX.getGrouping().setAggregateExpression("Sum");

xAxisPrimary.getSeriesDefinitions( ).add( sdX );


LineSeries ls = (LineSeries) LineSeriesImpl.create();

ls.getLabel().setVisible(true);


Query query2 = QueryImpl.create("row[\"RID\"]");
ls.getDataDefinition( ).add( query2 );
sdY = SeriesDefinitionImpl.create();
sdY.getSeriesPalette().shift(0);
sdY.getSeries( ).add(ls);
yAxisPrimary.getSeriesDefinitions( ).add( sdY );

return cwaLine;
}



part of .rptdesign file

<oda-data-set
extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
name="Main_Data_Set" id="102">
<property name="dataSource">Data Source</property>
<property name="queryText"> SELECT
SIMS.ROLES."CREATOR",SIMS.ROLES."RID" FROM SIMS.ROLES </property>
</oda-data-set>


<property name="outputFormat">GIF</property>
<property name="dataSet">Main_Data_Set</property>
<property name="height">400px</property>
<property name="width">500px</property>
<list-property name="boundDataColumns">
<structure>
<property name="name">CREATOR</property>
<expression name="expression">dataSetRow["CREATOR"]</expression>
</structure>
<structure>
<property name="name">row[RID]_Sum</property>
<expression name="expression">dataSetRow["row[RID]_Sum"]</expression >
</structure>



Error

Jun 23, 2009 6:05:12 PM
org.eclipse.birt.report.engine.executor.ExtendedGenerateExec utor execute
SEVERE: Column binding "row[RID]_Sum" has referred to a data set column
"row[RID]_Sum" which does not exist.
org.eclipse.birt.data.engine.core.DataException: Column binding
"row[RID]_Sum" has referred to a data set column "row[RID]_Sum" which does
not exist.
at
org.eclipse.birt.data.engine.impl.ResultIterator.validateMan ualBindingExpressions(ResultIterator.java:311)
at
org.eclipse.birt.data.engine.impl.ResultIterator.<init>(ResultIterator.java:148)
at
org.eclipse.birt.data.engine.impl.QueryResults.getResultIter ator(QueryResults.java:176)
at
org.eclipse.birt.report.engine.data.dte.QueryResultSet.<init >(QueryResultSet.java:92)
at
org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExec uteQuery(DteDataEngine.java:129)
at
org.eclipse.birt.report.engine.data.dte.DataGenerationEngine .doExecuteQuery(DataGenerationEngine.java:79)
at
org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.e xecute(AbstractDataEngine.java:253)
at
org.eclipse.birt.report.engine.executor.ExtendedGenerateExec utor.executeQueries(ExtendedGenerateExecutor.java:204)
at
org.eclipse.birt.report.engine.executor.ExtendedGenerateExec utor.execute(ExtendedGenerateExecutor.java:65)
at
org.eclipse.birt.report.engine.executor.ExtendedItemExecutor .execute(ExtendedItemExecutor.java:61)
at
org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe dReportItemExecutor.execute(WrappedReportItemExecutor.java:4 5)
at
org.eclipse.birt.report.engine.internal.executor.emitter.Rep ortItemEmitterExecutor.execute(ReportItemEmitterExecutor.jav a:45)
at
org.eclipse.birt.report.engine.internal.executor.dup.Suppres sDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor .java:42)
at
org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:63)
at
org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:27)
at
org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:133)
at
org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin gLM.resumeLayout(HTMLInlineStackingLM.java:104)
at
org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin gLM.layoutNodes(HTMLInlineStackingLM.java:153)
at
org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:27)
at
org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:133)
at
org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:68)
at
org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:27)
at
org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layou tChildren(HTMLTableLM.java:76)
at
org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:133)
at
org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:68)
at
org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout (HTMLPageLM.java:90)
at
org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutE ngine.layout(HTMLReportLayoutEngine.java:101)
at
org.eclipse.birt.report.engine.presentation.ReportDocumentBu ilder.build(ReportDocumentBuilder.java:211)
at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTas k.java:237)
at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask. java:90)
at
com.anabase.art.reportviewer.ViewerServlet.generateRptDocFil e(ViewerServlet.java:535)
at
com.anabase.art.reportviewer.ViewerServlet.getRptDocFile(Vie werServlet.java:334)
at
com.anabase.art.reportviewer.ViewerServlet.viewReport(Viewer Servlet.java:194)
at
com.anabase.art.reportviewer.ViewerServlet.execute(ViewerSer vlet.java:420)
at
com.anabase.art.reportviewer.ViewerServlet.doPost(ViewerServ let.java:109)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:206)
at
org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:378)
at
org.springframework.security.intercept.web.FilterSecurityInt erceptor.invoke(FilterSecurityInterceptor.java:109)
at
org.springframework.security.intercept.web.FilterSecurityInt erceptor.doFilter(FilterSecurityInterceptor.java:83)
at
org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
at
org.springframework.security.ui.SessionFixationProtectionFil ter.doFilterHttp(SessionFixationProtectionFilter.java:67)
at
org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
at
org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
at
org.springframework.security.ui.ExceptionTranslationFilter.d oFilterHttp(ExceptionTranslationFilter.java:101)
at
org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
at
org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
at
org.springframework.security.providers.anonymous.AnonymousPr ocessingFilter.doFilterHttp(AnonymousProcessingFilter.java:1 05)
at
org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
at
org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
at
org.springframework.security.ui.rememberme.RememberMeProcess ingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
at
org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
at
org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
at
org.springframework.security.wrapper.SecurityContextHolderAw areRequestFilter.doFilterHttp(SecurityContextHolderAwareRequ estFilter.java:91)
at
org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
at
org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
at
org.springframework.security.ui.basicauth.BasicProcessingFil ter.doFilterHttp(BasicProcessingFilter.java:174)
at
org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
at
org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
at
org.springframework.security.ui.AbstractProcessingFilter.doF ilterHttp(AbstractProcessingFilter.java:277)
at
org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
at
org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
at
org.springframework.security.ui.AbstractProcessingFilter.doF ilterHttp(AbstractProcessingFilter.java:277)
at
org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
at
org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
at
org.springframework.security.ui.logout.LogoutFilter.doFilter Http(LogoutFilter.java:89)
at
org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
at
org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
at
org.springframework.security.context.HttpSessionContextInteg rationFilter.doFilterHttp(HttpSessionContextIntegrationFilte r.java:235)
at
org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
at
org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
at
org.springframework.security.util.FilterChainProxy.doFilter( FilterChainProxy.java:175)
at
org.springframework.web.filter.DelegatingFilterProxy.invokeD elegate(DelegatingFilterProxy.java:236)
at
org.springframework.web.filter.DelegatingFilterProxy.doFilte r(DelegatingFilterProxy.java:167)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:286)
at
org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:845)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHand ler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoin t.java:447)
at java.lang.Thread.run(Unknown Source)
Re: Chart Grouping problem BIRT 2.3 [message #368770 is a reply to message #368745] Wed, 24 June 2009 16:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.windstream.net

Mehrab,

Does RID exist in the binding? That is the query you are using. Did
you create the row[RID]_Sum binding? I also assume this column does not
exist in the dataset:
dataSetRow["row[RID]_Sum"]

Jason

Mehrab wrote:
> Hi All,
> I upgrade my application form BIRT 2.1 to 2.3. In the application I use
> DE api to create chart. The code working fine on BIRT 2.1 but generate
> error in BIRT 2.3. Basically it generate error when grouping on base
> category and without grouping its working fine. Please anybody help me.
> My sample code, some part of .rptdesign file and error as follows:
>
> sample Code
> private Chart createLineChart(LineChartDTO lineChartDTO){
> ChartWithAxes cwaLine = ChartWithAxesImpl.create( );
>
> //get the primary base x axis
> Axis xAxisPrimary = cwaLine.getPrimaryBaseAxes( )[0];
> //y axis as the orthogonal axis
> Axis yAxisPrimary = cwaLine.getPrimaryOrthogonalAxis(
> xAxisPrimary );
> //create base category
> Series seCategory = SeriesImpl.create( );
> Query query = QueryImpl.create("row[\"CREATOR\"]");
> seCategory.getDataDefinition( ).add( query );
>
> //create series definition for the x axis or the base axis
> SeriesDefinition sdX = SeriesDefinitionImpl.create( );
> sdX.getSeries( ).add( seCategory );
> //Grouping
> sdX.getGrouping().setEnabled(true);
>
> sdX.getGrouping().setGroupingInterval(0);
>
> sdX.getGrouping().setGroupType(DataType.DATE_TIME_LITERAL);
>
> sdX.getGrouping().setAggregateExpression("Sum");
> xAxisPrimary.getSeriesDefinitions( ).add( sdX );
>
>
> LineSeries ls = (LineSeries) LineSeriesImpl.create();
> ls.getLabel().setVisible(true);
> Query query2 = QueryImpl.create("row[\"RID\"]");
> ls.getDataDefinition( ).add( query2 );
> sdY = SeriesDefinitionImpl.create();
> sdY.getSeriesPalette().shift(0);
> sdY.getSeries( ).add(ls);
> yAxisPrimary.getSeriesDefinitions( ).add( sdY );
> return cwaLine;
> }
>
>
>
> part of .rptdesign file
>
> <oda-data-set
> extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
> name="Main_Data_Set" id="102">
> <property name="dataSource">Data Source</property>
> <property name="queryText"> SELECT
> SIMS.ROLES."CREATOR",SIMS.ROLES."RID" FROM SIMS.ROLES </property>
> </oda-data-set>
>
>
> <property name="outputFormat">GIF</property>
> <property name="dataSet">Main_Data_Set</property>
> <property name="height">400px</property>
> <property name="width">500px</property>
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">CREATOR</property>
> <expression name="expression">dataSetRow["CREATOR"]</expression>
> </structure>
> <structure>
> <property name="name">row[RID]_Sum</property>
> <expression name="expression">dataSetRow["row[RID]_Sum"]</expression >
> </structure>
>
>
>
> Error
>
> Jun 23, 2009 6:05:12 PM
> org.eclipse.birt.report.engine.executor.ExtendedGenerateExec utor execute
> SEVERE: Column binding "row[RID]_Sum" has referred to a data set column
> "row[RID]_Sum" which does not exist.
> org.eclipse.birt.data.engine.core.DataException: Column binding
> "row[RID]_Sum" has referred to a data set column "row[RID]_Sum" which
> does not exist.
> at
> org.eclipse.birt.data.engine.impl.ResultIterator.validateMan ualBindingExpressions(ResultIterator.java:311)
>
> at
> org.eclipse.birt.data.engine.impl.ResultIterator.<init>(ResultIterator.java:148)
>
> at
> org.eclipse.birt.data.engine.impl.QueryResults.getResultIter ator(QueryResults.java:176)
>
> at
> org.eclipse.birt.report.engine.data.dte.QueryResultSet.<init >(QueryResultSet.java:92)
>
> at
> org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExec uteQuery(DteDataEngine.java:129)
>
> at
> org.eclipse.birt.report.engine.data.dte.DataGenerationEngine .doExecuteQuery(DataGenerationEngine.java:79)
>
> at
> org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.e xecute(AbstractDataEngine.java:253)
>
> at
> org.eclipse.birt.report.engine.executor.ExtendedGenerateExec utor.executeQueries(ExtendedGenerateExecutor.java:204)
>
> at
> org.eclipse.birt.report.engine.executor.ExtendedGenerateExec utor.execute(ExtendedGenerateExecutor.java:65)
>
> at
> org.eclipse.birt.report.engine.executor.ExtendedItemExecutor .execute(ExtendedItemExecutor.java:61)
>
> at
> org.eclipse.birt.report.engine.internal.executor.wrap.Wrappe dReportItemExecutor.execute(WrappedReportItemExecutor.java:4 5)
>
> at
> org.eclipse.birt.report.engine.internal.executor.emitter.Rep ortItemEmitterExecutor.execute(ReportItemEmitterExecutor.jav a:45)
>
> at
> org.eclipse.birt.report.engine.internal.executor.dup.Suppres sDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor .java:42)
>
> at
> org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:63)
>
> at
> org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:27)
>
> at
> org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:133)
>
> at
> org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin gLM.resumeLayout(HTMLInlineStackingLM.java:104)
>
> at
> org.eclipse.birt.report.engine.layout.html.HTMLInlineStackin gLM.layoutNodes(HTMLInlineStackingLM.java:153)
>
> at
> org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:27)
>
> at
> org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:133)
>
> at
> org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:68)
>
> at
> org.eclipse.birt.report.engine.layout.html.HTMLStackingLM.la youtChildren(HTMLStackingLM.java:27)
>
> at
> org.eclipse.birt.report.engine.layout.html.HTMLTableLM.layou tChildren(HTMLTableLM.java:76)
>
> at
> org.eclipse.birt.report.engine.layout.html.HTMLAbstractLM.la yout(HTMLAbstractLM.java:133)
>
> at
> org.eclipse.birt.report.engine.layout.html.HTMLBlockStacking LM.layoutNodes(HTMLBlockStackingLM.java:68)
>
> at
> org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout (HTMLPageLM.java:90)
>
> at
> org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutE ngine.layout(HTMLReportLayoutEngine.java:101)
>
> at
> org.eclipse.birt.report.engine.presentation.ReportDocumentBu ilder.build(ReportDocumentBuilder.java:211)
>
> at
> org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTas k.java:237)
> at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask. java:90)
> at
> com.anabase.art.reportviewer.ViewerServlet.generateRptDocFil e(ViewerServlet.java:535)
>
> at
> com.anabase.art.reportviewer.ViewerServlet.getRptDocFile(Vie werServlet.java:334)
>
> at
> com.anabase.art.reportviewer.ViewerServlet.viewReport(Viewer Servlet.java:194)
>
> at
> com.anabase.art.reportviewer.ViewerServlet.execute(ViewerSer vlet.java:420)
> at
> com.anabase.art.reportviewer.ViewerServlet.doPost(ViewerServ let.java:109)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:290)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:206)
>
> at
> org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:378)
>
> at
> org.springframework.security.intercept.web.FilterSecurityInt erceptor.invoke(FilterSecurityInterceptor.java:109)
>
> at
> org.springframework.security.intercept.web.FilterSecurityInt erceptor.doFilter(FilterSecurityInterceptor.java:83)
>
> at
> org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
>
> at
> org.springframework.security.ui.SessionFixationProtectionFil ter.doFilterHttp(SessionFixationProtectionFilter.java:67)
>
> at
> org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
>
> at
> org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
>
> at
> org.springframework.security.ui.ExceptionTranslationFilter.d oFilterHttp(ExceptionTranslationFilter.java:101)
>
> at
> org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
>
> at
> org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
>
> at
> org.springframework.security.providers.anonymous.AnonymousPr ocessingFilter.doFilterHttp(AnonymousProcessingFilter.java:1 05)
>
> at
> org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
>
> at
> org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
>
> at
> org.springframework.security.ui.rememberme.RememberMeProcess ingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
>
> at
> org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
>
> at
> org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
>
> at
> org.springframework.security.wrapper.SecurityContextHolderAw areRequestFilter.doFilterHttp(SecurityContextHolderAwareRequ estFilter.java:91)
>
> at
> org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
>
> at
> org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
>
> at
> org.springframework.security.ui.basicauth.BasicProcessingFil ter.doFilterHttp(BasicProcessingFilter.java:174)
>
> at
> org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
>
> at
> org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
>
> at
> org.springframework.security.ui.AbstractProcessingFilter.doF ilterHttp(AbstractProcessingFilter.java:277)
>
> at
> org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
>
> at
> org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
>
> at
> org.springframework.security.ui.AbstractProcessingFilter.doF ilterHttp(AbstractProcessingFilter.java:277)
>
> at
> org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
>
> at
> org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
>
> at
> org.springframework.security.ui.logout.LogoutFilter.doFilter Http(LogoutFilter.java:89)
>
> at
> org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
>
> at
> org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
>
> at
> org.springframework.security.context.HttpSessionContextInteg rationFilter.doFilterHttp(HttpSessionContextIntegrationFilte r.java:235)
>
> at
> org.springframework.security.ui.SpringSecurityFilter.doFilte r(SpringSecurityFilter.java:53)
>
> at
> org.springframework.security.util.FilterChainProxy$VirtualFi lterChain.doFilter(FilterChainProxy.java:390)
>
> at
> org.springframework.security.util.FilterChainProxy.doFilter( FilterChainProxy.java:175)
>
> at
> org.springframework.web.filter.DelegatingFilterProxy.invokeD elegate(DelegatingFilterProxy.java:236)
>
> at
> org.springframework.web.filter.DelegatingFilterProxy.doFilte r(DelegatingFilterProxy.java:167)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFi lter(ApplicationFilterChain.java:235)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(App licationFilterChain.java:206)
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(Standar dWrapperValve.java:233)
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(Standar dContextValve.java:191)
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHo stValve.java:128)
>
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorRepo rtValve.java:102)
>
> at
> org.apache.catalina.core.StandardEngineValve.invoke(Standard EngineValve.java:109)
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAd apter.java:286)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Proce ssor.java:845)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHand ler.process(Http11Protocol.java:583)
>
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoin t.java:447)
> at java.lang.Thread.run(Unknown Source)
>
Re: Chart Grouping problem BIRT 2.3 [message #368780 is a reply to message #368770] Thu, 25 June 2009 04:29 Go to previous messageGo to next message
Mehrab is currently offline MehrabFriend
Messages: 14
Registered: July 2009
Junior Member
Jason,

RID column exist in the dataset. When I create a report without x axis
grouping, it's create following tag in the .rptdesign file and display
report properly. Here RID column is y axis.

<structure>
<property name="name">RID</property>
<expression name="expression">dataSetRow["RID"]</expression>
</structure>

But when I create report with x axis grouping, it's create following tag
in the .rptdesign file and report throw exception. row[RID]_Sum is not
available in the dataset.

<structure>
<property name="name">row[RID]_Sum</property>
<expression name="expression">dataSetRow["row[RID]_Sum"]</expression >
</structure>

Please help me. My java code and and .rptdesign file is is as follows:


////////////////////////////// Java code /////////////////////////////

private Chart createLineChart(LineChartDTO lineChartDTO) throws
ARTChartEngineException {

ChartWithAxes cwaLine = ChartWithAxesImpl.create( );
if(lineChartDTO.getDimension().equals(ARTProperties.DIMENSIO N_2D)){
cwaLine.setDimension( ChartDimension.TWO_DIMENSIONAL_LITERAL
);
}
else
if(lineChartDTO.getDimension().equals(ARTProperties.DIMENSIO N_3D)){
cwaLine.setDimension( ChartDimension.THREE_DIMENSIONAL_LITERAL
);
}
else
if(lineChartDTO.getDimension().equals(ARTProperties.DIMENSIO N_2D_DEPTH)){
cwaLine.setDimension( ChartDimension.THREE_DIMENSIONAL_LITERAL
);
}

/*
* hence there BIRT dont support for Date time data in the
* y axis for three dimension chart. problem is rendering the 3d
chart
* in the BIRT engine
*/
if( lineChartDTO.getYAxisType()== AxisType.DATE_TIME_LITERAL
&& cwaLine.getDimension() ==
ChartDimension.THREE_DIMENSIONAL_LITERAL ){
// throw new ARTChartEngineException("3d chart doesnt support
Date/time value in the series");
cwaLine.setDimension( ChartDimension.TWO_DIMENSIONAL_LITERAL );
}

cwaLine.setType( CHART_LINE );
cwaLine.setSubType( "Overlay" );
cwaLine.getTitle( ).setVisible( true );
cwaLine.getLegend( ).setVisible( true );
cwaLine.setOrientation( Orientation.VERTICAL_LITERAL );
cwaLine.getPlot( ).getClientArea( ).getOutline( ).setVisible( true
);
cwaLine.getPlot( ).getClientArea( ).setBackground(
ColorDefinitionImpl.create( 254, 251, 233 ) );
cwaLine.getLegend().setVisible(lineChartDTO.isHistoryVisible );
cwaLine.getTitle( ).getLabel().getCaption().getFont().setSize(10);
cwaLine.getTitle(
).getLabel().getCaption().getFont().setBold(true);
cwaLine.getBlock().getBounds().setHeight(300);
cwaLine.getBlock().getBounds().setWidth(600);


cwaLine.getTitle().getLabel().getCaption().setValue(lineChar tDTO.getTilte());

//PLOT
Plot plotArea = cwaLine.getPlot();
plotArea.getOutline().setVisible(true);


//##############LEGEND##############//
//set the legend or history of the pie
Legend legend = cwaLine.getLegend( );
this.setLegend(legend,lineChartDTO.isHistoryVisible());

//get the primary base x axis
Axis xAxisPrimary = cwaLine.getPrimaryBaseAxes( )[0];

xAxisPrimary.getLabel().getCaption().getFont().setSize(7);

xAxisPrimary.getLabel().getCaption().getFont().setName(this. getFontName());

xAxisPrimary.getTitle( ).getCaption( ).getFont().setSize(8);
xAxisPrimary.getTitle( ).getCaption(
).getFont().setName(this.getFontName());

xAxisPrimary.getTitle().setVisible(true);
xAxisPrimary.getTitle( ).getCaption().getFont().setBold(false);
createRotateText(xAxisPrimary,lineChartDTO.getRotation());

//make the x axis as category
xAxisPrimary.setCategoryAxis( true );
xAxisPrimary.getTitle( ).getCaption( ).setValue(
lineChartDTO.getXAxisTitle() );

if(lineChartDTO.getXAxisType()!= null &&
lineChartDTO.getXAxisType() == AxisType.DATE_TIME_LITERAL){

log.debug("createBarChart(): x axis type is : date" );
xAxisPrimary.setType( AxisType.DATE_TIME_LITERAL );
xAxisPrimary.setFormatSpecifier(
JavaDateFormatSpecifierImpl.create( "dd/MMM/yyyy" ) );
}
else if(lineChartDTO.getXAxisType()!= null &&
lineChartDTO.getXAxisType() == AxisType.TEXT_LITERAL){
log.debug("createBarChart(): x axis type is : text" );
xAxisPrimary.setType( AxisType.TEXT_LITERAL );
}
else if(lineChartDTO.getXAxisType()!= null &&
lineChartDTO.getXAxisType() == AxisType.LINEAR_LITERAL){
log.debug("createBarChart(): x axis type is : linear" );
xAxisPrimary.setType( AxisType.LINEAR_LITERAL );
}
else if(lineChartDTO.getXAxisType()!= null &&
lineChartDTO.getXAxisType() == AxisType.LOGARITHMIC_LITERAL){
log.debug("createBarChart(): x axis type is : logger" );
xAxisPrimary.setType( AxisType.LOGARITHMIC_LITERAL );
}

//show the horizontal x grid at background of chart

//y axis as the orthogonal axis
Axis yAxisPrimary = cwaLine.getPrimaryOrthogonalAxis( xAxisPrimary
);

yAxisPrimary.getLabel().getCaption().getFont().setSize(8);

yAxisPrimary.getLabel().getCaption().getFont().setName(this. getFontName());

yAxisPrimary.getTitle( ).getCaption( ).getFont().setSize(8);
yAxisPrimary.getTitle( ).getCaption(
).getFont().setName(this.getFontName());

yAxisPrimary.getTitle( ).getCaption( ).setValue(
lineChartDTO.getYAxisTitle() );
yAxisPrimary.getTitle( ).getCaption().getFont().setBold(false);
yAxisPrimary.getTitle().setVisible(true);
//show the vertical y grid at background of chart


if(lineChartDTO.getGridType().equals(ARTProperties.GRID_HORI ZONTAL)){
createHorizontalGrid(yAxisPrimary);
}
else
if(lineChartDTO.getGridType().equals(ARTProperties.GRID_VERT ICAL)){
createVerticalGrid(xAxisPrimary);
}
else
if(lineChartDTO.getGridType().equals(ARTProperties.GRID_BOTH )) {
createHorizontalGrid(yAxisPrimary);
createVerticalGrid(xAxisPrimary);
}
else{
//do nothing
//since this is none type so no grid will apply
}

if(lineChartDTO.getYAxisType()!= null &&
lineChartDTO.getYAxisType() == AxisType.DATE_TIME_LITERAL){

log.debug("y axis is now : date" );
yAxisPrimary.setType( AxisType.DATE_TIME_LITERAL );
yAxisPrimary.setFormatSpecifier(
JavaDateFormatSpecifierImpl.create( "dd/MMM/yyyy" ) );
}
else if(lineChartDTO.getYAxisType()!= null &&
lineChartDTO.getYAxisType() == AxisType.LINEAR_LITERAL){

log.debug("y axis is now : linear" );
NumberFormatSpecifier formatSepecifier =
NumberFormatSpecifierImpl.create( );

formatSepecifier.setMultiplier(lineChartDTO.getYAxisMultipli erValue());
yAxisPrimary.setFormatSpecifier(formatSepecifier);
yAxisPrimary.setType(AxisType.LINEAR_LITERAL);
}
else if(lineChartDTO.getYAxisType()!= null &&
lineChartDTO.getYAxisType() == AxisType.LOGARITHMIC_LITERAL){

log.debug("y axis is now : logger" );
NumberFormatSpecifier formatSepecifier =
NumberFormatSpecifierImpl.create( );

formatSepecifier.setMultiplier(lineChartDTO.getYAxisMultipli erValue());
yAxisPrimary.setFormatSpecifier(formatSepecifier);
yAxisPrimary.setType(AxisType.LOGARITHMIC_LITERAL);
}
else{

log.debug(lineChartDTO.getYAxisType() + ": is not supported ");
}


//create base category
Series seCategory = SeriesImpl.create( );
Query query = QueryImpl.create(
lineChartDTO.getCategoryDefinition() );
seCategory.getDataDefinition( ).add( query );

//create series definition for the x axis or the base axis
SeriesDefinition sdX = SeriesDefinitionImpl.create( );
sdX.getSeries( ).add( seCategory );


if(lineChartDTO.getXAxisSorting() != null ){


if(lineChartDTO.getXAxisSorting().equalsIgnoreCase("ASCENDING ") ){
sdX.setSorting(SortOption.ASCENDING_LITERAL);
}
else{
sdX.setSorting(SortOption.DESCENDING_LITERAL);
}
}

if(lineChartDTO.isGroupOnCategory()){

//if hte y axis is data type then no group will apply
if(lineChartDTO.getYAxisType() == AxisType.DATE_TIME_LITERAL){
//do not grouping
log.debug("y axis is date type , so no group will apply");
}
else{
/*
* here we have three types of data Text,Linear,Date
* there will be different value for groupin
interval.accoding BIRT-2.1.0
* there is now understandable clear document about the
definition of
* grouping interval.but using trial and error process we
recover the following
* value for correct goruping
* TEXT = 0
* DATE/TIME = 1
* NUMBER = 1
*/

sdX.getGrouping().setEnabled(lineChartDTO.isGroupOnCategory( ));
// set the text type group interval
if(lineChartDTO.getYAxisType() == AxisType.TEXT_LITERAL){
sdX.getGrouping().setGroupingInterval(0);
}
//Date and Number type is same group interval
else {
sdX.getGrouping().setGroupingInterval(1);
}

if(lineChartDTO.getXAxisType() ==
AxisType.DATE_TIME_LITERAL){

sdX.getGrouping().setGroupType(DataType.DATE_TIME_LITERAL);
createCategoryGroupUnit(lineChartDTO,sdX);
}
sdX.getGrouping().setAggregateExpression("Sum");
}
}

xAxisPrimary.getSeriesDefinitions( ).add( sdX );

if(lineChartDTO.getDimension().equals(ARTProperties.DIMENSIO N_3D)

||lineChartDTO.getDimension().equals(ARTProperties.DIMENSION _2D_DEPTH)){
createZAxis(xAxisPrimary);
cwaLine.setRotation( Rotation3DImpl.create( new Angle3D[]{
Angle3DImpl.create( -20, 45, 0 )
} ) );
}

//create multiple line series
createMultipleLineSeries(yAxisPrimary,lineChartDTO);

return cwaLine;
}
/**
* create multiple series on line chart
* @param yAxisPrimary as the base axis
* @param lineChartDTO , chart data object
*/
private void createMultipleLineSeries(Axis yAxisPrimary,
LineChartDTO lineChartDTO){

Map<String,String> yseriesValueMap =
lineChartDTO.getYSeriesValuesMap();
//define blank series definition
SeriesDefinition sdY = null;
//value for the bar series color code
int count = -2;
int markerCount = 1;

Set<String> keySet = yseriesValueMap.keySet();

for(String key : keySet){
String exp = key;
String expName = yseriesValueMap.get(exp);
LineSeries ls = (LineSeries) LineSeriesImpl.create( );
ls.setSeriesIdentifier(expName);

ls.getLabel().setVisible( lineChartDTO.isShowSeriesValue() );
ls.getLabel().getCaption().getFont().setSize(9);

ls.getLabel().getCaption().getFont().setName(this.getFontNam e());
//ls.setLabelPosition( Position.OUTSIDE_LITERAL );

ls.getLabel().getCaption().getFont().setRotation(lineChartDT O.getSerriesRotation());
// ls.getLineAttributes().setColor(ColorDefinitionImpl.create(
154, 50, 102 ));


if(lineChartDTO.getDimension().equals(ARTProperties.DIMENSIO N_2D)){
if(markerCount > 14){
log.debug("There is no available marker in the marker
list");
}
else{
ls.getMarker( ).setType(
getMarkerList().get(String.valueOf(markerCount)) );
}
}

if(lineChartDTO.getDimension().equals(ARTProperties.DIMENSIO N_3D)

||lineChartDTO.getDimension().equals(ARTProperties.DIMENSION _2D_DEPTH)){
ls.getLineAttributes().setColor(ColorDefinitionImpl.create(
154, 50, 102 ));
}


// ls.setMarker(MarkerImpl.create(MarkerType.BOX_LITERAL,1));
Query query2 = QueryImpl.create( exp );
ls.getDataDefinition( ).add( query2 );
sdY = SeriesDefinitionImpl.create( );
sdY.getSeriesPalette( ).update( count );

sdY.getSeries( ).add( ls );
yAxisPrimary.getSeriesDefinitions( ).add( sdY );
count = count - 1;
markerCount = markerCount + 1;
}

}


///////////////////////////// .rptdesign ////////////////////////////

<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
id="1">
<data-sources>
<oda-data-source
extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
id="101">
<property
name="odaDriverClass">oracle.jdbc.driver.OracleDriver</property >
<property
name="odaURL">jdbc:oracle:thin:@192.168.174.25:1521:BDEV</property >
<property name="odaUser">mferdous</property>
<encrypted-property name="odaPassword"
encryptionID="base64">YW5hYmFzZQ==</encrypted-property>
</oda-data-source>
</data-sources>
<data-sets>
<oda-data-set
extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
name="Main_Data_Set" id="102">
<property name="dataSource">Data Source</property>
<property name="queryText"> SELECT
SIMS.ROLES."CREATOR",SIMS.ROLES."RID" FROM SIMS.ROLES </property>
</oda-data-set>
</data-sets>
<styles>
<style name="crosstab-cell" id="2">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="crosstab" id="3">
<property name="borderBottomColor">#CCCCCC</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">1pt</property>
<property name="borderLeftColor">#CCCCCC</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">1pt</property>
<property name="borderRightColor">#CCCCCC</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">1pt</property>
<property name="borderTopColor">#CCCCCC</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">1pt</property>
</style>
<style name="Report_Title_Style" id="4">
<property name="backgroundColor">#A9B2FD</property>
<property name="fontFamily">"Arial"</property>
<property name="fontSize">12px</property>
<property name="fontWeight">bold</property>
</style>
<style name="Tpo_Label" id="5">
<property name="fontFamily">"Verdana"</property>
<property name="fontWeight">bold</property>
<property name="color">#FF0000</property>
</style>
<style name="App_Name" id="6">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">small</property>
<property name="fontWeight">bold</property>
<property name="color">#4F687A</property>
</style>
<style name="Parameters" id="7">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">11pt</property>
</style>
<style name="Date" id="8">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">11pt</property>
</style>
<style name="TH_Lebel" id="9">
<property name="fontSize">12px</property>
<property name="fontWeight">bold</property>
<property name="color">#F7F7F7</property>
<property name="borderBottomColor">#F7F7F7</property>
<property name="borderRightColor">#D1D0D0</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">0px</property>
</style>
<style name="Table_Data" id="10">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">12px</property>
<property name="paddingTop">1pt</property>
<property name="paddingLeft">1pt</property>
<property name="paddingBottom">1pt</property>
<property name="paddingRight">1pt</property>
</style>
<style name="Statistical_Data" id="11">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">11pt</property>
<property name="borderBottomColor">#4F687A</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">thin</property>
<property name="borderTopColor">#4F687A</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">thin</property>
<property name="paddingTop">1pt</property>
<property name="paddingLeft">1pt</property>
<property name="paddingBottom">1pt</property>
<property name="paddingRight">1pt</property>
<property name="textAlign">left</property>
</style>
<style name="GroupBy" id="12">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">x-small</property>
<property name="fontWeight">bold</property>
<property name="textAlign">left</property>
</style>
<style name="sub_table" id="13">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">smaller</property>
<property name="borderBottomColor">#000000</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">thin</property>
<property name="borderTopColor">#000000</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">thin</property>
<property name="textAlign">center</property>
</style>
<style name="Master_table" id="14">
<property name="borderBottomColor">#000000</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">thin</property>
<property name="borderTopColor">#000000</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">thin</property>
</style>
<style name="SubReport_TH_Lebel" id="15">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">12px</property>
<property name="fontWeight">bold</property>
</style>
<style name="SubReport_Title_Lebel" id="16">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">12px</property>
<property name="fontWeight">bold</property>
</style>
<style name="Confidential" id="17">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">11pt</property>
<property name="color">#FF0000</property>
<property name="textAlign">right</property>
</style>
<style name="copyright" id="18">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">11pt</property>
</style>
<style name="footerGridStyle" id="19">
<property name="borderTopColor">#000000</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">thin</property>
</style>
<style name="pageNo" id="20">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">11pt</property>
<property name="textAlign">right</property>
</style>
<style name="background_color" id="21">
<property name="backgroundColor">#CFD3FF</property>
</style>
<style name="table_header" id="22">
<property name="backgroundColor">#4F687A</property>
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">x-small</property>
<property name="fontWeight">bold</property>
<property name="textAlign">left</property>
</style>
<style name="title_and_logo" id="23">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">14px</property>
<property name="fontWeight">bold</property>
<property name="borderBottomColor">#4F687A</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">thin</property>
<property name="borderTopColor">#4F687A</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">thin</property>
</style>
<style name="border_bottom" id="24">
<property name="borderBottomColor">#000000</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">thin</property>
</style>
<style name="border_top" id="25">
<property name="borderTopColor">#000000</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">thin</property>
</style>
<style name="border_bottom_right" id="26">
<property name="borderBottomColor">#000000</property>
<property name="borderBottomStyle">solid</property>
<property name="borderBottomWidth">thin</property>
<property name="borderRightColor">#000000</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">thin</property>
</style>
<style name="border_right" id="27">
<property name="borderRightColor">#000000</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">thin</property>
</style>
<style name="fcount_table" id="28">
<property name="fontFamily">"Verdana"</property>
<property name="fontSize">x-small</property>
<property name="borderLeftColor">#000000</property>
<property name="borderLeftStyle">solid</property>
<property name="borderLeftWidth">thin</property>
<property name="borderRightColor">#000000</property>
<property name="borderRightStyle">solid</property>
<property name="borderRightWidth">thin</property>
<property name="borderTopColor">#000000</property>
<property name="borderTopStyle">solid</property>
<property name="borderTopWidth">thin</property>
</style>
<style name="row_background_color" id="29">
<property name="backgroundColor">#FF8040</property>
</style>
<style name="report_title" id="30">
<property name="fontFamily">"Arial"</property>
<property name="fontSize">14px</property>
<property name="fontWeight">bold</property>
</style>
</styles>
<page-setup>
<simple-master-page name="Master Page" id="31">
<property name="type">a4</property>
<property name="orientation">landscape</property>
<property name="topMargin">0.25in</property>
<property name="leftMargin">0.5in</property>
<property name="bottomMargin">0.25in</property>
<property name="rightMargin">0.5in</property>
<page-header>
<grid name="Row_outerGrid_header" id="32">
<property name="width">100%</property>
<column id="33"/>
<row id="34">
<cell id="35">
<grid name="innerGrid_outerGrid" id="36">
<property name="width">100%</property>
<column id="37"/>
<row id="38">
<cell id="39">
<grid name="titleAndLogoGrid"
id="40">
<property
name="style">title_and_logo</property>
<property
name="width">100%</property>
<column id="41"/>
<column id="42"/>
<row id="43">
<cell id="44">
<grid
name="reportTitleGrid" id="45">
<property
name="width">100%</property>
<column id="46"/>
<row id="47">
<cell id="48">
<property
name="verticalAlign">middle</property>
<label
id="49">

<property name="style">App_Name</property>

<text-property name="text">SIMS/ART</text-property>
</label>
</cell>
</row>
<row id="50">
<cell id="51">
<property
name="verticalAlign">middle</property>
<label
id="52">

<property name="style">report_title</property>

<text-property name="text">greport</text-property>
</label>
</cell>
</row>
</grid>
</cell>
<cell id="53">
<grid name="logoGrid"
id="54">
<property
name="width">100%</property>
<column id="55"/>
<row id="56">
<cell id="57">
<property
name="paddingTop">1pt</property>
<property
name="textAlign">right</property>
<image
name="Organization Logo" id="58">

<property name="height">48px</property>

<property name="source">embed</property>

<property name="imageName">ORG_LOGO</property>
</image>
</cell>
</row>
</grid>
</cell>
</row>
<row id="59">
<cell id="60"/>
<cell id="61"/>
</row>
</grid>
</cell>
</row>
<row id="62">
<cell id="63">
<grid name="grid_5" id="64">
<property
name="width">100%</property>
<column id="65">
<property
name="width">80%</property>
</column>
<column id="66">
<property
name="width">20%</property>
</column>
<row id="67">
<cell id="68"/>
<cell id="69">
<grid name="dateGrid"
id="70">
<property
name="width">100%</property>
<column id="71"/>
<row id="72">
<cell id="73">
<property
name="textAlign">right</property>
<label
id="74">

<property name="style">Parameters</property>

<text-property name="text">Date as of </text-property>
</label>
</cell>
</row>
<row id="75">
<cell id="76">
<property
name="textAlign">right</property>
<text
name="Date1" id="77">

<property name="style">Date</property>

<property name="contentType">html</property>

<text-property name="content"><![CDATA[<value-of>new
Date()</value-of>]]></text-property>
</text>
</cell>
</row>
</grid>
</cell>
</row>
</grid>
</cell>
</row>
</grid>
</cell>
</row>
</grid>
</page-header>
<page-footer>
<grid name="footerGrid" id="78">
<property name="width">100%</property>
<column id="79">
<property name="width">86%</property>
</column>
<column id="80">
<property name="width">6%</property>
</column>
<column id="81"/>
<row id="82">
<cell id="83">
<property name="colSpan">3</property>
<property name="rowSpan">1</property>
<property
name="style">footerGridStyle</property>
<grid name="grid_footer" id="84">
<property name="width">100%</property>
<column id="85"/>
<row id="86">
<cell id="87">
<text name="footerText" id="88">
<property
name="style">copyright</property>
<property
name="contentType">html</property>
<text-property
name="content"><![CDATA[]]></text-property>
</text>
</cell>
</row>
</grid>
</cell>
</row>
<row id="89">
<cell id="90">
<text name="copyright" id="91">
<property name="style">copyright</property>
<property
name="contentType">html</property>
<text-property
name="content"><![CDATA[&amp;copy; 1996-2009 Anabase International
Corp&amp;reg;. All rights reserved.]]></text-property>
</text>
</cell>
<cell id="92">
<property name="colSpan">2</property>
<text name="Confidential" id="93">
<property
name="style">Confidential</property>
<property
name="contentType">plain</property>
<text-property
name="content"><![CDATA[Confidential]]></text-property>
</text>
</cell>
<cell id="94"/>
</row>
<row id="95">
<cell id="96"/>
<cell id="97">
<text name="PageNo" id="98">
<property name="style">pageNo</property>
<property
name="contentType">html</property>
<text-property
name="content"><![CDATA[Page:]]></text-property>
</text>
</cell>
<cell id="99">
<auto-text name="pageno" id="100">
<property name="style">pageNo</property>
<property
name="type">page-number</property>
</auto-text>
</cell>
</row>
</grid>
</page-footer>
</simple-master-page>
</page-setup>
<body>
<grid name="gridComputedColumn" id="103">
<property name="style">Statistical_Data</property>
<property name="width">100%</property>
<property name="dataSet">Main_Data_Set</property>
<column id="104">
<property name="width">18%</property>
</column>
<column id="105">
<property name="width">1%</property>
</column>
<column id="106">
<property name="width">81%</property>
</column>
</grid>
<grid id="107">
<property name="textAlign">center</property>
<property name="width">500px</property>
<column id="108"/>
<row id="109">
<cell id="110">
<extended-item extensionName="Chart" name="NewChart"
id="111">
<xml-property
name="xmlRepresentation"><![CDATA[<model:ChartWithAxes
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:attribute="http://www.birt.eclipse.org/ChartModelAttribute"
xmlns:data="http://www.birt.eclipse.org/ChartModelData"
xmlns:layout="http://www.birt.eclipse.org/ChartModelLayout"
xmlns:model="http://www.birt.eclipse.org/ChartModel"
xmlns:type="http://www.birt.eclipse.org/ChartModelType">
<Type>Line Chart</Type>
<SubType>Overlay</SubType>
<Block>
<Children xsi:type="layout:TitleBlock">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Visible>true</Visible>
<Label>
<Caption>
<Value>gtitle</Value>
<Font>
<Size>10.0</Size>
<Bold>true</Bold>
<Alignment>
<horizontalAlignment>Center</horizontalAlignment>
<verticalAlignment>Center</verticalAlignment>
</Alignment>
</Font>
</Caption>
<Background xsi:type="attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>true</Visible>
</Label>
</Children>
<Children xsi:type="layout:Plot">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>true</Visible>
</Outline>
<Visible>true</Visible>
<HorizontalSpacing>5</HorizontalSpacing>
<VerticalSpacing>5</VerticalSpacing>
<ClientArea>
<Background xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>254</Red>
<Green>251</Green>
<Blue>233</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>0</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>true</Visible>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>0.0</Left>
<Bottom>0.0</Bottom>
<Right>0.0</Right>
</Insets>
</ClientArea>
</Children>
<Children xsi:type="layout:Legend">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Visible>false</Visible>
<ClientArea>
<Outline>
<Style>Solid</Style>
<Thickness>0</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>2.0</Top>
<Left>2.0</Left>
<Bottom>2.0</Bottom>
<Right>2.0</Right>
</Insets>
</ClientArea>
<Text>
<Value></Value>
<Font>
<Size>7.0</Size>
<Alignment/>
</Font>
</Text>
<Orientation>Horizontal</Orientation>
<Direction>Left_Right</Direction>
<Separator>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>true</Visible>
</Separator>
<Position>Below</Position>
<ItemType>Series</ItemType>
<Title>
<Caption>
<Value></Value>
<Font>
<Alignment/>
</Font>
</Caption>
<Background xsi:type="attribute:ColorDefinition">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>false</Visible>
</Title>
<TitlePosition>Above</TitlePosition>
</Children>
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>600.0</Width>
<Height>300.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Background xsi:type="attribute:ColorDefinition">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Visible>true</Visible>
</Block>
<Dimension>Two_Dimensional</Dimension>
<SeriesThickness>10.0</SeriesThickness>
<Interactivity/>
<Axes>
<Type>Text</Type>
<Title>
<Caption>
<Value>ctitle</Value>
<Font>
<Name>Verdana</Name>
<Size>8.0</Size>
<Bold>false</Bold>
<Alignment>
<horizontalAlignment>Ce
Re: Chart Grouping problem BIRT 2.3 [message #368789 is a reply to message #368780] Thu, 25 June 2009 16:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.windstream.net

Can you send the program that creates the report as well.

Take a look at this test from the source code:

package org.eclipse.birt.report.tests.chart.regression;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;

import org.eclipse.birt.chart.device.IDeviceRenderer;
import org.eclipse.birt.chart.exception.ChartException;
import org.eclipse.birt.chart.factory.GeneratedChartState;
import org.eclipse.birt.chart.factory.Generator;
import org.eclipse.birt.chart.factory.IDataRowExpressionEvaluator;
import org.eclipse.birt.chart.factory.RunTimeContext;
import org.eclipse.birt.chart.model.Chart;
import org.eclipse.birt.chart.model.ChartWithAxes;
import org.eclipse.birt.chart.model.attribute.AxisType;
import org.eclipse.birt.chart.model.attribute.Bounds;
import org.eclipse.birt.chart.model.attribute.DataType;
import org.eclipse.birt.chart.model.attribute.SortOption;
import org.eclipse.birt.chart.model.attribute.impl.BoundsImpl;
import org.eclipse.birt.chart.model.component.Axis;
import org.eclipse.birt.chart.model.component.Series;
import org.eclipse.birt.chart.model.component.impl.SeriesImpl;
import org.eclipse.birt.chart.model.data.Query;
import org.eclipse.birt.chart.model.data.SeriesDefinition;
import org.eclipse.birt.chart.model.data.impl.QueryImpl;
import org.eclipse.birt.chart.model.data.impl.SeriesDefinitionImpl;
import org.eclipse.birt.chart.model.impl.ChartWithAxesImpl;
import org.eclipse.birt.chart.model.type.BarSeries;
import org.eclipse.birt.chart.model.type.impl.BarSeriesImpl;
import org.eclipse.birt.chart.util.CDateTime;
import org.eclipse.birt.chart.util.PluginSettings;
import org.eclipse.birt.report.tests.chart.ChartTestCase;

/**
* Regression description:
* </p>
* It does not work with dates (X Axis grouping)
* </p>
* Test description:
* <p>
* X Axis grouping, set x Axis data type to data time, render the
chart, verify
* if it will be take effect
* </p>
*/

public class Regression_109622_1 extends ChartTestCase
{

private static String GOLDEN = "Regression_109622_1.jpg"; //$NON-NLS-1$
private static String OUTPUT = "Regression_109622_1.jpg"; //$NON-NLS-1$

/**
* Comment for <code>serialVersionUID</code>
*/
private static final long serialVersionUID = 1L;

/**
* A chart model instance
*/
private Chart cm = null;

/**
* The jpg rendering device
*/
private IDeviceRenderer dRenderer = null;

private GeneratedChartState gcs = null;

/**
* execute application
*
* @param args
*/
public static void main( String[] args )
{
new Regression_109622_1( );
}

/**
* Constructor
*/
public Regression_109622_1( )
{
final PluginSettings ps = PluginSettings.instance( );
try
{
dRenderer = ps.getDevice( "dv.JPG" );//$NON-NLS-1$

}
catch ( ChartException ex )
{
ex.printStackTrace( );
}
cm = createChart( );
bindGroupingData( cm );

BufferedImage img = new BufferedImage(
500,
500,
BufferedImage.TYPE_INT_ARGB );
Graphics g = img.getGraphics( );

Graphics2D g2d = (Graphics2D) g;
dRenderer.setProperty( IDeviceRenderer.GRAPHICS_CONTEXT, g2d );
dRenderer.setProperty( IDeviceRenderer.FILE_IDENTIFIER, this
.genOutputFile( OUTPUT ) ); //$NON-NLS-1$
Bounds bo = BoundsImpl.create( 0, 0, 500, 500 );
bo.scale( 72d / dRenderer.getDisplayServer( ).getDpiResolution( ) );

Generator gr = Generator.instance( );

try
{
gcs = gr.build(
dRenderer.getDisplayServer( ),
cm,
bo,
null,
null,
null );
gr.render( dRenderer, gcs );
}
catch ( ChartException e )
{
// TODO Auto-generated catch block
e.printStackTrace( );
}
}

public void test_regression_109622_1( ) throws Exception
{
Regression_109622_1 st = new Regression_109622_1( );
assertTrue( st.compareBytes( GOLDEN, OUTPUT ) );
}

private void bindGroupingData( Chart chart )

{

// Data Set
final Object[][] data = new Object[][]{
{"x1", new Integer( 1 ), new CDateTime( 2004, 12, 27 )},
{"x2", new Integer( 2 ), new CDateTime( 2004, 12, 22 )},
{"x3", new Integer( 3 ), new CDateTime( 2004, 12, 27 )},
{"x4", new Integer( 4 ), new CDateTime( 2004, 12, 22 )},
{"x5", new Integer( 5 ), new CDateTime( 2004, 12, 17 ),},
{"x6", new Integer( 6 ), new CDateTime( 2004, 12, 27 )},
{"x7", new Integer( 7 ), new CDateTime( 2004, 12, 17 ),},
{"x8", new Integer( 8 ), new CDateTime( 2004, 12, 22 )},
{"x9", new Integer( 9 ), new CDateTime( 2004, 12, 17 ),},
{"x0", new Integer( 0 ), new CDateTime( 2004, 12, 17 ),},};

try
{
Generator gr = Generator.instance( );
gr.bindData( new IDataRowExpressionEvaluator( ) {

int idx = 0;

public void close( )
{
}

public Object evaluate( String expression )
{
if ( "X".equals( expression ) )
{
return data[idx][0];
}
else if ( "Y".equals( expression ) )
{
return data[idx][1];
}
else if ( "G".equals( expression ) )
{
return data[idx][2];
}
return null;
}

public Object evaluateGlobal( String expression )
{
return evaluate( expression );
}

public boolean first( )
{
idx = 0;
return true;
}

public boolean next( )
{
idx++;
return ( idx < 9 );
}
}, chart, new RunTimeContext( ) );
}
catch ( ChartException e )
{
e.printStackTrace( );
}
}

private Chart createChart( )
{
ChartWithAxes cwaBar = ChartWithAxesImpl.create( );

// X-Axis
Axis xAxisPrimary = cwaBar.getPrimaryBaseAxes( )[0];
xAxisPrimary.setType( AxisType.DATE_TIME_LITERAL );
xAxisPrimary.setCategoryAxis( true );
xAxisPrimary.getLabel( ).getCaption( ).getFont( ).setRotation( 75 );

// Y-Axis
Axis yAxisPrimary = cwaBar.getPrimaryOrthogonalAxis( xAxisPrimary );
yAxisPrimary.setType( AxisType.LINEAR_LITERAL );

// X-Series
Series seCategory = SeriesImpl.create( );
Query xQ = QueryImpl.create( "G" );
seCategory.getDataDefinition( ).add( xQ );
SeriesDefinition sdX = SeriesDefinitionImpl.create( );
xAxisPrimary.getSeriesDefinitions( ).add( sdX );
sdX.getSeries( ).add( seCategory );

// ------------------------------------------------------------ -

sdX.setSorting( SortOption.ASCENDING_LITERAL );
sdX.getGrouping( ).setEnabled( true );
sdX.getGrouping( ).setGroupType( DataType.DATE_TIME_LITERAL );
sdX.getGrouping( ).setAggregateExpression( "Sum" );
sdX.getGrouping( ).setGroupingInterval( 1 );

// ------------------------------------------------------------ -

// Y-Series

BarSeries bs = (BarSeries) BarSeriesImpl.create( );
bs.getLabel( ).setVisible( true );
Query yQ = QueryImpl.create( "Y" );
bs.getDataDefinition( ).add( yQ );
SeriesDefinition sdY = SeriesDefinitionImpl.create( );
yAxisPrimary.getSeriesDefinitions( ).add( sdY );
sdY.getSeriesPalette( ).update( 0 );
sdY.getSeries( ).add( bs );

return cwaBar;

}

}


Jason

Mehrab wrote:
> Jason,
>
> RID column exist in the dataset. When I create a report without x axis
> grouping, it's create following tag in the .rptdesign file and display
> report properly. Here RID column is y axis.
> <structure>
> <property name="name">RID</property>
> <expression name="expression">dataSetRow["RID"]</expression>
> </structure>
> But when I create report with x axis grouping, it's create following tag
> in the .rptdesign file and report throw exception. row[RID]_Sum is not
> available in the dataset.
> <structure>
> <property name="name">row[RID]_Sum</property>
> <expression name="expression">dataSetRow["row[RID]_Sum"]</expression >
> </structure>
>
> Please help me. My java code and and .rptdesign file is is as follows:
>
> ////////////////////////////// Java code /////////////////////////////
>
> private Chart createLineChart(LineChartDTO lineChartDTO) throws
> ARTChartEngineException {
> ChartWithAxes cwaLine = ChartWithAxesImpl.create( );
> if(lineChartDTO.getDimension().equals(ARTProperties.DIMENSIO N_2D)){
> cwaLine.setDimension( ChartDimension.TWO_DIMENSIONAL_LITERAL
> ); }
> else
> if(lineChartDTO.getDimension().equals(ARTProperties.DIMENSIO N_3D)){
> cwaLine.setDimension(
> ChartDimension.THREE_DIMENSIONAL_LITERAL ); }
> else
> if(lineChartDTO.getDimension().equals(ARTProperties.DIMENSIO N_2D_DEPTH)){
> cwaLine.setDimension(
> ChartDimension.THREE_DIMENSIONAL_LITERAL ); }
> /*
> * hence there BIRT dont support for Date time data in the
> * y axis for three dimension chart. problem is rendering the 3d
> chart
> * in the BIRT engine */
> if( lineChartDTO.getYAxisType()== AxisType.DATE_TIME_LITERAL
> && cwaLine.getDimension() ==
> ChartDimension.THREE_DIMENSIONAL_LITERAL ){
> // throw new ARTChartEngineException("3d chart doesnt support
> Date/time value in the series");
> cwaLine.setDimension( ChartDimension.TWO_DIMENSIONAL_LITERAL );
> }
> cwaLine.setType( CHART_LINE );
> cwaLine.setSubType( "Overlay" );
> cwaLine.getTitle( ).setVisible( true );
> cwaLine.getLegend( ).setVisible( true );
> cwaLine.setOrientation( Orientation.VERTICAL_LITERAL );
> cwaLine.getPlot( ).getClientArea( ).getOutline( ).setVisible(
> true );
> cwaLine.getPlot( ).getClientArea( ).setBackground(
> ColorDefinitionImpl.create( 254, 251, 233 ) );
> cwaLine.getLegend().setVisible(lineChartDTO.isHistoryVisible );
> cwaLine.getTitle( ).getLabel().getCaption().getFont().setSize(10);
> cwaLine.getTitle( ).getLabel().getCaption().getFont().setBold(true);
> cwaLine.getBlock().getBounds().setHeight(300);
> cwaLine.getBlock().getBounds().setWidth(600);
> cwaLine.getTitle().getLabel().getCaption().setValue(lineChar tDTO.getTilte());
>
> //PLOT Plot plotArea = cwaLine.getPlot();
> plotArea.getOutline().setVisible(true);
> //##############LEGEND##############//
> //set the legend or history of the pie
> Legend legend = cwaLine.getLegend( );
> this.setLegend(legend,lineChartDTO.isHistoryVisible());
> //get the primary base x axis
> Axis xAxisPrimary = cwaLine.getPrimaryBaseAxes( )[0];
> xAxisPrimary.getLabel().getCaption().getFont().setSize(7);
>
> xAxisPrimary.getLabel().getCaption().getFont().setName(this. getFontName());
> xAxisPrimary.getTitle( ).getCaption( ).getFont().setSize(8);
> xAxisPrimary.getTitle( ).getCaption(
> ).getFont().setName(this.getFontName());
> xAxisPrimary.getTitle().setVisible(true);
> xAxisPrimary.getTitle( ).getCaption().getFont().setBold(false);
> createRotateText(xAxisPrimary,lineChartDTO.getRotation());
> //make the x axis as category
> xAxisPrimary.setCategoryAxis( true );
> xAxisPrimary.getTitle( ).getCaption( ).setValue(
> lineChartDTO.getXAxisTitle() );
>
> if(lineChartDTO.getXAxisType()!= null &&
> lineChartDTO.getXAxisType() == AxisType.DATE_TIME_LITERAL){
> log.debug("createBarChart(): x axis type is :
> date" );
> xAxisPrimary.setType( AxisType.DATE_TIME_LITERAL );
> xAxisPrimary.setFormatSpecifier(
> JavaDateFormatSpecifierImpl.create( "dd/MMM/yyyy" ) );
> }
> else if(lineChartDTO.getXAxisType()!= null &&
> lineChartDTO.getXAxisType() == AxisType.TEXT_LITERAL){
> log.debug("createBarChart(): x axis type is : text" );
> xAxisPrimary.setType( AxisType.TEXT_LITERAL );
> }
> else if(lineChartDTO.getXAxisType()!= null &&
> lineChartDTO.getXAxisType() == AxisType.LINEAR_LITERAL){
> log.debug("createBarChart(): x axis type is : linear" );
> xAxisPrimary.setType( AxisType.LINEAR_LITERAL );
> }
> else if(lineChartDTO.getXAxisType()!= null &&
> lineChartDTO.getXAxisType() == AxisType.LOGARITHMIC_LITERAL){
> log.debug("createBarChart(): x axis type is : logger" );
> xAxisPrimary.setType( AxisType.LOGARITHMIC_LITERAL );
> }
> //show the horizontal x grid at background of chart
> //y axis as the orthogonal axis
> Axis yAxisPrimary = cwaLine.getPrimaryOrthogonalAxis(
> xAxisPrimary );
> yAxisPrimary.getLabel().getCaption().getFont().setSize(8);
>
> yAxisPrimary.getLabel().getCaption().getFont().setName(this. getFontName());
> yAxisPrimary.getTitle( ).getCaption( ).getFont().setSize(8);
> yAxisPrimary.getTitle( ).getCaption(
> ).getFont().setName(this.getFontName());
> yAxisPrimary.getTitle( ).getCaption( ).setValue(
> lineChartDTO.getYAxisTitle() );
> yAxisPrimary.getTitle( ).getCaption().getFont().setBold(false);
> yAxisPrimary.getTitle().setVisible(true);
> //show the vertical y grid at background of chart
> if(lineChartDTO.getGridType().equals(ARTProperties.GRID_HORI ZONTAL)){
> createHorizontalGrid(yAxisPrimary);
> }
> else
> if(lineChartDTO.getGridType().equals(ARTProperties.GRID_VERT ICAL)){
> createVerticalGrid(xAxisPrimary);
> }
> else
> if(lineChartDTO.getGridType().equals(ARTProperties.GRID_BOTH )) {
> createHorizontalGrid(yAxisPrimary);
> createVerticalGrid(xAxisPrimary);
> }
> else{
> //do nothing
> //since this is none type so no grid will apply
> }
> if(lineChartDTO.getYAxisType()!= null &&
> lineChartDTO.getYAxisType() == AxisType.DATE_TIME_LITERAL){
> log.debug("y axis is now : date" );
> yAxisPrimary.setType( AxisType.DATE_TIME_LITERAL );
> yAxisPrimary.setFormatSpecifier(
> JavaDateFormatSpecifierImpl.create( "dd/MMM/yyyy" ) );
> }
> else if(lineChartDTO.getYAxisType()!= null &&
> lineChartDTO.getYAxisType() == AxisType.LINEAR_LITERAL){
> log.debug("y axis is now : linear" );
> NumberFormatSpecifier formatSepecifier =
> NumberFormatSpecifierImpl.create( );
>
> formatSepecifier.setMultiplier(lineChartDTO.getYAxisMultipli erValue());
> yAxisPrimary.setFormatSpecifier(formatSepecifier);
> yAxisPrimary.setType(AxisType.LINEAR_LITERAL);
> }
> else if(lineChartDTO.getYAxisType()!= null &&
> lineChartDTO.getYAxisType() == AxisType.LOGARITHMIC_LITERAL){
> log.debug("y axis is now : logger" );
> NumberFormatSpecifier formatSepecifier =
> NumberFormatSpecifierImpl.create( );
>
> formatSepecifier.setMultiplier(lineChartDTO.getYAxisMultipli erValue());
> yAxisPrimary.setFormatSpecifier(formatSepecifier);
> yAxisPrimary.setType(AxisType.LOGARITHMIC_LITERAL);
> }
> else{
> log.debug(lineChartDTO.getYAxisType() + ": is not
> supported ");
> }
> //create base category
> Series seCategory = SeriesImpl.create( );
> Query query = QueryImpl.create(
> lineChartDTO.getCategoryDefinition() );
> seCategory.getDataDefinition( ).add( query );
>
> //create series definition for the x axis or the base axis
> SeriesDefinition sdX = SeriesDefinitionImpl.create( );
> sdX.getSeries( ).add( seCategory );
> if(lineChartDTO.getXAxisSorting() != null ){
>
> if(lineChartDTO.getXAxisSorting().equalsIgnoreCase("ASCENDING ") ){
> sdX.setSorting(SortOption.ASCENDING_LITERAL);
> }
> else{
> sdX.setSorting(SortOption.DESCENDING_LITERAL);
> }
> }
> if(lineChartDTO.isGroupOnCategory()){
> //if hte y axis is data type then no group will apply
> if(lineChartDTO.getYAxisType() == AxisType.DATE_TIME_LITERAL){
> //do not grouping
> log.debug("y axis is date type , so no group will apply");
> }
> else{
> /*
> * here we have three types of data Text,Linear,Date
> * there will be different value for groupin
> interval.accoding BIRT-2.1.0
> * there is now understandable clear document about the
> definition of * grouping interval.but using trial and
> error process we recover the following
> * value for correct goruping
> * TEXT = 0
> * DATE/TIME = 1
> * NUMBER = 1
> */
>
> sdX.getGrouping().setEnabled(lineChartDTO.isGroupOnCategory( ));
> // set the text type group interval
> if(lineChartDTO.getYAxisType() == AxisType.TEXT_LITERAL){
> sdX.getGrouping().setGroupingInterval(0);
> }
> //Date and Number type is same group interval
> else {
> sdX.getGrouping().setGroupingInterval(1);
> }
> if(lineChartDTO.getXAxisType() ==
> AxisType.DATE_TIME_LITERAL){
>
> sdX.getGrouping().setGroupType(DataType.DATE_TIME_LITERAL);
> createCategoryGroupUnit(lineChartDTO,sdX);
> }
> sdX.getGrouping().setAggregateExpression("Sum");
> }
> }
> xAxisPrimary.getSeriesDefinitions( ).add( sdX );
>
> if(lineChartDTO.getDimension().equals(ARTProperties.DIMENSIO N_3D)
>
> ||lineChartDTO.getDimension().equals(ARTProperties.DIMENSION _2D_DEPTH)){
> createZAxis(xAxisPrimary);
> cwaLine.setRotation( Rotation3DImpl.create( new Angle3D[]{
> Angle3DImpl.create( -20, 45, 0 )
> } ) );
> }
> //create multiple line series
> createMultipleLineSeries(yAxisPrimary,lineChartDTO);
> return cwaLine;
> }
> /**
> * create multiple series on line chart
> * @param yAxisPrimary as the base axis
> * @param lineChartDTO , chart data object
> */
> private void createMultipleLineSeries(Axis yAxisPrimary,
> LineChartDTO lineChartDTO){
> Map<String,String> yseriesValueMap =
> lineChartDTO.getYSeriesValuesMap();
> //define blank series definition
> SeriesDefinition sdY = null;
> //value for the bar series color code
> int count = -2;
> int markerCount = 1;
> Set<String> keySet = yseriesValueMap.keySet();
> for(String key : keySet){
> String exp = key;
> String expName = yseriesValueMap.get(exp);
> LineSeries ls = (LineSeries) LineSeriesImpl.create( );
> ls.setSeriesIdentifier(expName);
> ls.getLabel().setVisible(
> lineChartDTO.isShowSeriesValue() );
> ls.getLabel().getCaption().getFont().setSize(9);
>
> ls.getLabel().getCaption().getFont().setName(this.getFontNam e());
> //ls.setLabelPosition( Position.OUTSIDE_LITERAL );
>
> ls.getLabel().getCaption().getFont().setRotation(lineChartDT O.getSerriesRotation());
>
> //
> ls.getLineAttributes().setColor(ColorDefinitionImpl.create( 154, 50, 102
> ));
>
> if(lineChartDTO.getDimension().equals(ARTProperties.DIMENSIO N_2D)){
> if(markerCount > 14){
> log.debug("There is no available marker in the
> marker list");
> }
> else{
> ls.getMarker( ).setType(
> getMarkerList().get(String.valueOf(markerCount)) );
> }
> }
>
> if(lineChartDTO.getDimension().equals(ARTProperties.DIMENSIO N_3D)
>
> ||lineChartDTO.getDimension().equals(ARTProperties.DIMENSION _2D_DEPTH)){
>
> ls.getLineAttributes().setColor(ColorDefinitionImpl.create( 154, 50, 102
> ));
> }
> //
> ls.setMarker(MarkerImpl.create(MarkerType.BOX_LITERAL,1));
> Query query2 = QueryImpl.create( exp );
> ls.getDataDefinition( ).add( query2 );
> sdY = SeriesDefinitionImpl.create( );
> sdY.getSeriesPalette( ).update( count );
> sdY.getSeries( ).add( ls );
> yAxisPrimary.getSeriesDefinitions( ).add( sdY );
> count = count - 1;
> markerCount = markerCount + 1; }
> }
>
>
> ///////////////////////////// .rptdesign ////////////////////////////
>
> <?xml version="1.0" encoding="UTF-8"?>
> <report xmlns="http://www.eclipse.org/birt/2005/design" version="3.2.17"
> id="1">
> <data-sources>
> <oda-data-source
> extensionID="org.eclipse.birt.report.data.oda.jdbc" name="Data Source"
> id="101">
> <property
> name="odaDriverClass">oracle.jdbc.driver.OracleDriver</property >
> <property
> name="odaURL">jdbc:oracle:thin:@192.168.174.25:1521:BDEV</property >
> <property name="odaUser">mferdous</property>
> <encrypted-property name="odaPassword"
> encryptionID="base64">YW5hYmFzZQ==</encrypted-property>
> </oda-data-source>
> </data-sources>
> <data-sets>
> <oda-data-set
> extensionID="org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet "
> name="Main_Data_Set" id="102">
> <property name="dataSource">Data Source</property>
> <property name="queryText"> SELECT
> SIMS.ROLES."CREATOR",SIMS.ROLES."RID" FROM SIMS.ROLES </property>
> </oda-data-set>
> </data-sets>
> <styles>
> <style name="crosstab-cell" id="2">
> <property name="borderBottomColor">#CCCCCC</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">1pt</property>
> <property name="borderLeftColor">#CCCCCC</property>
> <property name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">1pt</property>
> <property name="borderRightColor">#CCCCCC</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">1pt</property>
> <property name="borderTopColor">#CCCCCC</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">1pt</property>
> </style>
> <style name="crosstab" id="3">
> <property name="borderBottomColor">#CCCCCC</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">1pt</property>
> <property name="borderLeftColor">#CCCCCC</property>
> <property name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">1pt</property>
> <property name="borderRightColor">#CCCCCC</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">1pt</property>
> <property name="borderTopColor">#CCCCCC</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">1pt</property>
> </style>
> <style name="Report_Title_Style" id="4">
> <property name="backgroundColor">#A9B2FD</property>
> <property name="fontFamily">"Arial"</property>
> <property name="fontSize">12px</property>
> <property name="fontWeight">bold</property>
> </style>
> <style name="Tpo_Label" id="5">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontWeight">bold</property>
> <property name="color">#FF0000</property>
> </style>
> <style name="App_Name" id="6">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">small</property>
> <property name="fontWeight">bold</property>
> <property name="color">#4F687A</property>
> </style>
> <style name="Parameters" id="7">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">11pt</property>
> </style>
> <style name="Date" id="8">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">11pt</property>
> </style>
> <style name="TH_Lebel" id="9">
> <property name="fontSize">12px</property>
> <property name="fontWeight">bold</property>
> <property name="color">#F7F7F7</property>
> <property name="borderBottomColor">#F7F7F7</property>
> <property name="borderRightColor">#D1D0D0</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">0px</property>
> </style>
> <style name="Table_Data" id="10">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">12px</property>
> <property name="paddingTop">1pt</property>
> <property name="paddingLeft">1pt</property>
> <property name="paddingBottom">1pt</property>
> <property name="paddingRight">1pt</property>
> </style>
> <style name="Statistical_Data" id="11">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">11pt</property>
> <property name="borderBottomColor">#4F687A</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">thin</property>
> <property name="borderTopColor">#4F687A</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">thin</property>
> <property name="paddingTop">1pt</property>
> <property name="paddingLeft">1pt</property>
> <property name="paddingBottom">1pt</property>
> <property name="paddingRight">1pt</property>
> <property name="textAlign">left</property>
> </style>
> <style name="GroupBy" id="12">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">x-small</property>
> <property name="fontWeight">bold</property>
> <property name="textAlign">left</property>
> </style>
> <style name="sub_table" id="13">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">smaller</property>
> <property name="borderBottomColor">#000000</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">thin</property>
> <property name="borderTopColor">#000000</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">thin</property>
> <property name="textAlign">center</property>
> </style>
> <style name="Master_table" id="14">
> <property name="borderBottomColor">#000000</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">thin</property>
> <property name="borderTopColor">#000000</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">thin</property>
> </style>
> <style name="SubReport_TH_Lebel" id="15">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">12px</property>
> <property name="fontWeight">bold</property>
> </style>
> <style name="SubReport_Title_Lebel" id="16">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">12px</property>
> <property name="fontWeight">bold</property>
> </style>
> <style name="Confidential" id="17">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">11pt</property>
> <property name="color">#FF0000</property>
> <property name="textAlign">right</property>
> </style>
> <style name="copyright" id="18">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">11pt</property>
> </style>
> <style name="footerGridStyle" id="19">
> <property name="borderTopColor">#000000</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">thin</property>
> </style>
> <style name="pageNo" id="20">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">11pt</property>
> <property name="textAlign">right</property>
> </style>
> <style name="background_color" id="21">
> <property name="backgroundColor">#CFD3FF</property>
> </style>
> <style name="table_header" id="22">
> <property name="backgroundColor">#4F687A</property>
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">x-small</property>
> <property name="fontWeight">bold</property>
> <property name="textAlign">left</property>
> </style>
> <style name="title_and_logo" id="23">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">14px</property>
> <property name="fontWeight">bold</property>
> <property name="borderBottomColor">#4F687A</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">thin</property>
> <property name="borderTopColor">#4F687A</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">thin</property>
> </style>
> <style name="border_bottom" id="24">
> <property name="borderBottomColor">#000000</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">thin</property>
> </style>
> <style name="border_top" id="25">
> <property name="borderTopColor">#000000</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">thin</property>
> </style>
> <style name="border_bottom_right" id="26">
> <property name="borderBottomColor">#000000</property>
> <property name="borderBottomStyle">solid</property>
> <property name="borderBottomWidth">thin</property>
> <property name="borderRightColor">#000000</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">thin</property>
> </style>
> <style name="border_right" id="27">
> <property name="borderRightColor">#000000</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">thin</property>
> </style>
> <style name="fcount_table" id="28">
> <property name="fontFamily">"Verdana"</property>
> <property name="fontSize">x-small</property>
> <property name="borderLeftColor">#000000</property>
> <property name="borderLeftStyle">solid</property>
> <property name="borderLeftWidth">thin</property>
> <property name="borderRightColor">#000000</property>
> <property name="borderRightStyle">solid</property>
> <property name="borderRightWidth">thin</property>
> <property name="borderTopColor">#000000</property>
> <property name="borderTopStyle">solid</property>
> <property name="borderTopWidth">thin</property>
> </style>
> <style name="row_background_color" id="29">
> <property name="backgroundColor">#FF8040</property>
> </style>
> <style name="report_title" id="30">
> <property name="fontFamily">"Arial"</property>
> <property name="fontSize">14px</property>
> <property name="fontWeight">bold</property>
> </style>
> </styles>
> <page-setup>
> <simple-master-page name="Master Page" id="31">
> <property name="type">a4</property>
> <property name="orientation">landscape</property>
> <property name="topMargin">0.25in</property>
> <property name="leftMargin">0.5in</property>
> <property name="bottomMargin">0.25in</property>
> <property name="rightMargin">0.5in</property>
> <page-header>
> <grid name="Row_outerGrid_header" id="32">
> <property name="width">100%</property>
> <column id="33"/>
> <row id="34">
> <cell id="35">
> <grid name="innerGrid_outerGrid" id="36">
> <property name="width">100%</property>
> <column id="37"/>
> <row id="38">
> <cell id="39">
> <grid name="titleAndLogoGrid"
> id="40">
> <property
> name="style">title_and_logo</property>
> <property
> name="width">100%</property>
> <column id="41"/>
> <column id="42"/>
> <row id="43">
> <cell id="44">
> <grid
> name="reportTitleGrid" id="45">
> <property
> name="width">100%</property>
> <column id="46"/>
> <row id="47">
> <cell id="48">
> <property
> name="verticalAlign">middle</property>
> <label
> id="49">
>
> <property name="style">App_Name</property>
>
> <text-property name="text">SIMS/ART</text-property>
> </label>
> </cell>
> </row>
> <row id="50">
> <cell id="51">
> <property
> name="verticalAlign">middle</property>
> <label
> id="52">
>
> <property name="style">report_title</property>
>
> <text-property name="text">greport</text-property>
> </label>
> </cell>
> </row>
> </grid>
> </cell>
> <cell id="53">
> <grid name="logoGrid"
> id="54">
> <property
> name="width">100%</property>
> <column id="55"/>
> <row id="56">
> <cell id="57">
> <property
> name="paddingTop">1pt</property>
> <property
> name="textAlign">right</property>
> <image
> name="Organization Logo" id="58">
>
> <property name="height">48px</property>
>
> <property name="source">embed</property>
>
> <property name="imageName">ORG_LOGO</property>
> </image>
> </cell>
> </row>
> </grid>
> </cell>
> </row>
> <row id="59">
> <cell id="60"/>
> <cell id="61"/>
> </row>
> </grid>
> </cell>
> </row>
> <row id="62">
> <cell id="63">
> <grid name="grid_5" id="64">
> <property
> name="width">100%</property>
> <column id="65">
> <property
> name="width">80%</property>
> </column>
> <column id="66">
> <property
> name="width">20%</property>
> </column>
> <row id="67">
> <cell id="68"/>
> <cell id="69">
> <grid name="dateGrid"
> id="70">
> <property
> name="width">100%</property>
> <column id="71"/>
> <row id="72">
> <cell id="73">
> <property
> name="textAlign">right</property>
> <label
> id="74">
>
> <property name="style">Parameters</property>
>
> <text-property name="text">Date as of </text-property>
> </label>
> </cell>
> </row>
> <row id="75">
> <cell id="76">
> <property
> name="textAlign">right</property>
> <text
> name="Date1" id="77">
>
> <property name="style">Date</property>
>
> <property name="contentType">html</property>
>
> <text-property name="content"><![CDATA[<value-of>new
> Date()</value-of>]]></text-property>
> </text>
> </cell>
> </row>
> </grid>
> </cell>
> </row>
> </grid>
> </cell>
> </row>
> </grid>
> </cell>
> </row>
> </grid>
> </page-header>
> <page-footer>
> <grid name="footerGrid" id="78">
> <property name="width">100%</property>
> <column id="79">
> <property name="width">86%</property>
> </column>
> <column id="80">
> <property name="width">6%</property>
> </column>
> <column id="81"/>
> <row id="82">
> <cell id="83">
> <property name="colSpan">3</property>
> <property name="rowSpan">1</property>
> <property
> name="style">footerGridStyle</property>
> <grid name="grid_footer" id="84">
> <property name="width">100%</property>
> <column id="85"/>
> <row id="86">
> <cell id="87">
> <text name="footerText" id="88">
> <property
> name="style">copyright</property>
> <property
> name="contentType">html</property>
> <text-property
> name="content"><![CDATA[]]></text-property>
> </text>
> </cell>
> </row>
> </grid>
> </cell>
> </row>
> <row id="89">
> <cell id="90">
> <text name="copyright" id="91">
> <property name="style">copyright</property>
> <property name="contentType">html</property>
> <text-property
> name="content"><![CDATA[&amp;copy; 1996-2009 Anabase International
> Corp&amp;reg;. All rights reserved.]]></text-property>
> </text>
> </cell>
> <cell id="92">
> <property name="colSpan">2</property>
> <text name="Confidential" id="93">
> <property
> name="style">Confidential</property>
> <property
> name="contentType">plain</property>
> <text-property
> name="content"><![CDATA[Confidential]]></text-property>
> </text>
> </cell>
> <cell id="94"/>
> </row>
> <row id="95">
> <cell id="96"/>
> <cell id="97">
> <text name="PageNo" id="98">
> <property name="style">pageNo</property>
> <property name="contentType">html</property>
> <text-property
> name="content"><![CDATA[Page:]]></text-property>
> </text>
> </cell>
> <cell id="99">
> <auto-text name="pageno" id="100">
> <property name="style">pageNo</property>
> <property name="type">page-number</property>
> </auto-text>
> </cell>
> </row>
> </grid>
> </page-footer>
> </simple-master-page>
> </page-setup>
> <body>
> <grid name="gridComputedColumn" id="103">
> <property name="style">Statistical_Data</property>
> <property name="width">100%</property>
> <property name="dataSet">Main_Data_Set</property>
> <column id="104">
> <property name="width">18%</property>
> </column>
> <column id="105">
> <property name="width">1%</property>
> </column>
> <column id="106">
> <property name="width">81%</property>
> </column>
> </grid>
> <grid id="107">
> <property name="textAlign">center</property>
> <property name="width">500px</property>
> <column id="108"/>
> <row id="109">
> <cell id="110">
> <extended-item extensionName="Chart" name="NewChart"
> id="111">
> <xml-property
> name="xmlRepresentation"><![CDATA[<model:ChartWithAxes
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:attribute="http://www.birt.eclipse.org/ChartModelAttribute"
> xmlns:data="http://www.birt.eclipse.org/ChartModelData"
> xmlns:layout="http://www.birt.eclipse.org/ChartModelLayout"
> xmlns:model="http://www.birt.eclipse.org/ChartModel"
> xm
Re: Chart Grouping problem BIRT 2.3 [message #368840 is a reply to message #368789] Tue, 30 June 2009 11:47 Go to previous messageGo to next message
Mehrab is currently offline MehrabFriend
Messages: 14
Registered: July 2009
Junior Member
Jason,

My simple chart program that creates the report .rptdesign file. If I use
BIRT 2.1 to run the program then its create and run report properly. But
if I use BIRT 2.3 then its throw exception on report runtime. If I create
report without x-axis grouping then the report run properly. Please help
me. I think its a bug.

Thank you.

Mehrab

Take a look at this source code:

package com.birt.test;

import java.io.IOException;

import org.eclipse.birt.chart.model.Chart;
import org.eclipse.birt.chart.model.ChartWithAxes;
import org.eclipse.birt.chart.model.attribute.AxisType;
import org.eclipse.birt.chart.model.attribute.DataType;
import org.eclipse.birt.chart.model.attribute.IntersectionType;
import org.eclipse.birt.chart.model.attribute.SortOption;
import org.eclipse.birt.chart.model.attribute.TickStyle;
import org.eclipse.birt.chart.model.attribute.impl.ColorDefinitionI mpl;
import org.eclipse.birt.chart.model.component.Axis;
import org.eclipse.birt.chart.model.component.Series;
import org.eclipse.birt.chart.model.component.impl.SeriesImpl;
import org.eclipse.birt.chart.model.data.Query;
import org.eclipse.birt.chart.model.data.SeriesDefinition;
import org.eclipse.birt.chart.model.data.impl.QueryImpl;
import org.eclipse.birt.chart.model.data.impl.SeriesDefinitionImpl;
import org.eclipse.birt.chart.model.impl.ChartWithAxesImpl;
import org.eclipse.birt.chart.model.layout.Plot;
import org.eclipse.birt.chart.model.type.LineSeries;
import org.eclipse.birt.chart.model.type.impl.LineSeriesImpl;
import org.eclipse.birt.core.framework.Platform;
import org.eclipse.birt.report.model.api.DesignConfig;
import org.eclipse.birt.report.model.api.ElementFactory;
import org.eclipse.birt.report.model.api.ExtendedItemHandle;
import org.eclipse.birt.report.model.api.IDesignEngine;
import org.eclipse.birt.report.model.api.IDesignEngineFactory;
import org.eclipse.birt.report.model.api.OdaDataSetHandle;
import org.eclipse.birt.report.model.api.OdaDataSourceHandle;
import org.eclipse.birt.report.model.api.ReportDesignHandle;
import org.eclipse.birt.report.model.api.SessionHandle;
import org.eclipse.birt.report.model.api.SimpleMasterPageHandle;
import org.eclipse.birt.report.model.api.activity.SemanticException ;
import org.eclipse.birt.report.model.api.command.ContentException;
import org.eclipse.birt.report.model.api.command.NameException;

import com.ibm.icu.util.ULocale;


public class SimpleChart

{

private ReportDesignHandle reportDesignHandle = null;

private ElementFactory elementFactory = null;

private OdaDataSourceHandle odaDataSourceHandle = null;

private String dataSourceName = \"datasource\";

private String dataSetName = \"maindataset\";

private String query = \"SELECT SIMS.ROLES.\\\"CREATOR\\\",
SIMS.ROLES.\\\"RID\\\" FROM SIMS.ROLES \";

public static void main(String args[])

{
try {

new SimpleChart().createReport();

} catch (Exception e) {

e.printStackTrace();

}

}


public void createReport() throws SemanticException, IOException

{
System.out.println(\"Start\");
init();

createMasterPages();

createDataSources();

createDataSets();

createBody();

String outputPath = \"C:/work\";

reportDesignHandle.saveAs(outputPath + \"/\" +
\"SimpleChart2_1.rptdesign\");//$NON-NLS-1$//$NON-NLS-2$

System.out.println(\"End\");

}


private void init(){


DesignConfig config = new DesignConfig();

config.setProperty(\"BIRT_HOME\",
\" C:/Users/Mehrabul/Documents/Projects/AnabaseWorkSpace270509t est/art/war/WEB-INF/platform\ ");

IDesignEngine engine = null;

try {

Platform.startup(config);

IDesignEngineFactory factory = (IDesignEngineFactory) Platform

.createFactoryObject(IDesignEngineFactory.EXTENSION_DESIGN_E NGINE_FACTORY);

engine = factory.createDesignEngine(config);

} catch (Exception ex) {

ex.printStackTrace();

}


// we need a handle of session of design engine

SessionHandle sessionHandle = engine.newSessionHandle(ULocale.ENGLISH);

reportDesignHandle = sessionHandle.createDesign();

elementFactory = reportDesignHandle.getElementFactory();

}


private void createMasterPages() throws ContentException, NameException

{

SimpleMasterPageHandle simpleMasterPage =
elementFactory.newSimpleMasterPage(\"Master Page\");

reportDesignHandle.getMasterPages().add(simpleMasterPage);

}


private void createDataSets() throws SemanticException

{

String dataSetType =
\"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet\";

OdaDataSetHandle dataSetHandle = null;

dataSetHandle = elementFactory.newOdaDataSet(dataSetName, dataSetType);

dataSetHandle.setDataSource(dataSourceName);

dataSetHandle.setQueryText(query);

reportDesignHandle.getDataSets().add(dataSetHandle);

}


private void createDataSources() throws SemanticException

{

// type of the data source

String extensionID = \"org.eclipse.birt.report.data.oda.jdbc\";

String driverClassName = \"oracle.jdbc.driver.OracleDriver\";

String driverURL = \"jdbc:oracle:thin:@192.168.174.25:1521:BDEV\";

String userName = \"mferdous\";

String userPassword = \"anabase\";


// now make a data source with the dataSourceName and extensionID.

odaDataSourceHandle = elementFactory.newOdaDataSource(dataSourceName,
extensionID);

odaDataSourceHandle.setProperty(\"odaDriverClass\", driverClassName);

odaDataSourceHandle.setProperty(\"odaURL\", driverURL);

odaDataSourceHandle.setProperty(\"odaUser\", userName);

odaDataSourceHandle.setProperty(\"odaPassword\", userPassword);

reportDesignHandle.getDataSources().add(odaDataSourceHandle) ;

}


private void createBody() throws SemanticException

{
ExtendedItemHandle extendedItemHandle =
elementFactory.newExtendedItem(\"Simple Chart\", \"Chart\");
extendedItemHandle.setWidth(\"700px\");
extendedItemHandle.setHeight(\"500px\");
extendedItemHandle.setProperty(ExtendedItemHandle.DATA_SET_P ROP,
dataSetName);
extendedItemHandle.setProperty(\"outputFormat\",\"GIF\");

Chart c = createChart();

extendedItemHandle.getReportItem().setProperty( \"chart.instance\", c );

reportDesignHandle.getBody().add(extendedItemHandle);

}

private Chart createChart() {

ChartWithAxes cwaLine = ChartWithAxesImpl.create();
cwaLine.setType( \"Line Chart\" ); //$NON-NLS-1$
cwaLine.setSubType( \"Overlay\" ); //$NON-NLS-1$
cwaLine.getBlock().getBounds().setWidth(600);
cwaLine.getBlock().getBounds().setHeight(400);

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

// Title
cwaLine.getTitle().getLabel().getCaption().setValue( \"Overlay test Line
Chart\" );//$NON-NLS-1$
cwaLine.getTitle().setVisible(true);

// Legend
cwaLine.getLegend().setVisible( true );


// X-Axis
Axis xAxisPrimary = cwaLine.getPrimaryBaseAxes()[0];
xAxisPrimary.setType( AxisType.TEXT_LITERAL );
xAxisPrimary.getMajorGrid().setTickStyle( TickStyle.BELOW_LITERAL );
xAxisPrimary.getOrigin().setType( IntersectionType.MIN_LITERAL );

// Y-Axis
Axis yAxisPrimary = cwaLine.getPrimaryOrthogonalAxis( xAxisPrimary );
yAxisPrimary.setType(AxisType.LINEAR_LITERAL);
yAxisPrimary.getMajorGrid().setTickStyle( TickStyle.RIGHT_LITERAL );
yAxisPrimary.getLabel().getCaption().setValue(\"TEST\");
yAxisPrimary.getLabel().setVisible(true);

// X-Series
Series seCategory = SeriesImpl.create();
SeriesDefinition sdX = SeriesDefinitionImpl.create();


xAxisPrimary.getSeriesDefinitions().clear();
xAxisPrimary.getSeriesDefinitions().add( sdX );
sdX.getSeries().add( seCategory );
Query query1 = QueryImpl.create( \"row[\\\"CREATOR\\\"]\" );
seCategory.getDataDefinition().clear();
seCategory.getDataDefinition().add( query1 );

// X Axis Grouping
sdX.getGrouping().setEnabled(true);

sdX.setSorting(SortOption.ASCENDING_LITERAL);

sdX.getGrouping().setGroupingInterval(1);

sdX.getGrouping().setGroupType(DataType.TEXT_LITERAL);

sdX.getGrouping().setAggregateExpression(\"Sum\");

// Y-Sereis
SeriesDefinition sdY = SeriesDefinitionImpl.create();
sdY.getSeriesPalette().update( -2 );
yAxisPrimary.getSeriesDefinitions().clear();

LineSeries ls1 = (LineSeries) LineSeriesImpl.create();
ls1.setSeriesIdentifier(\"testls\");

ls1.setVisible(true);

ls1.getLabel().setVisible( true );

Query query2 = QueryImpl.create( \"row[\\\"RID\\\"]\" );//$NON-NLS-1$
yAxisPrimary.getSeriesDefinitions().add( sdY );
sdY.getSeries().add( ls1 );


ls1.getDataDefinition().clear();
ls1.getDataDefinition().add( query2 );

return cwaLine;
}
}

//////////////// .rptdesign using BIRT 2.1 ////////////////////////////

<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<!-- Written by Eclipse BIRT 2.0 -->
<report xmlns=\"http://www.eclipse.org/birt/2005/design\"
version=\"3.2.2\" id=\"1\">
<data-sources>
<oda-data-source
extensionID=\"org.eclipse.birt.report.data.oda.jdbc\" name=\"datasource\"
id=\"3\">
<property
name=\"odaDriverClass\">oracle.jdbc.driver.OracleDriver</property >
<property
name=\"odaURL\">jdbc:oracle:thin:@192.168.174.25:1521:BDEV </property>
<property name=\"odaUser\">mferdous</property>
<encrypted-property
name=\"odaPassword\">YW5hYmFzZQ==</encrypted-property>
</oda-data-source>
</data-sources>
<data-sets>
<oda-data-set
extensionID=\"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet\ "
name=\"maindataset\" id=\"4\">
<property name=\"dataSource\">datasource</property>
<property name=\"queryText\">SELECT SIMS.ROLES.\"CREATOR\",
SIMS.ROLES.\"RID\" FROM SIMS.ROLES </property>
</oda-data-set>
</data-sets>
<page-setup>
<simple-master-page name=\"Master Page\" id=\"2\"/>
</page-setup>
<body>
<extended-item extensionName=\"Chart\" name=\"Simple Chart\"
id=\"5\">
<property name=\"height\">500px</property>
<property name=\"width\">700px</property>
<property name=\"dataSet\">maindataset</property>
<list-property name=\"boundDataColumns\">
<structure>
<property name=\"name\">CREATOR</property>
<expression
name=\"expression\">dataSetRow[\"CREATOR\"]</expression >
</structure>
<structure>
<property name=\"name\">RID</property>
<expression
name=\"expression\">dataSetRow[\"RID\"]</expression>
</structure>
</list-property>
<xml-property
name=\"xmlRepresentation\"><![CDATA[<model:ChartWithAxes
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xmlns:attribute=\"http://www.birt.eclipse.org/ChartModelAttribute\"
xmlns:data=\"http://www.birt.eclipse.org/ChartModelData\"
xmlns:layout=\"http://www.birt.eclipse.org/ChartModelLayout\"
xmlns:model=\"http://www.birt.eclipse.org/ChartModel\"
xmlns:type=\"http://www.birt.eclipse.org/ChartModelType\">
<Type>Line Chart</Type>
<SubType>Overlay</SubType>
<Block>
<Children xsi:type=\"layout:TitleBlock\">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Visible>true</Visible>
<Label>
<Caption>
<Value>Overlay test Line Chart</Value>
<Font>
<Size>16.0</Size>
<Bold>true</Bold>
<Alignment>
<horizontalAlignment>Center</horizontalAlignment>
<verticalAlignment>Center</verticalAlignment>
</Alignment>
</Font>
</Caption>
<Background xsi:type=\"attribute:ColorDefinition\">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>true</Visible>
</Label>
</Children>
<Children xsi:type=\"layout:Plot\">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Visible>true</Visible>
<HorizontalSpacing>5</HorizontalSpacing>
<VerticalSpacing>5</VerticalSpacing>
<ClientArea>
<Background xsi:type=\"attribute:ColorDefinition\">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>225</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>0</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>0.0</Left>
<Bottom>0.0</Bottom>
<Right>0.0</Right>
</Insets>
</ClientArea>
</Children>
<Children xsi:type=\"layout:Legend\">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Visible>true</Visible>
<ClientArea>
<Outline>
<Style>Solid</Style>
<Thickness>0</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>2.0</Top>
<Left>2.0</Left>
<Bottom>2.0</Bottom>
<Right>2.0</Right>
</Insets>
</ClientArea>
<Text>
<Value></Value>
<Font>
<Alignment/>
</Font>
</Text>
<Orientation>Vertical</Orientation>
<Direction>Top_Bottom</Direction>
<Separator>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>true</Visible>
</Separator>
<Position>Right</Position>
<ItemType>Series</ItemType>
<Title>
<Caption>
<Value></Value>
<Font>
<Alignment/>
</Font>
</Caption>
<Background xsi:type=\"attribute:ColorDefinition\">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>false</Visible>
</Title>
<TitlePosition>Above</TitlePosition>
</Children>
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>600.0</Width>
<Height>400.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Background xsi:type=\"attribute:ColorDefinition\">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Visible>true</Visible>
</Block>
<Dimension>Two_Dimensional</Dimension>
<SeriesThickness>10.0</SeriesThickness>
<Interactivity/>
<Axes>
<Type>Text</Type>
<Title>
<Caption>
<Value>X-Axis Title</Value>
<Font>
<Size>14.0</Size>
<Bold>true</Bold>
<Alignment>
<horizontalAlignment>Center</horizontalAlignment>
<verticalAlignment>Center</verticalAlignment>
</Alignment>
</Font>
</Caption>
<Background xsi:type=\"attribute:ColorDefinition\">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>false</Visible>
</Title>
<TitlePosition>Below</TitlePosition>
<AssociatedAxes>
<Type>Linear</Type>
<Title>
<Caption>
<Value>Y-Axis Title</Value>
<Font>
<Size>14.0</Size>
<Bold>true</Bold>
<Alignment>
<horizontalAlignment>Center</horizontalAlignment>
<verticalAlignment>Center</verticalAlignment>
</Alignment>
<Rotation>90.0</Rotation>
</Font>
</Caption>
<Background xsi:type=\"attribute:ColorDefinition\">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>false</Visible>
</Title>
<TitlePosition>Left</TitlePosition>
<SeriesDefinitions>
<Query>
<Definition></Definition>
</Query>
<SeriesPalette>
<Entries xsi:type=\"attribute:ColorDefinition\">
<Transparency>255</Transparency>
<Red>232</Red>
<Green>172</Green>
<Blue>57</Blue>
</Entries>
<Entries xsi:type=\"attribute:ColorDefinition\">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>255</Green>
<Blue>128</Blue>
</Entries>
<Entries xsi:type=\"attribute:ColorDefinition\">
<Transparency>255</Transparency>
<Red>64</Red>
<Green>128</Green>
<Blue>128</Blue>
</Entries>
<Entries xsi:type=\"attribute:ColorDefinition\">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>128</Green>
<Blue>192</Blue>
</Entries>
<Entries xsi:type=\"attribute:ColorDefinition\">
<Transparency>255</Transparency>
<Red>170</Red>
<Green>85</Green>
<Blue>85</Blue>
</Entries>
<Entries xsi:type=\"attribute:ColorDefinition\">
<Transparency>255</Transparency>
<Red>128</Red>
<Green>128</Green>
<Blue>0</Blue>
</Entries>
<Entries xsi:type=\"attribute:ColorDefinition\">
<Transparency>255</Transparency>
<Red>80</Red>
<Green>166</Green>
<Blue>218</Blue>
</Entries>
<Entries xsi:type=\"attribute:ColorDefinition\">
<Transparency>255</Transparency>
<Red>242</Red>
<Green>88</Green>
<Blue>106</Blue>
</Entries>
</SeriesPalette>
<Series xsi:type=\"type:LineSeries\">
<Visible>true</Visible>
<Label>
<Caption>
<Value></Value>
<Font>
<Alignment/>
</Font>
</Caption>
<Background xsi:type=\"attribute:ColorDefinition\">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>true</Visible>
</Label>
<DataDefinition>
<Definition>row[&quot;RID&quot;]</Definition>
</DataDefinition>
<SeriesIdentifier>testls</SeriesIdentifier>
<DataPoint>
<Components>
<Type>Orthogonal_Value</Type>
</Components>
<Separator>, </Separator>
</DataPoint>
<LabelPosition>Above</LabelPosition>
<Stacked>false</Stacked>
<Markers>
<Type>Box</Type>
<Size>4</Size>
<Visible>true</Visible>
</Markers>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>true</Visible>
</LineAttributes>
</Series>
<Grouping>
<Enabled>false</Enabled>
<GroupingInterval>2</GroupingInterval>
<GroupType>Text</GroupType>
<AggregateExpression>Sum</AggregateExpression>
</Grouping>
</SeriesDefinitions>
<Orientation>Vertical</Orientation>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>true</Visible>
</LineAttributes>
<Label>
<Caption>
<Value>TEST</Value>
<Font>
<Alignment/>
</Font>
</Caption>
<Background xsi:type=\"attribute:ColorDefinition\">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>true</Visible>
</Label>
<LabelPosition>Left</LabelPosition>
<MajorGrid>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>196</Red>
<Green>196</Green>
<Blue>196</Blue>
</Color>
<Visible>false</Visible>
</LineAttributes>
<TickStyle>Right</TickStyle>
<TickAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>196</Red>
<Green>196</Green>
<Blue>196</Blue>
</Color>
<Visible>true</Visible>
</TickAttributes>
</MajorGrid>
<MinorGrid>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>225</Red>
<Green>225</Green>
<Blue>225</Blue>
</Color>
<Visible>false</Visible>
</LineAttributes>
<TickStyle>Across</TickStyle>
<TickAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>225</Red>
<Green>225</Green>
<Blue>225</Blue>
</Color>
<Visible>false</Visible>
</TickAttributes>
</MinorGrid>
<Scale>
<MinorGridsPerUnit>5</MinorGridsPerUnit>
</Scale>
<Origin>
<Type>Min</Type>
<Value xsi:type=\"data:NumberDataElement\">
<Value>0.0</Value>
</Value>
</Origin>
<PrimaryAxis>true</PrimaryAxis>
<Percent>false</Percent>
</AssociatedAxes>
<SeriesDefinitions>
<Query>
<Definition></Definition>
</Query>
<SeriesPalette>
<Entries xsi:type=\"attribute:ColorDefinition\">
<Transparency>255</Transparency>
<Red>127</Red>
<Green>127</Green>
<Blue>127</Blue>
</Entries>
</SeriesPalette>
<Series>
<Visible>true</Visible>
<Label>
<Caption>
<Value></Value>
<Font>
<Alignment/>
</Font>
</Caption>
<Background xsi:type=\"attribute:ColorDefinition\">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>false</Visible>
</Label>
<DataDefinition>
<Definition>row[&quot;CREATOR&quot;]</Definition>
</DataDefinition>
<SeriesIdentifier></SeriesIdentifier>
<DataPoint>
<Components>
<Type>Orthogonal_Value</Type>
</Components>
<Separator>, </Separator>
</DataPoint>
<LabelPosition>Outside</LabelPosition>
<Stacked>false</Stacked>
</Series>
<Grouping>
<Enabled>true</Enabled>
<GroupingInterval>1</GroupingInterval>
<GroupType>Text</GroupType>
<AggregateExpression>Sum</AggregateExpression>
</Grouping>
<Sorting>Ascending</Sorting>
</SeriesDefinitions>
<Orientation>Horizontal</Orientation>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>true</Visible>
</LineAttributes>
<Label>
<Caption>
<Value></Value>
<Font>
<Alignment/>
</Font>
</Caption>
<Background xsi:type=\"attribute:ColorDefinition\">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>true</Visible>
</Label>
<LabelPosition>Below</LabelPosition>
<MajorGrid>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>196</Red>
<Green>196</Green>
<Blue>196</Blue>
</Color>
<Visible>false</Visible>
</LineAttributes>
<TickStyle>Below</TickStyle>
<TickAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>196</Red>
<Green>196</Green>
<Blue>196</Blue>
</Color>
<Visible>true</Visible>
</TickAttributes>
</MajorGrid>
<MinorGrid>
<LineAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>225</Red>
<Green>225</Green>
<Blue>225</Blue>
</Color>
<Visible>false</Visible>
</LineAttributes>
<TickStyle>Across</TickStyle>
<TickAttributes>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>225</Red>
<Green>225</Green>
<Blue>225</Blue>
</Color>
<Visible>false</Visible>
</TickAttributes>
</MinorGrid>
<Scale>
<MinorGridsPerUnit>5</MinorGridsPerUnit>
</Scale>
<Origin>
<Type>Min</Type>
<Value xsi:type=\"data:NumberDataElement\">
<Value>0.0</Value>
</Value>
</Origin>
<PrimaryAxis>true</PrimaryAxis>
<Percent>false</Percent>
</Axes>
<Rotation/>
</model:ChartWithAxes>
]]></xml-property>
<property name=\"outputFormat\">GIF</property>
</extended-item>
</body>
</report>


/////////////////////////// .rptdesign using Birt 2.3 ////////////////

<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<report xmlns=\"http://www.eclipse.org/birt/2005/design\"
version=\"3.2.17\" id=\"1\">
<data-sources>
<oda-data-source
extensionID=\"org.eclipse.birt.report.data.oda.jdbc\" name=\"datasource\"
id=\"5\">
<property
name=\"odaDriverClass\">oracle.jdbc.driver.OracleDriver</property >
<property
name=\"odaURL\">jdbc:oracle:thin:@192.168.174.25:1521:BDEV </property>
<property name=\"odaUser\">mferdous</property>
<encrypted-property name=\"odaPassword\"
encryptionID=\"base64\">YW5hYmFzZQ==</encrypted-property>
</oda-data-source>
</data-sources>
<data-sets>
<oda-data-set
extensionID=\"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet\ "
name=\"maindataset\" id=\"6\">
<property name=\"dataSource\">datasource</property>
<property name=\"queryText\">SELECT SIMS.ROLES.\"CREATOR\",
SIMS.ROLES.\"RID\" FROM SIMS.ROLES </property>
</oda-data-set>
</data-sets>
<styles>
<style name=\"crosstab-cell\" id=\"2\">
<property name=\"borderBottomColor\">#CCCCCC</property>
<property name=\"borderBottomStyle\">solid</property>
<property name=\"borderBottomWidth\">1pt</property>
<property name=\"borderLeftColor\">#CCCCCC</property>
<property name=\"borderLeftStyle\">solid</property>
<property name=\"borderLeftWidth\">1pt</property>
<property name=\"borderRightColor\">#CCCCCC</property>
<property name=\"borderRightStyle\">solid</property>
<property name=\"borderRightWidth\">1pt</property>
<property name=\"borderTopColor\">#CCCCCC</property>
<property name=\"borderTopStyle\">solid</property>
<property name=\"borderTopWidth\">1pt</property>
</style>
<style name=\"crosstab\" id=\"3\">
<property name=\"borderBottomColor\">#CCCCCC</property>
<property name=\"borderBottomStyle\">solid</property>
<property name=\"borderBottomWidth\">1pt</property>
<property name=\"borderLeftColor\">#CCCCCC</property>
<property name=\"borderLeftStyle\">solid</property>
<property name=\"borderLeftWidth\">1pt</property>
<property name=\"borderRightColor\">#CCCCCC</property>
<property name=\"borderRightStyle\">solid</property>
<property name=\"borderRightWidth\">1pt</property>
<property name=\"borderTopColor\">#CCCCCC</property>
<property name=\"borderTopStyle\">solid</property>
<property name=\"borderTopWidth\">1pt</property>
</style>
</styles>
<page-setup>
<simple-master-page name=\"Master Page\" id=\"4\"/>
</page-setup>
<body>
<extended-item extensionName=\"Chart\" name=\"Simple Chart\"
id=\"7\">
<xml-property
name=\"xmlRepresentation\"><![CDATA[<model:ChartWithAxes
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
xmlns:attribute=\"http://www.birt.eclipse.org/ChartModelAttribute\"
xmlns:data=\"http://www.birt.eclipse.org/ChartModelData\"
xmlns:layout=\"http://www.birt.eclipse.org/ChartModelLayout\"
xmlns:model=\"http://www.birt.eclipse.org/ChartModel\"
xmlns:type=\"http://www.birt.eclipse.org/ChartModelType\">
<Type>Line Chart</Type>
<SubType>Overlay</SubType>
<Block>
<Children xsi:type=\"layout:TitleBlock\">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Visible>true</Visible>
<Label>
<Caption>
<Value>Overlay test Line Chart</Value>
<Font>
<Size>16.0</Size>
<Bold>true</Bold>
<Alignment>
<horizontalAlignment>Center</horizontalAlignment>
<verticalAlignment>Center</verticalAlignment>
</Alignment>
</Font>
</Caption>
<Background xsi:type=\"attribute:ColorDefinition\">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>true</Visible>
</Label>
</Children>
<Children xsi:type=\"layout:Plot\">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Visible>true</Visible>
<HorizontalSpacing>5</HorizontalSpacing>
<VerticalSpacing>5</VerticalSpacing>
<ClientArea>
<Background xsi:type=\"attribute:ColorDefinition\">
<Transparency>255</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>225</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>0</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>0.0</Left>
<Bottom>0.0</Bottom>
<Right>0.0</Right>
</Insets>
</ClientArea>
</Children>
<Children xsi:type=\"layout:Legend\">
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>0.0</Width>
<Height>0.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Visible>true</Visible>
<ClientArea>
<Outline>
<Style>Solid</Style>
<Thickness>0</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>2.0</Top>
<Left>2.0</Left>
<Bottom>2.0</Bottom>
<Right>2.0</Right>
</Insets>
</ClientArea>
<Text>
<Value></Value>
<Font>
<Alignment/>
</Font>
</Text>
<Orientation>Vertical</Orientation>
<Direction>Top_Bottom</Direction>
<Separator>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>true</Visible>
</Separator>
<Position>Right</Position>
<ItemType>Series</ItemType>
<Title>
<Caption>
<Value></Value>
<Font>
<Alignment/>
</Font>
</Caption>
<Background xsi:type=\"attribute:ColorDefinition\">
<Transparency>0</Transparency>
<Red>255</Red>
<Green>255</Green>
<Blue>255</Blue>
</Background>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible>
</Outline>
<Insets>
<Top>0.0</Top>
<Left>2.0</Left>
<Bottom>0.0</Bottom>
<Right>3.0</Right>
</Insets>
<Visible>false</Visible>
</Title>
<TitlePosition>Above</TitlePosition>
</Children>
<Bounds>
<Left>0.0</Left>
<Top>0.0</Top>
<Width>600.0</Width>
<Height>400.0</Height>
</Bounds>
<Insets>
<Top>3.0</Top>
<Left>3.0</Left>
<Bottom>3.0</Bottom>
<Right>3.0</Right>
</Insets>
<Row>-1</Row>
<Column>-1</Column>
<Rowspan>-1</Rowspan>
<Columnspan>-1</Columnspan>
<Outline>
<Style>Solid</Style>
<Thickness>1</Thickness>
<Color>
<Transparency>255</Transparency>
<Red>0</Red>
<Green>0</Green>
<Blue>0</Blue>
</Color>
<Visible>false</Visible><
Re: Chart Grouping problem BIRT 2.3 [message #368843 is a reply to message #368840] Tue, 30 June 2009 18:04 Go to previous message
Eclipse UserFriend
Originally posted by: jasonweathersby.windstream.net

Mehrab,

This does indeed look like a bug. I checked 2.5 as well.

I was able to get it to work by saving the report and reopening the
design, and drop the sum column. Modified code is attached. Obviously
this is not ideal. Can you open a bug for this?

Jason

import java.io.IOException;
import java.util.Iterator;

import org.eclipse.birt.chart.model.Chart;
import org.eclipse.birt.chart.model.ChartWithAxes;
import org.eclipse.birt.chart.model.attribute.AxisType;
import org.eclipse.birt.chart.model.attribute.DataType;
import org.eclipse.birt.chart.model.attribute.GroupingUnitType;
import org.eclipse.birt.chart.model.attribute.IntersectionType;
import org.eclipse.birt.chart.model.attribute.SortOption;
import org.eclipse.birt.chart.model.attribute.TickStyle;
import org.eclipse.birt.chart.model.attribute.impl.ColorDefinitionI mpl;
import org.eclipse.birt.chart.model.component.Axis;
import org.eclipse.birt.chart.model.component.Series;
import org.eclipse.birt.chart.model.component.impl.SeriesImpl;
import org.eclipse.birt.chart.model.data.Query;
import org.eclipse.birt.chart.model.data.SeriesDefinition;
import org.eclipse.birt.chart.model.data.SeriesGrouping;
import org.eclipse.birt.chart.model.data.impl.QueryImpl;
import org.eclipse.birt.chart.model.data.impl.SeriesDefinitionImpl;
import org.eclipse.birt.chart.model.impl.ChartWithAxesImpl;
import org.eclipse.birt.chart.model.layout.Plot;
import org.eclipse.birt.chart.model.type.LineSeries;
import org.eclipse.birt.chart.model.type.impl.LineSeriesImpl;
import org.eclipse.birt.core.framework.Platform;
import org.eclipse.birt.core.script.ScriptExpression;
import org.eclipse.birt.data.engine.api.querydefn.ComputedColumn;
import org.eclipse.birt.report.model.api.ComputedColumnHandle;
import org.eclipse.birt.report.model.api.DataSetHandle;
import org.eclipse.birt.report.model.api.DesignConfig;
import org.eclipse.birt.report.model.api.DesignFileException;
import org.eclipse.birt.report.model.api.ElementFactory;
import org.eclipse.birt.report.model.api.ExtendedItemHandle;
import org.eclipse.birt.report.model.api.IDesignEngine;
import org.eclipse.birt.report.model.api.IDesignEngineFactory;
import org.eclipse.birt.report.model.api.OdaDataSetHandle;
import org.eclipse.birt.report.model.api.OdaDataSourceHandle;
import org.eclipse.birt.report.model.api.PropertyHandle;
import org.eclipse.birt.report.model.api.ReportDesignHandle;
import org.eclipse.birt.report.model.api.ScriptDataSetHandle;
import org.eclipse.birt.report.model.api.SessionHandle;
import org.eclipse.birt.report.model.api.SimpleMasterPageHandle;
import org.eclipse.birt.report.model.api.StructureFactory;
import org.eclipse.birt.report.model.api.activity.SemanticException ;
import org.eclipse.birt.report.model.api.command.ContentException;
import org.eclipse.birt.report.model.api.command.NameException;
import
org.eclipse.birt.report.model.api.elements.structures.Proper tyBinding;

import com.ibm.icu.util.ULocale;


public class SimpleChart

{

private ReportDesignHandle reportDesignHandle = null;

private ElementFactory elementFactory = null;

private OdaDataSourceHandle odaDataSourceHandle = null;

private String dataSourceName = "datasource";

private String dataSetName = "maindataset";
private SessionHandle sessionHandle =null;

private String query = "SELECT SIMS.ROLES.\"CREATOR\",
SIMS.ROLES.\"RID\" FROM SIMS.ROLES";
org.eclipse.birt.report.model.api.elements.structures.Comput edColumn
cs1, cs2 = null;

public static void main(String args[])

{
try {

new SimpleChart().createReport();

} catch (Exception e) {

e.printStackTrace();

}

}


public void createReport() throws SemanticException, IOException

{
System.out.println("Start");
init();

createMasterPages();

//createDataSources();

//createDataSets();

buildDataSource();
buildDataSet();

createBody();

String outputPath = "C:/work";
reportDesignHandle.saveAs("output/desample/simplechart.rptdesign ");
try
{
reportDesignHandle = sessionHandle.openDesign(
"output/desample/simplechart.rptdesign" );//$NON-NLS-1$
}
catch ( DesignFileException e )
{
// TODO Auto-generated catch block
e.printStackTrace( );
}
ExtendedItemHandle eih = (ExtendedItemHandle)
reportDesignHandle.getBody( )
.getContents( ).get( 0 );
for ( Iterator iter = eih.getColumnBindings( )
.iterator( ); iter.hasNext( ); )
{
ComputedColumnHandle cch = (ComputedColumnHandle) iter.next( );
if( cch.getExpression().contains("_Sum") ){
cch.drop();
}else{
System.out.println("opened report "+cch.getExpression());
}
}

reportDesignHandle.save();

System.out.println("End");

}


private void init(){


DesignConfig config = new DesignConfig( );

config.setBIRTHome("C:/birt/birt-runtime-2_3_1/birt-runtime-2_3_1/ReportEngine ");
IDesignEngine engine = null;

try {

Platform.startup(config);

IDesignEngineFactory factory = (IDesignEngineFactory) Platform


..createFactoryObject(IDesignEngineFactory.EXTENSION_DESIGN_ ENGINE_FACTORY);

engine = factory.createDesignEngine(config);

} catch (Exception ex) {

ex.printStackTrace();

}


// we need a handle of session of design engine

sessionHandle = engine.newSessionHandle(ULocale.ENGLISH);

reportDesignHandle = sessionHandle.createDesign();

elementFactory = reportDesignHandle.getElementFactory();

}


private void createMasterPages() throws ContentException, NameException

{

SimpleMasterPageHandle simpleMasterPage =
elementFactory.newSimpleMasterPage("Master Page");

reportDesignHandle.getMasterPages().add(simpleMasterPage);

}

void buildDataSource( ) throws SemanticException
{

OdaDataSourceHandle dsHandle = elementFactory.newOdaDataSource(
"Data Source", "org.eclipse.birt.report.data.oda.jdbc" );
dsHandle.setProperty( "odaDriverClass",
"org.eclipse.birt.report.data.oda.sampledb.Driver" );
dsHandle.setProperty( "odaURL", "jdbc:classicmodels:sampledb" );
dsHandle.setProperty( "odaUser", "ClassicModels" );
dsHandle.setProperty( "odaPassword", "" );

PropertyBinding pb = new PropertyBinding();

reportDesignHandle.getDataSources( ).add( dsHandle );

}

void buildDataSet( ) throws SemanticException
{

OdaDataSetHandle dsHandle = elementFactory.newOdaDataSet( dataSetName,
"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet" );
dsHandle.setDataSource( "Data Source" );
String qry = "Select PRODUCTCODE, QUANTITYORDERED from orderdetails
where ordernumber = 10104";

dsHandle.setQueryText( qry );
reportDesignHandle.getDataSets( ).add( dsHandle );




}
private void createDataSets() throws SemanticException

{

String dataSetType =
"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet";

OdaDataSetHandle dataSetHandle = null;

dataSetHandle = elementFactory.newOdaDataSet(dataSetName,
dataSetType);

dataSetHandle.setDataSource(dataSourceName);

dataSetHandle.setQueryText(query);

reportDesignHandle.getDataSets().add(dataSetHandle);

}


private void createDataSources() throws SemanticException

{

// type of the data source

String extensionID = "org.eclipse.birt.report.data.oda.jdbc";

String driverClassName = "oracle.jdbc.driver.OracleDriver";

String driverURL = "jdbc:oracle:thin:@192.168.174.25:1521:BDEV";

String userName = "mferdous";

String userPassword = "anabase";


// now make a data source with the dataSourceName and extensionID.

odaDataSourceHandle =
elementFactory.newOdaDataSource(dataSourceName,
extensionID);

odaDataSourceHandle.setProperty("odaDriverClass", driverClassName);

odaDataSourceHandle.setProperty("odaURL", driverURL);

odaDataSourceHandle.setProperty("odaUser", userName);

odaDataSourceHandle.setProperty("odaPassword", userPassword);

reportDesignHandle.getDataSources().add(odaDataSourceHandle) ;

}


private void createBody() throws SemanticException

{
ExtendedItemHandle extendedItemHandle =
elementFactory.newExtendedItem("Simple Chart", "Chart");
extendedItemHandle.setWidth("700px");
extendedItemHandle.setHeight("500px");

extendedItemHandle.setProperty(ExtendedItemHandle.DATA_SET_P ROP,
dataSetName);
extendedItemHandle.setProperty("outputFormat","GIF");



Chart c = createChart();

extendedItemHandle.getReportItem().setProperty(
"chart.instance", c );

reportDesignHandle.getBody().add(extendedItemHandle);


//PropertyHandle computedSet = extendedItemHandle.getColumnBindings( );
//computedSet.clearValue();

cs1 = StructureFactory.createComputedColumn( );
cs1.setName( "PRODUCTCODE" );
cs1.setExpression( "dataSetRow[\"PRODUCTCODE\"]");
cs1.setDataType( "string" );
cs1.setAggregateOn(null);


cs2 = StructureFactory.createComputedColumn( );
cs2.setName( "QUANTITYORDERED" );
cs2.setExpression( "dataSetRow[\"QUANTITYORDERED\"]");
cs2.setDataType( "integer" );

extendedItemHandle.addColumnBinding(cs1, true);
extendedItemHandle.addColumnBinding(cs2, true);


}

private Chart createChart() {

ChartWithAxes cwaLine = ChartWithAxesImpl.create();
cwaLine.setType( "Line Chart" ); //$NON-NLS-1$
cwaLine.setSubType( "Overlay" ); //$NON-NLS-1$
cwaLine.getBlock().getBounds().setWidth(600);
cwaLine.getBlock().getBounds().setHeight(400);

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

// Title
cwaLine.getTitle().getLabel().getCaption().setValue("Overlay
test Line Chart" );
cwaLine.getTitle().setVisible(true);

// Legend
cwaLine.getLegend().setVisible( true );


// X-Axis
Axis xAxisPrimary = cwaLine.getPrimaryBaseAxes()[0];
xAxisPrimary.setType( AxisType.TEXT_LITERAL );
//xAxisPrimary.getMajorGrid().setTickStyle(
TickStyle.BELOW_LITERAL );
//xAxisPrimary.getOrigin().setType( IntersectionType.MIN_LITERAL );

// Y-Axis
Axis yAxisPrimary = cwaLine.getPrimaryOrthogonalAxis(
xAxisPrimary );
yAxisPrimary.setType(AxisType.LINEAR_LITERAL);
//yAxisPrimary.getMajorGrid().setTickStyle(
TickStyle.RIGHT_LITERAL );
//yAxisPrimary.getLabel().getCaption().setValue("TEST");
yAxisPrimary.getLabel().setVisible(true);

// X-Series



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

// Set category expression.
seCategory.getDataDefinition( )
.add( QueryImpl.create( "row[\"PRODUCTCODE\"]" ) );

SeriesDefinition sdX = SeriesDefinitionImpl.create( );
sdX.getSeriesPalette( ).shift( 0 );
sdX.setSorting(SortOption.ASCENDING_LITERAL);
// Set default grouping.
SeriesGrouping grouping = sdX.getGrouping( );
grouping.getAggregateExpression();
grouping.setEnabled( true );
grouping.setGroupType( DataType.TEXT_LITERAL );
grouping.setGroupingUnit( GroupingUnitType.STRING_PREFIX_LITERAL );
grouping.setGroupingInterval( 1 );
grouping.setAggregateExpression( "Sum" ); // Set Count aggregation.
//$NON-NLS-1$

xAxisPrimary.getSeriesDefinitions( ).add( sdX );
sdX.getSeries( ).add( seCategory );

// Y-Series
LineSeries bs1 = (LineSeries) LineSeriesImpl.create( );

bs1.getDataDefinition( ).add( QueryImpl.create(
"row[\"QUANTITYORDERED\"]" ) );
bs1.getLabel( ).setVisible( true );


SeriesDefinition sdY = SeriesDefinitionImpl.create( );
sdY.getGrouping().setEnabled(false);
yAxisPrimary.getSeriesDefinitions( ).add( sdY );

sdY.getSeries( ).add( bs1 );


return cwaLine;
}
}

Mehrab wrote:
> Jason,
>
> My simple chart program that creates the report .rptdesign file. If I
> use BIRT 2.1 to run the program then its create and run report properly.
> But if I use BIRT 2.3 then its throw exception on report runtime. If I
> create report without x-axis grouping then the report run properly.
> Please help me. I think its a bug.
> Thank you.
>
> Mehrab
>
> Take a look at this source code:
>
> package com.birt.test;
>
> import java.io.IOException;
>
> import org.eclipse.birt.chart.model.Chart;
> import org.eclipse.birt.chart.model.ChartWithAxes;
> import org.eclipse.birt.chart.model.attribute.AxisType;
> import org.eclipse.birt.chart.model.attribute.DataType;
> import org.eclipse.birt.chart.model.attribute.IntersectionType;
> import org.eclipse.birt.chart.model.attribute.SortOption;
> import org.eclipse.birt.chart.model.attribute.TickStyle;
> import org.eclipse.birt.chart.model.attribute.impl.ColorDefinitionI mpl;
> import org.eclipse.birt.chart.model.component.Axis;
> import org.eclipse.birt.chart.model.component.Series;
> import org.eclipse.birt.chart.model.component.impl.SeriesImpl;
> import org.eclipse.birt.chart.model.data.Query;
> import org.eclipse.birt.chart.model.data.SeriesDefinition;
> import org.eclipse.birt.chart.model.data.impl.QueryImpl;
> import org.eclipse.birt.chart.model.data.impl.SeriesDefinitionImpl;
> import org.eclipse.birt.chart.model.impl.ChartWithAxesImpl;
> import org.eclipse.birt.chart.model.layout.Plot;
> import org.eclipse.birt.chart.model.type.LineSeries;
> import org.eclipse.birt.chart.model.type.impl.LineSeriesImpl;
> import org.eclipse.birt.core.framework.Platform;
> import org.eclipse.birt.report.model.api.DesignConfig;
> import org.eclipse.birt.report.model.api.ElementFactory;
> import org.eclipse.birt.report.model.api.ExtendedItemHandle;
> import org.eclipse.birt.report.model.api.IDesignEngine;
> import org.eclipse.birt.report.model.api.IDesignEngineFactory;
> import org.eclipse.birt.report.model.api.OdaDataSetHandle;
> import org.eclipse.birt.report.model.api.OdaDataSourceHandle;
> import org.eclipse.birt.report.model.api.ReportDesignHandle;
> import org.eclipse.birt.report.model.api.SessionHandle;
> import org.eclipse.birt.report.model.api.SimpleMasterPageHandle;
> import org.eclipse.birt.report.model.api.activity.SemanticException ;
> import org.eclipse.birt.report.model.api.command.ContentException;
> import org.eclipse.birt.report.model.api.command.NameException;
>
> import com.ibm.icu.util.ULocale;
>
>
> public class SimpleChart
>
> {
>
> private ReportDesignHandle reportDesignHandle = null;
>
> private ElementFactory elementFactory = null;
>
> private OdaDataSourceHandle odaDataSourceHandle = null;
>
> private String dataSourceName = \"datasource\";
>
> private String dataSetName = \"maindataset\";
>
> private String query = \"SELECT SIMS.ROLES.\\\"CREATOR\\\",
> SIMS.ROLES.\\\"RID\\\" FROM SIMS.ROLES \";
>
> public static void main(String args[])
>
> {
> try {
>
> new SimpleChart().createReport();
>
> } catch (Exception e) {
>
> e.printStackTrace();
>
> }
>
> }
>
>
> public void createReport() throws SemanticException, IOException
>
> {
> System.out.println(\"Start\");
> init();
>
> createMasterPages();
>
> createDataSources();
>
> createDataSets();
>
> createBody();
>
> String outputPath = \"C:/work\";
>
> reportDesignHandle.saveAs(outputPath + \"/\" +
> \"SimpleChart2_1.rptdesign\");//$NON-NLS-1$//$NON-NLS-2$
>
> System.out.println(\"End\");
>
> }
>
>
> private void init(){
>
>
> DesignConfig config = new DesignConfig();
>
> config.setProperty(\"BIRT_HOME\",
>
> \" C:/Users/Mehrabul/Documents/Projects/AnabaseWorkSpace270509t est/art/war/WEB-INF/platform\ ");
>
>
> IDesignEngine engine = null;
>
> try {
>
> Platform.startup(config);
>
> IDesignEngineFactory factory = (IDesignEngineFactory) Platform
>
>
> .createFactoryObject(IDesignEngineFactory.EXTENSION_DESIGN_E NGINE_FACTORY);
>
> engine = factory.createDesignEngine(config);
>
> } catch (Exception ex) {
>
> ex.printStackTrace();
>
> }
>
>
> // we need a handle of session of design engine
>
> SessionHandle sessionHandle =
> engine.newSessionHandle(ULocale.ENGLISH);
>
> reportDesignHandle = sessionHandle.createDesign();
>
> elementFactory = reportDesignHandle.getElementFactory();
>
> }
>
>
> private void createMasterPages() throws ContentException, NameException
>
> {
>
> SimpleMasterPageHandle simpleMasterPage =
> elementFactory.newSimpleMasterPage(\"Master Page\");
>
> reportDesignHandle.getMasterPages().add(simpleMasterPage);
>
> }
>
>
> private void createDataSets() throws SemanticException
>
> {
>
> String dataSetType =
> \"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet\";
>
> OdaDataSetHandle dataSetHandle = null;
>
> dataSetHandle = elementFactory.newOdaDataSet(dataSetName,
> dataSetType);
>
> dataSetHandle.setDataSource(dataSourceName);
>
> dataSetHandle.setQueryText(query);
>
> reportDesignHandle.getDataSets().add(dataSetHandle);
>
> }
>
>
> private void createDataSources() throws SemanticException
>
> {
>
> // type of the data source
>
> String extensionID = \"org.eclipse.birt.report.data.oda.jdbc\";
>
> String driverClassName = \"oracle.jdbc.driver.OracleDriver\";
>
> String driverURL = \"jdbc:oracle:thin:@192.168.174.25:1521:BDEV\";
>
> String userName = \"mferdous\";
>
> String userPassword = \"anabase\";
>
>
> // now make a data source with the dataSourceName and extensionID.
>
> odaDataSourceHandle =
> elementFactory.newOdaDataSource(dataSourceName,
> extensionID);
>
> odaDataSourceHandle.setProperty(\"odaDriverClass\",
> driverClassName);
>
> odaDataSourceHandle.setProperty(\"odaURL\", driverURL);
>
> odaDataSourceHandle.setProperty(\"odaUser\", userName);
>
> odaDataSourceHandle.setProperty(\"odaPassword\", userPassword);
>
> reportDesignHandle.getDataSources().add(odaDataSourceHandle) ;
>
> }
>
>
> private void createBody() throws SemanticException
>
> {
> ExtendedItemHandle extendedItemHandle =
> elementFactory.newExtendedItem(\"Simple Chart\", \"Chart\");
> extendedItemHandle.setWidth(\"700px\");
> extendedItemHandle.setHeight(\"500px\");
> extendedItemHandle.setProperty(ExtendedItemHandle.DATA_SET_P ROP,
> dataSetName);
> extendedItemHandle.setProperty(\"outputFormat\",\"GIF\");
>
> Chart c = createChart();
>
> extendedItemHandle.getReportItem().setProperty(
> \"chart.instance\", c );
>
> reportDesignHandle.getBody().add(extendedItemHandle);
>
> }
>
> private Chart createChart() {
>
> ChartWithAxes cwaLine = ChartWithAxesImpl.create();
> cwaLine.setType( \"Line Chart\" ); //$NON-NLS-1$
> cwaLine.setSubType( \"Overlay\" ); //$NON-NLS-1$
> cwaLine.getBlock().getBounds().setWidth(600);
> cwaLine.getBlock().getBounds().setHeight(400);
>
> // Plot
> cwaLine.getBlock().setBackground( ColorDefinitionImpl.WHITE() );
> Plot p = cwaLine.getPlot();
> p.getClientArea().setBackground( ColorDefinitionImpl.create(
> 255, 255,
> 225 ) );
>
> // Title
> cwaLine.getTitle().getLabel().getCaption().setValue( \"Overlay
> test Line Chart\" );//$NON-NLS-1$
> cwaLine.getTitle().setVisible(true);
>
> // Legend
> cwaLine.getLegend().setVisible( true );
>
>
> // X-Axis
> Axis xAxisPrimary = cwaLine.getPrimaryBaseAxes()[0];
> xAxisPrimary.setType( AxisType.TEXT_LITERAL );
> xAxisPrimary.getMajorGrid().setTickStyle(
> TickStyle.BELOW_LITERAL );
> xAxisPrimary.getOrigin().setType( IntersectionType.MIN_LITERAL );
>
> // Y-Axis
> Axis yAxisPrimary = cwaLine.getPrimaryOrthogonalAxis(
> xAxisPrimary );
> yAxisPrimary.setType(AxisType.LINEAR_LITERAL);
> yAxisPrimary.getMajorGrid().setTickStyle(
> TickStyle.RIGHT_LITERAL );
> yAxisPrimary.getLabel().getCaption().setValue(\"TEST\");
> yAxisPrimary.getLabel().setVisible(true);
>
> // X-Series
> Series seCategory = SeriesImpl.create();
> SeriesDefinition sdX = SeriesDefinitionImpl.create();
>
>
> xAxisPrimary.getSeriesDefinitions().clear();
> xAxisPrimary.getSeriesDefinitions().add( sdX );
> sdX.getSeries().add( seCategory );
> Query query1 = QueryImpl.create( \"row[\\\"CREATOR\\\"]\" );
> seCategory.getDataDefinition().clear();
> seCategory.getDataDefinition().add( query1 );
>
> // X Axis Grouping
> sdX.getGrouping().setEnabled(true);
>
> sdX.setSorting(SortOption.ASCENDING_LITERAL);
>
> sdX.getGrouping().setGroupingInterval(1);
>
> sdX.getGrouping().setGroupType(DataType.TEXT_LITERAL);
>
> sdX.getGrouping().setAggregateExpression(\"Sum\");
>
> // Y-Sereis
> SeriesDefinition sdY = SeriesDefinitionImpl.create();
> sdY.getSeriesPalette().update( -2 );
> yAxisPrimary.getSeriesDefinitions().clear();
>
> LineSeries ls1 = (LineSeries) LineSeriesImpl.create();
> ls1.setSeriesIdentifier(\"testls\");
>
> ls1.setVisible(true);
>
> ls1.getLabel().setVisible( true );
>
> Query query2 = QueryImpl.create( \"row[\\\"RID\\\"]\"
> );//$NON-NLS-1$
> yAxisPrimary.getSeriesDefinitions().add( sdY );
> sdY.getSeries().add( ls1 );
>
>
> ls1.getDataDefinition().clear();
> ls1.getDataDefinition().add( query2 );
>
> return cwaLine;
> }
> }
>
> //////////////// .rptdesign using BIRT 2.1 ////////////////////////////
>
> <?xml version=\"1.0\" encoding=\"UTF-8\"?>
> <!-- Written by Eclipse BIRT 2.0 -->
> <report xmlns=\"http://www.eclipse.org/birt/2005/design\"
> version=\"3.2.2\" id=\"1\">
> <data-sources>
> <oda-data-source
> extensionID=\"org.eclipse.birt.report.data.oda.jdbc\"
> name=\"datasource\" id=\"3\">
> <property
> name=\"odaDriverClass\">oracle.jdbc.driver.OracleDriver</property >
> <property
> name=\"odaURL\">jdbc:oracle:thin:@192.168.174.25:1521:BDEV </property>
> <property name=\"odaUser\">mferdous</property>
> <encrypted-property
> name=\"odaPassword\">YW5hYmFzZQ==</encrypted-property>
> </oda-data-source>
> </data-sources>
> <data-sets>
> <oda-data-set
> extensionID=\"org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet\ "
> name=\"maindataset\" id=\"4\">
> <property name=\"dataSource\">datasource</property>
> <property name=\"queryText\">SELECT SIMS.ROLES.\"CREATOR\",
> SIMS.ROLES.\"RID\" FROM SIMS.ROLES </property>
> </oda-data-set>
> </data-sets>
> <page-setup>
> <simple-master-page name=\"Master Page\" id=\"2\"/>
> </page-setup>
> <body>
> <extended-item extensionName=\"Chart\" name=\"Simple Chart\"
> id=\"5\">
> <property name=\"height\">500px</property>
> <property name=\"width\">700px</property>
> <property name=\"dataSet\">maindataset</property>
> <list-property name=\"boundDataColumns\">
> <structure>
> <property name=\"name\">CREATOR</property>
> <expression
> name=\"expression\">dataSetRow[\"CREATOR\"]</expression >
> </structure>
> <structure>
> <property name=\"name\">RID</property>
> <expression
> name=\"expression\">dataSetRow[\"RID\"]</expression>
> </structure>
> </list-property>
> <xml-property
> name=\"xmlRepresentation\"><![CDATA[<model:ChartWithAxes
> xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
> xmlns:attribute=\"http://www.birt.eclipse.org/ChartModelAttribute\"
> xmlns:data=\"http://www.birt.eclipse.org/ChartModelData\"
> xmlns:layout=\"http://www.birt.eclipse.org/ChartModelLayout\"
> xmlns:model=\"http://www.birt.eclipse.org/ChartModel\"
> xmlns:type=\"http://www.birt.eclipse.org/ChartModelType\">
> <Type>Line Chart</Type>
> <SubType>Overlay</SubType>
> <Block>
> <Children xsi:type=\"layout:TitleBlock\">
> <Bounds>
> <Left>0.0</Left>
> <Top>0.0</Top>
> <Width>0.0</Width>
> <Height>0.0</Height>
> </Bounds>
> <Insets>
> <Top>3.0</Top>
> <Left>3.0</Left>
> <Bottom>3.0</Bottom>
> <Right>3.0</Right>
> </Insets>
> <Row>-1</Row>
> <Column>-1</Column>
> <Rowspan>-1</Rowspan>
> <Columnspan>-1</Columnspan>
> <Outline>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> <Visible>false</Visible>
> </Outline>
> <Visible>true</Visible>
> <Label>
> <Caption>
> <Value>Overlay test Line Chart</Value>
> <Font>
> <Size>16.0</Size>
> <Bold>true</Bold>
> <Alignment>
> <horizontalAlignment>Center</horizontalAlignment>
> <verticalAlignment>Center</verticalAlignment>
> </Alignment>
> </Font>
> </Caption>
> <Background xsi:type=\"attribute:ColorDefinition\">
> <Transparency>0</Transparency>
> <Red>255</Red>
> <Green>255</Green>
> <Blue>255</Blue>
> </Background>
> <Outline>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> </Outline>
> <Insets>
> <Top>0.0</Top>
> <Left>2.0</Left>
> <Bottom>0.0</Bottom>
> <Right>3.0</Right>
> </Insets>
> <Visible>true</Visible>
> </Label>
> </Children>
> <Children xsi:type=\"layout:Plot\">
> <Bounds>
> <Left>0.0</Left>
> <Top>0.0</Top>
> <Width>0.0</Width>
> <Height>0.0</Height>
> </Bounds>
> <Insets>
> <Top>3.0</Top>
> <Left>3.0</Left>
> <Bottom>3.0</Bottom>
> <Right>3.0</Right>
> </Insets>
> <Row>-1</Row>
> <Column>-1</Column>
> <Rowspan>-1</Rowspan>
> <Columnspan>-1</Columnspan>
> <Outline>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> <Visible>false</Visible>
> </Outline>
> <Visible>true</Visible>
> <HorizontalSpacing>5</HorizontalSpacing>
> <VerticalSpacing>5</VerticalSpacing>
> <ClientArea>
> <Background xsi:type=\"attribute:ColorDefinition\">
> <Transparency>255</Transparency>
> <Red>255</Red>
> <Green>255</Green>
> <Blue>225</Blue>
> </Background>
> <Outline>
> <Style>Solid</Style>
> <Thickness>0</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> <Visible>false</Visible>
> </Outline>
> <Insets>
> <Top>0.0</Top>
> <Left>0.0</Left>
> <Bottom>0.0</Bottom>
> <Right>0.0</Right>
> </Insets>
> </ClientArea>
> </Children>
> <Children xsi:type=\"layout:Legend\">
> <Bounds>
> <Left>0.0</Left>
> <Top>0.0</Top>
> <Width>0.0</Width>
> <Height>0.0</Height>
> </Bounds>
> <Insets>
> <Top>3.0</Top>
> <Left>3.0</Left>
> <Bottom>3.0</Bottom>
> <Right>3.0</Right>
> </Insets>
> <Row>-1</Row>
> <Column>-1</Column>
> <Rowspan>-1</Rowspan>
> <Columnspan>-1</Columnspan>
> <Outline>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> <Visible>false</Visible>
> </Outline>
> <Visible>true</Visible>
> <ClientArea>
> <Outline>
> <Style>Solid</Style>
> <Thickness>0</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> <Visible>false</Visible>
> </Outline>
> <Insets>
> <Top>2.0</Top>
> <Left>2.0</Left>
> <Bottom>2.0</Bottom>
> <Right>2.0</Right>
> </Insets>
> </ClientArea>
> <Text>
> <Value></Value>
> <Font>
> <Alignment/>
> </Font>
> </Text>
> <Orientation>Vertical</Orientation>
> <Direction>Top_Bottom</Direction>
> <Separator>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> <Visible>true</Visible>
> </Separator>
> <Position>Right</Position>
> <ItemType>Series</ItemType>
> <Title>
> <Caption>
> <Value></Value>
> <Font>
> <Alignment/>
> </Font>
> </Caption>
> <Background xsi:type=\"attribute:ColorDefinition\">
> <Transparency>0</Transparency>
> <Red>255</Red>
> <Green>255</Green>
> <Blue>255</Blue>
> </Background>
> <Outline>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> <Visible>false</Visible>
> </Outline>
> <Insets>
> <Top>0.0</Top>
> <Left>2.0</Left>
> <Bottom>0.0</Bottom>
> <Right>3.0</Right>
> </Insets>
> <Visible>false</Visible>
> </Title>
> <TitlePosition>Above</TitlePosition>
> </Children>
> <Bounds>
> <Left>0.0</Left>
> <Top>0.0</Top>
> <Width>600.0</Width>
> <Height>400.0</Height>
> </Bounds>
> <Insets>
> <Top>3.0</Top>
> <Left>3.0</Left>
> <Bottom>3.0</Bottom>
> <Right>3.0</Right>
> </Insets>
> <Row>-1</Row>
> <Column>-1</Column>
> <Rowspan>-1</Rowspan>
> <Columnspan>-1</Columnspan>
> <Outline>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> <Visible>false</Visible>
> </Outline>
> <Background xsi:type=\"attribute:ColorDefinition\">
> <Transparency>255</Transparency>
> <Red>255</Red>
> <Green>255</Green>
> <Blue>255</Blue>
> </Background>
> <Visible>true</Visible>
> </Block>
> <Dimension>Two_Dimensional</Dimension>
> <SeriesThickness>10.0</SeriesThickness>
> <Interactivity/>
> <Axes>
> <Type>Text</Type>
> <Title>
> <Caption>
> <Value>X-Axis Title</Value>
> <Font>
> <Size>14.0</Size>
> <Bold>true</Bold>
> <Alignment>
> <horizontalAlignment>Center</horizontalAlignment>
> <verticalAlignment>Center</verticalAlignment>
> </Alignment>
> </Font>
> </Caption>
> <Background xsi:type=\"attribute:ColorDefinition\">
> <Transparency>0</Transparency>
> <Red>255</Red>
> <Green>255</Green>
> <Blue>255</Blue>
> </Background>
> <Outline>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> </Outline>
> <Insets>
> <Top>0.0</Top>
> <Left>2.0</Left>
> <Bottom>0.0</Bottom>
> <Right>3.0</Right>
> </Insets>
> <Visible>false</Visible>
> </Title>
> <TitlePosition>Below</TitlePosition>
> <AssociatedAxes>
> <Type>Linear</Type>
> <Title>
> <Caption>
> <Value>Y-Axis Title</Value>
> <Font>
> <Size>14.0</Size>
> <Bold>true</Bold>
> <Alignment>
> <horizontalAlignment>Center</horizontalAlignment>
> <verticalAlignment>Center</verticalAlignment>
> </Alignment>
> <Rotation>90.0</Rotation>
> </Font>
> </Caption>
> <Background xsi:type=\"attribute:ColorDefinition\">
> <Transparency>0</Transparency>
> <Red>255</Red>
> <Green>255</Green>
> <Blue>255</Blue>
> </Background>
> <Outline>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> </Outline>
> <Insets>
> <Top>0.0</Top>
> <Left>2.0</Left>
> <Bottom>0.0</Bottom>
> <Right>3.0</Right>
> </Insets>
> <Visible>false</Visible>
> </Title>
> <TitlePosition>Left</TitlePosition>
> <SeriesDefinitions>
> <Query>
> <Definition></Definition>
> </Query>
> <SeriesPalette>
> <Entries xsi:type=\"attribute:ColorDefinition\">
> <Transparency>255</Transparency>
> <Red>232</Red>
> <Green>172</Green>
> <Blue>57</Blue>
> </Entries>
> <Entries xsi:type=\"attribute:ColorDefinition\">
> <Transparency>255</Transparency>
> <Red>128</Red>
> <Green>255</Green>
> <Blue>128</Blue>
> </Entries>
> <Entries xsi:type=\"attribute:ColorDefinition\">
> <Transparency>255</Transparency>
> <Red>64</Red>
> <Green>128</Green>
> <Blue>128</Blue>
> </Entries>
> <Entries xsi:type=\"attribute:ColorDefinition\">
> <Transparency>255</Transparency>
> <Red>128</Red>
> <Green>128</Green>
> <Blue>192</Blue>
> </Entries>
> <Entries xsi:type=\"attribute:ColorDefinition\">
> <Transparency>255</Transparency>
> <Red>170</Red>
> <Green>85</Green>
> <Blue>85</Blue>
> </Entries>
> <Entries xsi:type=\"attribute:ColorDefinition\">
> <Transparency>255</Transparency>
> <Red>128</Red>
> <Green>128</Green>
> <Blue>0</Blue>
> </Entries>
> <Entries xsi:type=\"attribute:ColorDefinition\">
> <Transparency>255</Transparency>
> <Red>80</Red>
> <Green>166</Green>
> <Blue>218</Blue>
> </Entries>
> <Entries xsi:type=\"attribute:ColorDefinition\">
> <Transparency>255</Transparency>
> <Red>242</Red>
> <Green>88</Green>
> <Blue>106</Blue>
> </Entries>
> </SeriesPalette>
> <Series xsi:type=\"type:LineSeries\">
> <Visible>true</Visible>
> <Label>
> <Caption>
> <Value></Value>
> <Font>
> <Alignment/>
> </Font>
> </Caption>
> <Background xsi:type=\"attribute:ColorDefinition\">
> <Transparency>0</Transparency>
> <Red>255</Red>
> <Green>255</Green>
> <Blue>255</Blue>
> </Background>
> <Outline>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> <Visible>false</Visible>
> </Outline>
> <Insets>
> <Top>0.0</Top>
> <Left>2.0</Left>
> <Bottom>0.0</Bottom>
> <Right>3.0</Right>
> </Insets>
> <Visible>true</Visible>
> </Label>
> <DataDefinition>
> <Definition>row[&quot;RID&quot;]</Definition>
> </DataDefinition>
> <SeriesIdentifier>testls</SeriesIdentifier>
> <DataPoint>
> <Components>
> <Type>Orthogonal_Value</Type>
> </Components>
> <Separator>, </Separator>
> </DataPoint>
> <LabelPosition>Above</LabelPosition>
> <Stacked>false</Stacked>
> <Markers>
> <Type>Box</Type>
> <Size>4</Size>
> <Visible>true</Visible>
> </Markers>
> <LineAttributes>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> <Visible>true</Visible>
> </LineAttributes>
> </Series>
> <Grouping>
> <Enabled>false</Enabled>
> <GroupingInterval>2</GroupingInterval>
> <GroupType>Text</GroupType>
> <AggregateExpression>Sum</AggregateExpression>
> </Grouping>
> </SeriesDefinitions>
> <Orientation>Vertical</Orientation>
> <LineAttributes>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> <Visible>true</Visible>
> </LineAttributes>
> <Label>
> <Caption>
> <Value>TEST</Value>
> <Font>
> <Alignment/>
> </Font>
> </Caption>
> <Background xsi:type=\"attribute:ColorDefinition\">
> <Transparency>0</Transparency>
> <Red>255</Red>
> <Green>255</Green>
> <Blue>255</Blue>
> </Background>
> <Outline>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> </Outline>
> <Insets>
> <Top>0.0</Top>
> <Left>2.0</Left>
> <Bottom>0.0</Bottom>
> <Right>3.0</Right>
> </Insets>
> <Visible>true</Visible>
> </Label>
> <LabelPosition>Left</LabelPosition>
> <MajorGrid>
> <LineAttributes>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>196</Red>
> <Green>196</Green>
> <Blue>196</Blue>
> </Color>
> <Visible>false</Visible>
> </LineAttributes>
> <TickStyle>Right</TickStyle>
> <TickAttributes>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>196</Red>
> <Green>196</Green>
> <Blue>196</Blue>
> </Color>
> <Visible>true</Visible>
> </TickAttributes>
> </MajorGrid>
> <MinorGrid>
> <LineAttributes>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>225</Red>
> <Green>225</Green>
> <Blue>225</Blue>
> </Color>
> <Visible>false</Visible>
> </LineAttributes>
> <TickStyle>Across</TickStyle>
> <TickAttributes>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>225</Red>
> <Green>225</Green>
> <Blue>225</Blue>
> </Color>
> <Visible>false</Visible>
> </TickAttributes>
> </MinorGrid>
> <Scale>
> <MinorGridsPerUnit>5</MinorGridsPerUnit>
> </Scale>
> <Origin>
> <Type>Min</Type>
> <Value xsi:type=\"data:NumberDataElement\">
> <Value>0.0</Value>
> </Value>
> </Origin>
> <PrimaryAxis>true</PrimaryAxis>
> <Percent>false</Percent>
> </AssociatedAxes>
> <SeriesDefinitions>
> <Query>
> <Definition></Definition>
> </Query>
> <SeriesPalette>
> <Entries xsi:type=\"attribute:ColorDefinition\">
> <Transparency>255</Transparency>
> <Red>127</Red>
> <Green>127</Green>
> <Blue>127</Blue>
> </Entries>
> </SeriesPalette>
> <Series>
> <Visible>true</Visible>
> <Label>
> <Caption>
> <Value></Value>
> <Font>
> <Alignment/>
> </Font>
> </Caption>
> <Background xsi:type=\"attribute:ColorDefinition\">
> <Transparency>0</Transparency>
> <Red>255</Red>
> <Green>255</Green>
> <Blue>255</Blue>
> </Background>
> <Outline>
> <Style>Solid</Style>
> <Thickness>1</Thickness>
> <Color>
> <Transparency>255</Transparency>
> <Red>0</Red>
> <Green>0</Green>
> <Blue>0</Blue>
> </Color>
> <Visible>false</Visible>
> </Outline>
> <Insets>
> <Top>0.0</Top>
> <Left>2.0</Left>
> <Bottom>0.0</Bottom>
> <Right>3.0</Right>
> </Insets>
> <Visible>false</Visible>
> </Label>
> <DataDefinition>
> <Definition>row[&quot;CREATOR&quot;]</Definition>
> </DataDefinition>
> <SeriesIdentifier></SeriesIdentifier>
> <DataPoint>
> <Components>
> <Type>Orthogonal_Value</Type>
> </Components>
> <Separator>, </Separator>
> </DataPoint>
> <LabelPosition>Outside</LabelPosition>
> <Stacked>false</Stacked>
> </Series>
> <Grouping>
> <Enabled>true</Enabled>
> <GroupingInterval>1</GroupingInterval>
> <GroupType>Text</GroupType>
> <AggregateExpression>Sum</AggregateExpression>
> </Grouping>
> <Sorting>Ascending</Sorting>
> </SeriesDef
Previous Topic:Web Viewer Servlet Source
Next Topic:Iterating the ArrayList within another ArrayList
Goto Forum:
  


Current Time: Sat Apr 20 00:42:03 GMT 2024

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

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

Back to the top