|
Re: Build DataSource from code - without external resources? [message #759507 is a reply to message #759066] |
Mon, 28 November 2011 20:22 |
|
Are you wanting to create a scripted datasource?
Take a look at the attached example.
Jason
On 11/25/2011 4:53 PM, Anton wrote:
> I would like to build a datasource from code that does not have any
> reference to any external resources on the filesystem, eg. flatfile,
> xmlfile, database etc.
>
> As an example a xml datasource can be build like this:
>
>
>
> OdaDataSourceHandle dataSourceHandle =
> elementFactory.newOdaDataSource(dataSourceName,
> org.eclipse.birt.report.data.oda.xml");
> dataSourceHandle.setProperty("FILELIST", dataSourceFile);
>
> But how do I build a datasource as a pojo without any reference to
> external resources? I have tried:
>
> ElementFactory elementFactory = report.getElementFactory();
> OdaDataSourceHandle dataSourceHandle =
> elementFactory.newOdaDataSource(dataSourceName);
>
> but how do I populate it with some content that I can next connect a
> dataset to? Maybe there are some examples showing how this can be done?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02512 seconds