Error: Table is not connected to the data ...

I'm getting this error
"Data: Table is not connected to the data. Register the data using Report.RegisterData method."

I'm using:
* Visual Studio 2010 (Express)
* Reports storeds in resources (StoredInResources=true)
* Using OleDb to connect and load from DB (Interbase)

My pcode:

// Connect to DB
OleDBConnection DBConnection = ...

// Build SQL Select
SQLCommand = "select ... from ...";

// Create adapter to load data
OleDbAdapter dataAdapter = new OleDbAdapter(SQLCommand, DBConnection);

// Fill into table "Data"
dataAdapter.Fill(dataSet1, "Data"); // dataSet1 is one-table only!

// Register data
report1.RegisterData(dataSet1);

// Show report
report1.Show(); // Error here!

In design
* dataSet1 is a DataSet object
* dataSet1 has a one table "Data" with column definitions (for easy use in FR designer)

My report (object report1) from .resx (not .frx)
<Dictionary>
<TableDataSource Name="Data" ReferenceName="dataSet1.Data" DataType="System.Int32" Enabled="true">
<Column Name="COL1" DataType="System.String"/>
<Column Name="COL2" DataType="System.Int32"/>
...
...
<DataBand Name="Data1" Top="171.08" Width="718.2" Height="15.12" DataSource="Data">
...

Maybe I'm confused using DataSet and datatable name, or registering DataSet/DataTable ??

Comments

  • edited 5:02PM
    I have and MS SQL component as my source, attached to the Transform component, which is in turn connected to a Salesforce component. On the Salesforce component, I have configured as Insert Mode, with the "Clear the selected table before any data written" box checked.

    When I run the project however, Apatar is not clearing the data in the Salesforce table.

    Any thoughts?
  • edited 5:02PM
    Solved:

    ReferenceName and RegisterData must match

    in report :
    <TableDataSource Name="Data" ReferenceName="dataSet.Data" DataType="System.Int32" Enabled="true">

    in c# code ...
    report.RegisterData(dataSet, "dataSet");

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.