Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OvcTable and OvcReportView

32 views
Skip to first unread message

Jerry Knowles

unread,
Dec 30, 2002, 11:39:40 AM12/30/02
to
I actually have two questions here. The viability of the second one depends
on the answer of the first.

We accidentally stumbled onto something with the ReportView that intrigues
me. My wife was looking at a ReportView that we use and had a group header
hilited. When she clicked on a button we use to perform a function on a
SINGLE highligted line in the ReportView, the procedure seemed to repeat for
every line in the group. My question is: Is this behavior designed into the
component? Or is it possibly a bug in the design?

IF the behavior is as designed then my next question is:

I want to use the records in the group to populate a table for editing. The
ReportView returns a pointer to each line hilited, so is it possible to pass
these pointers into an OvcTable to populate it and have all edits reflected
automatically in the ReportView when it is refreshed? Or is it more
reasonable to use these pointers to create copies into an array of records,
then populate the OvcTable, allow editing, save the records, then
repopulate/refresh the ReportView from the database?

Thanks in advance,
Jerry Knowles


Jerry Knowles

unread,
Jan 2, 2003, 5:20:12 PM1/2/03
to
Per,

Thanks for the info. Having the selection of a group select all items in
the group is actually quite reasonable and I am glad that it works that way!

And thanks for the info on the pointers. I will work with it a bit and see
what I can come up with.

Jerry
"Per Larsen [TurboPower]" <pe...@turbopower.com> wrote in message
news:GMjtuMos...@tpsmail01.turbopower.net...
> Jerry,
>
> The problem here is multi-select. Support for that was added to the
> report view as an afterthought. Multi-select by itself isn't
> particularly problematic, but once you add groups into the picture you
> also introduce a couple of issues that the original design didn't cater
> for: What happens if you select a group and then de-select some entries
> in the group, or vice versa - is the group as a whole selected or
> de-selected. Of course the answer is neither: The group is partially
> selected. Unfortunately, the report view as it stands doesn't have any
> way to express that sort of thing or to let you express what you want to
> do to a group (expand selection, clear selection, or whatever). For most
> of the report view component's life, selecting a group did not
> explicitly select the items in the group. However, even if the
> individual items were not marked as selected on screen, calling
> EnumSelected, say, would still report all items of a selected group as
> selected. We decided that was inconsistent and changed the behavior so
> that selected a group also selects all items in the group and updates
> that fact on screen.


>
> > The
> > ReportView returns a pointer to each line hilited, so is it possible
> to pass
> > these pointers into an OvcTable to populate it and have all edits
> reflected
> > automatically in the ReportView when it is refreshed?
>

> If you are using a TOvcReportView as opposed to TOvcDataReportView or
> TOvcDbReportView then yes, that's easy. TOvcReportView doesn't do any
> kind of buffering. In fact, it doesn't know anything about the data, so
> refreshing the report view with whatever the data contains after a
> change is simply a matter of calling Invalidate on the report view.
>
> As for obtaining the data pointers of the currently selected group, I
> don't seem to have a good example handy, but between the CurrentGroup
> property and the TOvcRvIndexGroup class definition, you should have
> everything you need.
>
> - Per
>
>


Per Larsen [TurboPower]

unread,
Jan 2, 2003, 12:19:40 PM1/2/03
to
Jerry,

The problem here is multi-select. Support for that was added to the
report view as an afterthought. Multi-select by itself isn't
particularly problematic, but once you add groups into the picture you
also introduce a couple of issues that the original design didn't cater
for: What happens if you select a group and then de-select some entries
in the group, or vice versa - is the group as a whole selected or
de-selected. Of course the answer is neither: The group is partially
selected. Unfortunately, the report view as it stands doesn't have any
way to express that sort of thing or to let you express what you want to
do to a group (expand selection, clear selection, or whatever). For most
of the report view component's life, selecting a group did not
explicitly select the items in the group. However, even if the
individual items were not marked as selected on screen, calling
EnumSelected, say, would still report all items of a selected group as
selected. We decided that was inconsistent and changed the behavior so
that selected a group also selects all items in the group and updates
that fact on screen.

> The


> ReportView returns a pointer to each line hilited, so is it possible
to pass
> these pointers into an OvcTable to populate it and have all edits
reflected
> automatically in the ReportView when it is refreshed?

If you are using a TOvcReportView as opposed to TOvcDataReportView or

0 new messages