Subject Re: [IBO] Howto manually update control when detail dataset changes
Author Helen Borrie
At 01:00 PM 23-11-01 +0000, you wrote:

>Regarding the issue, I am willing to learn from you. I try to think
>data, think data, ... but my issue is with displaying it. So please
>give me a hint what would be the proper way to display the data of a
>detail query in a master detail relationship in a cross-tab grid (or
>any other visualization not supported by IBO controls).

A grid is a row-driven control. If you want to use a grid control to display a cross-tab, then you are going to have to design a query for it, that outputs rows. Without any knowledge of what you want to represent in the cross-tab, one can only assume that you can find a "formula" for representing how a change in the detail dataset will affect one or more of the rows in the cross-tab (change an aggregate value, change a value in a column).

I didn't make the wisecrack about data for are looking for an event in the grid control where you can catch a change in data. In IBO, that is the wrong place to look. Look rather at the DATA events, i.e. those of the dataset and the datasource.

You will have to take care with transaction control - the cross-tab dataset will need to be in the same transaction for it to respond to uncommitted data events in the detail dataset's buffer; and it won't "see" changes in the buffer until the detail's after post at the earliest. Even then, you will need to invalidate the affected rows in the cross-tab - which means you have to design *that* query with keylinks that are capable of defining themselves with respect to the column(s) and row(s) of the detail dataset...The Keyfields property of each dataset will provide Bookmarks which you can use to synchronise their buffers.

Another, totally different approach (if you aren't trying to trigger DML from operations on the cross-tab) might be to work without a dataset for the crosstab, writing a method to capture each of the cross-tab column values into stringlists and populate/repopulate a TStringGrid.

IOW, I don't think this is a question of "visualization not supported by IBO" so much as a "think data" matter - figuring out a way to obtain columnar data in a format that can be represented somehow as rows in a repeatable way...


All for Open and Open for All
InterBase Developer Initiative ยท