Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 167115 - easier refresh of data set binding
Summary: easier refresh of data set binding
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.1.1   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 2.2.0 RC2   Edit
Assignee: Yuejie Chen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 184808
Blocks:
  Show dependency tree
 
Reported: 2006-12-07 11:40 EST by Leos Literak CLA
Modified: 2007-05-24 03:42 EDT (History)
7 users (show)

See Also:


Attachments
step1 (9.06 KB, application/octet-stream)
2007-04-23 04:54 EDT, Leos Literak CLA
no flags Details
step2 (9.72 KB, application/octet-stream)
2007-04-23 04:55 EDT, Leos Literak CLA
no flags Details
step3 (9.98 KB, application/octet-stream)
2007-04-23 04:58 EDT, Leos Literak CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leos Literak CLA 2006-12-07 11:40:53 EST
use case:

1) create data set DSet: select column1 from table
2) insert table, select DSet as Data Set in Binding tab
3) put Data into the table's column with row["column1"]
4) update DSet: select column1, column2 from table
5) insert new column into table
6) try to insert Data with row["column2"] - column2 is not defined in binding

Now I have to select table, go to binding, select same DSet again, it asks me, whether I wish to flush bindings and reinitialize from data set. Then I see column2 as new binding. Unfortunatelly all Data's within table are now empty and I must define them again :-(

I'd like to either to see new introduced columns from data set automatically in tables, that references them (so I don't need to flush my bindings) or to define them easier way then via Add data column binding button. I've tried second approach just once and it was very hard to complete, many dialogs appeared and I felt lost.
Comment 1 Hongchang Lin CLA 2007-04-16 02:40:36 EDT
Leos,
I'm not quite understand about you mentions:

After you fluch bindings with the same data set, the previous data columns bound to tabel are emty and you have to defing them again.

Take your user case to look, after you selecting same DSet again, the previous bound column1 still there and can query data out.

Could you describe it more detaily?
Comment 2 Leos Literak CLA 2007-04-23 04:54:50 EDT
Created attachment 64577 [details]
step1

simple table having three columns. The first column has computed value (for simplicity I just removed some constant, but in real life we do complex string concatenation)
Comment 3 Leos Literak CLA 2007-04-23 04:55:49 EDT
Created attachment 64579 [details]
step2

I realized that I need another column - customer id. So I modified data set
Comment 4 Leos Literak CLA 2007-04-23 04:58:42 EDT
Created attachment 64580 [details]
step3

But dataset binding for the table did not contain new entry, so I clicked on select element and selected my data set again. I confirmed designer's question and there are four binding available. Unfortunately the first column's binding was reset to original value, my change is lost.
Comment 5 Wang Qiangsheng CLA 2007-04-25 06:38:27 EDT
For this case, I think this you need add the column binding for the new column of data set, for example the customerid.
There're 2 terms in the data binding.
1. The data set and data columns. This is the columns you defined in the data set.
2. The column binding. This is the columns (binding) you used in the table.
Because the columns(binding) of a table needen't to contain all columns of binded data set, it's not making sense to refresh the table's columns(binding) automatically. Especailly the data set can be binded to multiple items. 
You need click the add button on the binding page of selected item, then you'll can add new column binding for new dataset columns.
I close this as won't fix, feel free to reopen it if you still have other concerns.
Comment 6 Leos Literak CLA 2007-04-25 07:03:33 EDT
Can you please look at this report as BIRT user, not as its developer? If you would use your own product in real life, you would not resolve it as WONTFIX. There is a real life annoying issue and I reported request to simplify common use case. 

I described (#c0) current way and explained that it is hard to use. When you rejected my request, you proposed me to do, what I originally described as unintuitive and hard to use.

Ok, I will describe my problem again:

It is common use case to update data set with new column(s). When table is already bound to this data set, there is no easy way how to add this column(s) to table's bindings. Can you propose and implement some easy to use way how to add new columns in data set to the list of bindings?

(please try to add new binding by hand, this flow is not intuitive. if you could simplify it, I would be satisfied)
Comment 7 Wang Qiangsheng CLA 2007-04-25 20:03:51 EDT
Thanks for replay
I have concerns for following case.
A dataset can be referenced by multiple report items, so it's not making sense to assume the data set changes will affect all referenced items. For example, the added columns in data set can only for a table only, but these columns are not making sense for  another table. So if we automatically refresh the referenced report items, that can generated lots of wasting bindings.
I'm working on a better solution.
Any suggestion?
Comment 8 Leos Literak CLA 2007-04-26 02:55:45 EDT
I see. What about another button in table's binding tab? E.g. Add missing bindings - when pressed, it will add bindings for all dataSetRow's items, that are not bound in the table?
Comment 9 Wang Qiangsheng CLA 2007-04-26 03:34:02 EDT
Well yes, maybe we can add a button on the binding page to say generate all bindings or missing bindinds.
Comment 10 Wenfeng Li CLA 2007-04-26 14:45:34 EDT
(In reply to comment #9)
> Well yes, maybe we can add a button on the binding page to say generate all
> bindings or missing bindinds.
> 

Is the proposal to generate a binding for all data set columns that has NOT been used in the binding?

Comment 11 Wang Qiangsheng CLA 2007-04-26 18:28:27 EDT
(In reply to comment #10)
> (In reply to comment #9)
> > Well yes, maybe we can add a button on the binding page to say generate all
> > bindings or missing bindinds.
> > 
> 
> Is the proposal to generate a binding for all data set columns that has NOT
> been used in the binding?
> 

Yes it is. 
Comment 12 Wang Qiangsheng CLA 2007-05-15 00:04:16 EDT
Moving to rc1 for blocking by dependencies of model.
Comment 13 Wenfeng Li CLA 2007-05-15 04:09:43 EDT
(In reply to comment #12)
> Moving to rc1 for blocking by dependencies of model.

Is there a good way for model to tell which data set column is NEW and not used in the table data binding?
Comment 14 Chen Chao CLA 2007-05-21 05:42:08 EDT
In old version , we have the button "Generate all binding" and "Remove unused binding". And DEUtil has these codes about Model.
Comment 15 Yuejie Chen CLA 2007-05-24 03:42:49 EDT
Add 'Refresh' button in binding page which will sync data binding with bound data set. We just create the new bindings for new or updated columns, will not delete bindings mapped with deleted column, for we don't know the binding is mapped with column or defined in customize expression.