Well I got it working, but it was very painful. Here is what I learned (Genuitec employees and others feel free to jump in.):
The steps below assume you have created a blank report and that you have not yet placed any tables on the blank report.
To start displaying data from a database:
1. Create a data source.
The first step in creating a data source is to select a driver. This is confusing terminology because you are really selecting a database CONNECTION either creating one from scratch or selecting one you created in the database explorer perspective. This has major implications when you are trying to get a report to use a JNDI connection. At this point you are not just associating a database driver with your data source, you are associating database connection parameters as well.
The next step is optional. Once you have selected the database connection driver, you can enter an optional JNDI url.
At this point you have created a data source.
2. Create a data set.
In the Data Explorer, right click on Data Sets and select "New Data Set" Select the Data Source you created in the previous step and click "Next" You are then prompted to enter a SQL Query. Enter your SQL query and click "Finish"
3. Add a table to your blank report.
From the palette, drag a table object onto your report.
4. Add columns to the table on your report.
Drag one or more columns from your data set onto the table you just added.
5. Preview your report.
Click on the preview tab at the bottom of your report. Data should display.
At this point MyEclipse has added the data source information to the report. Here is my data source from the .rptdesign file:
<oda-data-source extensionID="com.genuitec.eclipse.reporting.oda" name="Data Source" id="7">
<encrypted-property name="odaPassword" encryptionID="base64">dGVj</encrypted-property>
It is critical to understand that MyEclipse Reports ignores this information while the report is being designed.
The only connection info MyEclipse uses to preview the report is the database connection you created back in Step 1. To see what I mean, play around with your data source in the .rptdesign file. The following still works on the Preview Tab:
<oda-data-source extensionID="com.genuitec.eclipse.reporting.oda" name="DefaultDS" id="27">
Deploying this, however, gives the following error:
org.eclipse.birt.report.engine.api.EngineException: An exception occurred during processing. Please see the following message for details: Cannot open the connection for the driver: com.genuitec.eclipse.reporting.oda. Missing properties in Connection.open(Properties).
In summary, while developing the report, MyEclipse needs a working database connection driver enty. For example:
To deploy using JNDI, you also need a JNDI entry:
Don't be fooled into thinking that being able to preview the report in design mode translates into a correct configuration at run time.