| Summary: | BIRT table column bindings remain after data set change | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Paul Rogers <progers> |
| Component: | BIRT | Assignee: | Chen Chao <cchen> |
| Status: | RESOLVED FIXED | QA Contact: | Maggie Shen <lshen> |
| Severity: | normal | ||
| Priority: | P3 | CC: | bluesoldier, lchan, lzhu, wenfeng.fwd, whe, wyan, xxue, zimmermann.tho, zqian |
| Version: | 2.2.2 | ||
| Target Milestone: | 4.2.1 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
| Bug Depends on: | 226904 | ||
| Bug Blocks: | |||
|
Description
Paul Rogers
I agree we could have enhancement on column binding validation once dataset changed, which would need Dte provide some helper methods. But for the syntax "row["name"]", "name" actually refers to a column binding name. A binding can also refer to other bindings instead of dataset columns. I think this design helps reducing the run-time complexity of guessing if the name is from dataset or column binding. For the data type, actually current data engine support implicit conversion of types at runtime, for instance: String<->Integer, String<->Date. so normally this will not affect the data result until there's conflict between the new data type and original binding semantic. A few clarification comments, FWIW. The bindings seem like something that should be derived at run time, not cached at design time. A good general principle is to not store anything in the design file unless the user explicitly created it. All else should be derived from the user's design at run time. Thus, if the table wants bindings for all data row columns, it should generate them at run time based on the state of the design at that moment in time. If the engine needs to create bindings on the table for each data item, it should do so at run time. Doing the binding at run time eliminates the whole issue of keeping table bindings in sync with the data set and the data items. As it is, that job appears to fall on me: I must take extra steps to doctor up the bindings whenever I change anything. And, I'm actually prevented from changing some things (such as binding names) due to the internal needs of the current binding system. The binding system seems to be an assistance to the engine, not me. Thus, it should be created implicitly by the engine; I should not have to maintain it explicitly. This is akin to a compiler. Source code in Java references other objects. The Java runtime may well convert these into actual pointer references. But, such references are not cached in the Java source; they are computed at compile and/or run time. As for the naming issue; the vast majority of the time users will choose unique names for columns. After all, if I have an aggregate Foo and a column Foo, how am I going to keep them straight? Unique name requirements are well understood, and it is much easier for an old brain like mine to remember "use unique names" than it is to remember when I use row, when to use dataSetRow, when to create bindings, etc. Ultimately, the question comes down to ease of use: what is easier for the user who does not have a deep understanding of the binding system. Again, just my thoughts, FWIW. make bugzila 226904 link to this one. Fixed it. Add a clear button on the binding page. Hi, I think this is a step in the right direction, but if I am not mistaken, the same behaviour was always available through simple re-binding of the dataset to the report item. The first suggestion from Paul Rogers sounds like the best solution to this, but very likely that would require some major changes to the code? The company that I work for uses BIRT as a tool to dynamically generate PDFs, not so much reporting but more like filled out forms, letters and such. This works very well and is proof of the versatility of BIRT. But because of our use case we have many different datasets spread out in different libraries. If a dataset changes in one of the libraries, we have to manually step through all the reports that use a dataset from it and reset the bindings. The suggested pass-through behaviour would be just plain awesome! :) Just my 2 cents to let the developers know that people care about this. :) BIRT is great so far! PS: Just for completeness: What I think what Paul Rogers meant when he said that implementing this in javascript is easy are getters and setters. ( http://ejohn.org/blog/javascript-getters-and-setters/ ) These are supported by Rhino and could contain the dataSetRow-access logic for the getters. So row["FOO"] could return dataSetRow["FOO"] if there are no overriding custom columns. |