- Home
- DevShare
- Forums
- Wiki
- Products & Services
- Downloads
- Documentation
- Webinars
- Store
- Blog
|
|||
|
Hi,
How to write a 'switch' statement or 'if-else' in the Expression builder of Y Series while plotting a chart..??? based on some report parameter, i need to show the amountpaid in either sum or average on Y axis. I tried with below code, var ret; switch (params[ "SummaryType" ].value) { case "sum" : ret = Total.sum(row[ "amountpaid" ]) break case "avg" : ret = Total.ave(row[ "amountpaid" ]) break } ret; But it is showing an error. Could some one look into this issue..??? Last edited by vikasg18 : 12-04-2008 at 02:00 AM. |
|
|||
|
Jason,
when i preview the report, it is showing 'NullPointerException'. see the stack trace below. I have modified the beforeFactory code with my chart name and parameter value. But still it showing exception. org.eclipse.birt.report.service.api.ReportServiceException: Error happened while running the report.; nested exception is: java.lang.NullPointerException Stack Trace: org.eclipse.birt.chart.util.ChartUtil.getFullAggregateExpression(ChartUtil.java:867) org.eclipse.birt.chart.util.ChartUtil.getValueSeriesFullExpression(ChartUtil.java:808) org.eclipse.birt.chart.reportitem.AbstractChartBaseQueryGenerator.addValueSeriesAggregateBindingForGrouping(AbstractChartBaseQueryGenerator.java:146) org.eclipse.birt.chart.reportitem.AbstractChartBaseQueryGenerator.addAggregateBindings(AbstractChartBaseQueryGenerator.java:391) org.eclipse.birt.chart.reportitem.AbstractChartBaseQueryGenerator.generateGroupBindings(AbstractChartBaseQueryGenerator.java:299) |
![]() |
| Thread Tools | |
| Display Modes | |
|
|