Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Legend problem on multiple series chart
hseeram
I got a multiple y-series chart. The Legend items are showing even when the corresponding Series value is null. Can we hide legend item when the corresponding series value is null?
Please see the attached image. From the attached impage I like to print legent items as below:
- Target Agents
* SB1_20090918
* SB1_20090917
* Inbound_4
* Inbound_1
Any help is greatly appreciated.
Thanks
Find more posts tagged with
Comments
mwilliams
Hi hseeram,
Can you reproduce this issue with the sample database so that I can see the issue? Also, let me know what version of BIRT you're using when you attach the sample.
hseeram
Michael
I am using BIRT2.3.2.
Please see the attached sample design file. I used BIRT sampleDB in this design file.
The attached report design contains two Y-series values and grouped by year.
When You run this report in the first group of legend for year 9999 and 2003 the series is null. I want to hide these legends when the series value is null.
I appreciate for your help..
Thanks
hseeram
Any luck in resolving the above issue.
This is an urgent and I need solution as soon as posible.
It will be a great help if someone find solution to resolve this issue.
Thanks
mwilliams
hseeram,
I can get the value and image to not show, but the space that they took up is still there, so it doesn't look how you're wanting it to.
hseeram
Michael,
Right now I am showing all legends and so far my client is okay with it.
I am curious to know how you are hiding Value and impales.
Today I got into another big problem. The following WARNING: Exception occured while running the report:
WARNING: Exception
org.eclipse.birt.chart.exception.ChartException: Cannot define all null values on a plot
at org.eclipse.birt.chart.datafeed.DataSetProcessorImpl.getMinimum(DataSetProcessorImpl.java:205)
at org.eclipse.birt.chart.computation.withaxes.PlotWith2DAxes.getMinMax(PlotWith2DAxes.java:323)
at org.eclipse.birt.chart.computation.withaxes.PlotWith2DAxes.updateOverlayScales(PlotWith2DAxes.java:1150)
at org.eclipse.birt.chart.computation.withaxes.PlotWith2DAxes.compute(PlotWith2DAxes.java:716)
at org.eclipse.birt.chart.factory.Generator.build(Generator.java:1104)
at org.eclipse.birt.chart.reportitem.ChartReportItemPresentationBase.buildChart(ChartReportItemPresentationBase.java:877)
at org.eclipse.birt.chart.reportitem.ChartReportItemPresentationBase.onRowSets(ChartReportItemPresentationBase.java:736)
at org.eclipse.birt.chart.reportitem.ChartReportItemPresentationProxy.onRowSets(ChartReportItemPresentationProxy.java:105)
at org.eclipse.birt.report.engine.presentation.LocalizedContentVisitor.processExtendedContent(LocalizedContentVisitor.java:909)
at org.eclipse.birt.report.engine.presentation.LocalizedContentVisitor.visitForeign(LocalizedContentVisitor.java:501)
at org.eclipse.birt.report.engine.content.impl.ForeignContent.accept(ForeignContent.java:69)
at org.eclipse.birt.report.engine.presentation.LocalizedContentVisitor.localize(LocalizedContentVisitor.java:150)
at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:36)
at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:63)
at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:101)
at org.eclipse.birt.report.engine.api.impl.RenderTask$PageRangeRender.render(RenderTask.java:498)
at org.eclipse.birt.report.engine.api.impl.RenderTask.render(RenderTask.java:209)
at COM.soundbite.birt.BirtEngineImpl.generateReportExec(BirtEngineImpl.java:359)
at COM.soundbite.birt.BirtEngineImpl.generateReport(BirtEngineImpl.java:242)
at COM.soundbite.birt.BirtEngineImpl.generateReport(BirtEngineImpl.java:234)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at COM.soundbite.base.microcontainer.ServiceInterceptor.proxyInvoke(ServiceInterceptor.java:127)
at COM.soundbite.base.microcontainer.ServiceInterceptor.invoke(ServiceInterceptor.java:95)
at $Proxy82.generateReport(Unknown Source)
at COM.soundbite.biz.report.SkillGroupBirtReport.generateReport(SkillGroupBirtReport.java:932)
at COM.soundbite.biz.report.ReportJob.execute(ReportJob.java:137)
at COM.soundbite.job.JobThread.runJob(JobThread.java:123)
at COM.soundbite.job.JobThread.run(JobThread.java:83)
Sep 28, 2009 4:11:51 PM org.eclipse.birt.chart.datafeed.DataSetProcessorImpl getMaximum
Any idea how to resolve this problem? This is more important than the above issue. Can you please help me to fix this? I appreciate for your help.
Thanks
mwilliams
hseeram,
Here's what is able to get rid of the labels in the legend. You'd just have to figure out which ones were null and use this only on them:
function beforeDrawLegendItem( lerh, bounds, icsc )
{
lerh.getLabel().setVisible(false);
bounds.setHeight(0);
bounds.setWidth(0);
}
As for the exception, did you change anything with your report when you started getting this error?
hseeram
Nothing changed. So far I was running this report on BIRT designer(2.3.2) and I didn't see any error on designer. I noticed this exception after I deployed the report design into our application.
mwilliams
hseeram,
Do you see the issue with the sample report you posted in here? Are you using the sample viewer to deploy your reports in your app?
hseeram
Yes, I do see the exception with the sample report that was posted above. Our application do not use viewer. All our report run by scheduled job asynchronously. We use the following code to run these reports:
static void runReport() throws Exception
{
IReportEngine engine=null;
EngineConfig config = null;
config = new EngineConfig( );
config.setEngineHome( "C:/birt-runtime/ReportEngine" );
config.setLogConfig("C:/birt.log", Level.INFO);
Platform.startup( config );
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );
engine.changeLogLevel( Level.FINEST );
IReportRunnable design = engine.openReportDesign("C:/reports/LegendIssue.rptdesign");
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
RenderOption option = new RenderOption();
option.setSupportedImageFormats("JPG;PNG;BMP;SVG");
option.setOutputFileName("c:/reports/LegendIssue.PDF");
option.setOutputFormat("PDF");
task.setRenderOption(option);
task.run();
task.close();
engine.destroy();
Platform.shutdown();
}
mwilliams
hseeram,
That is odd that you get that error when it's deployed. I don't see anything wrong in your code at first sight. If I notice anything, I'll let you know. You may try creating a very simple report with just a table representation of your dataSet and running it the same way to see if it's just a problem with this report.