error in report: copyInstance missing
I'm trying to run a report to generate a chart. It worked when my RTC server was at 3.0, but after the administrators updated to 3.0.1, the report now fails.
Anybody seen this before:
Is this something we need to fix in the report? Is it something the administrator needs to fix on the server?
The report design has this code inside a javascript block (just one example of using the copyInstance method):
Anybody seen this before:
Java class "org.eclipse.birt.chart.model.attribute.impl.TextImpl" has no public instance field or method named "copyInstance". at line 82 of chart script:'' exception.javascript.error ( 1 time(s) ) detail : org.eclipse.birt.report.engine.api.EngineException: Java class "org.eclipse.birt.chart.model.attribute.impl.TextImpl" has no public instance field or method named "copyInstance". at line 82 of chart script:'' at org.eclipse.birt.report.engine.executor.ExecutionContext.addException(ExecutionContext.java:1215) at org.eclipse.birt.report.engine.presentation.LocalizedContentVisitor.processExtendedContent(LocalizedContentVisitor.java:1037) at
...
Is this something we need to fix in the report? Is it something the administrator needs to fix on the server?
The report design has this code inside a javascript block (just one example of using the copyInstance method):
// If there are no story points for this priority, hide the priority from the legend
var points = priorityTotals.get(priorities[key-1].id);
if (points == null || points == 0) {
var newLegend = TextImpl.copyInstance(oldLegend);
newLegend.setValue("");
lerh.getLabel().setCaption(newLegend);
lerh.getFill().setTransparency(0);
}
4 answers
I needed two updates to the report design I was using.
(1) change all references like this:
to this:
(2) Change the output format from SVG to PNG (better browser compatibility):
to this:
(1) change all references like this:
var newLegend = TextImpl.copyInstance(oldLegend);
to this:
var newLegend = oldLegend.copyInstance();
(2) Change the output format from SVG to PNG (better browser compatibility):
<property>SVG</property>
to this:
<property>PNG</property>