Bug 287822 - Refreshing a data column binding should remove bindings with dangling dataSetRow references
Summary: Refreshing a data column binding should remove bindings with dangling dataSet...
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.5.1   Edit
Hardware: PC Windows Vista
: P3 enhancement with 1 vote (vote)
Target Milestone: Future   Edit
Assignee: Zhiqiang Qian CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2009-08-27 09:14 EDT by Andreas Mayer CLA
Modified: 2011-08-19 12:25 EDT (History)
2 users (show)

See Also:
wenfeng.fwd: pmc_approved+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Mayer CLA 2009-08-27 09:14:51 EDT
Refreshing a data column binding via the "Refresh" button in the "Binding" tab should also remove any binding that references a dataSetRow that does not exist. 

Motivation:

Apparently, if you create a column binding BIRT stores the data set's list of columns in the binding. The report engine complains about inconsistent or excess columns in the binding, but BIRT doesn't update the bindings automatically, if a data set has been changed.

Currently, it's rather tedious to correct such errors. The "Refresh" button in the "Binding" tab only adds missing columns to the binding, but neither removes columns that have been removed from the data set nor updates columns whose properties have been changed in the data set. So you can temporarily switch the binding's data set to "None" and back (which unfortunately removes any data set parameters) or you can remove all columns (one by one, there is no "Remove All") and refresh the binding (which re-adds all columns, this time up-to-date).
Comment 1 Andreas Mayer CLA 2009-08-27 09:31:30 EDT
In addition, bindings that reference an existing dataSetRow should be synchronized with the dataSetRow. For example, if a data set has a computed column and the column's type has been changed, then the type should be changed in the binding, too.

Maybe we can go even one step further and update _all_ data column bindings that reference a data set automatically, if that data set is changed. The engine will raise an error if any binding mismatches the corresponding data sets. So the user will have to correct this anyway. Doing it automatically will spare the user from searching all references to the particular data set and update them manually. Restricting this kind of update to bindings referencing a data set should preserve other kind of bindings. The changes due to the update could be grouped with the original data set changes in the edit history, so that they can be undone together.
Comment 2 Wenfeng Li CLA 2010-01-19 02:04:17 EST
Add plan key word to include this feature as part of a refactoring project.
Comment 3 Wenfeng Li CLA 2010-01-19 02:05:40 EST
related bugzilla #207478
Comment 4 pickle_supreme CLA 2011-08-19 12:25:10 EDT
This bug crops up when copying and pasting an existing chart and trying to modify the data source. With no way to effectively remove the dangling references, the process becomes an exercise in digging through raw XML.