Hi, Folks,
When I compile the following code, There is
no these IQueryResults, IBaseExpression, and IResultIterator classes files
with birt-runtime-2.1RC1a.zip.
It compiled
in birt-runtime-2_0_1.zip. I think it is in package import
org.eclipse.birt.data.engine.api.*;
But I can’t find it in birt-runtime-2.1RC1a.zip.
Please let me know where I can find the
jar files contains IQueryResults, IBaseExpression, and IResultIterato class in with
birt-runtime-2.1RC1a.zip.
Thank you very much
Chaohua
public int DataPreview (IReportRunnable
runnable, String datasetName) throws RemoteException
{
assert runnable !=
null;
int count = 0;
IDataPreviewTask
dataPreviewTask = null;
synchronized (
this.getClass( ) )
{
dataPreviewTask
= engine.createDataPreviewTask ( runnable );
}
IQueryResults
actualResultSet = dataPreviewTask.executeDataSet(datasetName , 1 , null);
try{
if (
actualResultSet != null )
{
//Iterate
through results
Collection
col = actualResultSet.getPreparedQuery( ).getReportQueryDefn(
).getRowExpressions( );
IBaseExpression[]
expressions = (IBaseExpression[])col.toArray( new IBaseExpression[col.size(
)]);
IResultIterator
iter = actualResultSet.getResultIterator( );
//int
columnCount = expressions.length;
while
( iter.next( ) )
{
System.out.prinltn(“”);
}
actualResultSet.close(
);
}
} catch (
BirtException ex )
{
LOGGER.log(
Level.SEVERE, " Failed to to load data set", ex );
}
finally
{
actualResultSet.close()
;
}
return count;
}