Hi,<br />
<br />
I can generate/view Reports if i use JavaScript to define raw datas<br />
<br />
but i have a ClassNotFoundException if i use a ScriptedEventHandler Class to define my Scripted Data Set. the report engine fails when trying to load<br />
the event adapter.<br />
<br />
Her ist my Code<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
ScriptDataSourceHandle dataSourceHandle = elementFactory.newScriptDataSource("Data Source");
reportDesignHandle.getDataSources().add(dataSourceHandle);
</pre>
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
ScriptDataSetHandle dataSetHandle = elementFactory.newScriptDataSet("DataSet");
dataSetHandle.setEventHandlerClass("ExportDataSet");
dataSetHandle.setDataSource("Data Source");
</pre>
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
public class ExportDataSet extends ScriptedDataSetEventAdapter{
@Override
public boolean fetch(IDataSetInstance dataSet, IUpdatableDataSetRow row) {
if (this.currentRow >= totalRows) {
return false;
}
final String[] rowData = this.data.get(currentRow);
try {
row.setColumnValue("date", rowData[0]);
} catch (ScriptException e) {
e.printStackTrace();
}
this.currentRow++;
return true;
}
</pre>
<br />
I want to use BirtViewer to display und run Reports.<br />
<br />
Thanks !