As mentioned above, this error occurs when a Selection Query Range is defined for a data source and then removed from the template. Once a Selection Query Range for a data source is added to the template using the OfficeWriter Designer toolbar, a bookmark is added to the template to define what portion of the document should repeat and that data source is linked to the template in the report's RDL file. If all the bookmarks for this data source are then removed from the template, the references to that data source in the RDL file that the Designer added are not automatically removed.
This behavior is planned to change in a future version, so that it will be possible to define a Selection Query Range for a data source in a template, and then later decide to remove it. In the meantime, there are two workarounds to this issue:
1. Remove the relevant block from the RDL for the data source that is no longer used.
Important: Back up your RDL file before making manual changes to it in case you make a mistake.
For each data source used in the template, the OfficeWriter Designer adds a <Table Name="data_placeholder_DataSourceName">...</Table> block in the RDL file.
If a data source is no longer used in the template, simply open the RDL file in a text editor and remove the correspoding Table block.
For example, if you want to remove this block for a data source called Contacts, look for the <Table Name="data_placeholder_Contacts">...</Table> block and delete it.
2. Design your report from scratch.
Build a new report from scratch (both RDL and Word template). When designing the template, be careful to only add Selection Query Ranges for data sources that will definitely be used in the report. (Don't plan on removing all the bookmarks for any data source.) |