Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - CXTPReportSelectedRows::SelectBlock Problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPReportSelectedRows::SelectBlock Problem

 Post Reply Post Reply
Author
Message
Danlar View Drop Down
Groupie
Groupie
Avatar

Joined: 27 February 2008
Location: United States
Status: Offline
Points: 12
Post Options Post Options   Thanks (0) Thanks(0)   Quote Danlar Quote  Post ReplyReply Direct Link To This Post Topic: CXTPReportSelectedRows::SelectBlock Problem
    Posted: 21 August 2009 at 10:12am
Hi,

I am having trouble using CXTPReportSelectedRows::SelectBlock. This problem first started to happen after I upgraded from version 12.1.1 to 13.1.0.

I will explain with an example:

Imagine I have a report control with 15 rows in it, no groups, no rows have child rows, and I have the 4th row from the top selected.

I am now calling myReport.GetSelectedRows()->SelectBlock(0, myReport.GetRows()->GetCount() - 1, TRUE) to select all rows. The result seems to be that only rows index 3 through 14 are selected (everything at or below my previous selection).

At the end of the function call to SelectBlock, the CXTPReportSelectedRows::m_arrSelectedBlocks member contains the following data:

i0: nIndexBegin=3, nIndexEnd=4
i1: nIndexBegin=0, nIndexEnd=15

I'm surprised to see there are more than one selected blocks, given that I passed TRUE for the bCallClear argument.


I don't understand. Am I using SelectBlock wrong, or is there a bug?

My final goal is to select all rows in the report control via code. I suppose there are other ways I can make that work, but I though I should bring this to your attention. Alternative solutions I've found include explicitly calling Clear before SelectBlock, or sending a message to hook into the new CTRL+A accelerator mentioned in the release notes, or calling _SelectRows, like the accelerator does, but that isn't a public function.

-Dan
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 21 August 2009 at 1:02pm

Take recent updates - and rebuild your dll and app -

 
Select All Rows doing by Control+A - see what is reaction in ReportControl.cpp or ReportNavigator.cpp on such shortcut - no hook need!
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.