Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - How to use SetFiltrable?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to use SetFiltrable?

 Post Reply Post Reply
Author
Message
nomura1 View Drop Down
Newbie
Newbie


Joined: 27 June 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote nomura1 Quote  Post ReplyReply Direct Link To This Post Topic: How to use SetFiltrable?
    Posted: 27 June 2006 at 5:35pm
I'm currently evaluating the Report Control and am trying to set up pulldown-style filtering on the columns.  I've involed SetFiltrable(TRUE) on the CXTPReportColumn but there doesn't seem to be any information on what this option does, let alone how I take advantage of it.  Any help here would be appreciated.

Thanks!
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 28 June 2006 at 7:30am
Hi,

SetFiltrable is used to specify whether column data will be used for inline filtering (using Filter Window which you can find in the sample).

In order to make a combobox for editing items, you'll have to setup it's Edit Options. See TaskListView for example, or below (for Status column):

    pColumnStatus->GetEditOptions()->AddConstraint(_T("Not Started"), taskStatusNotStarted);
    pColumnStatus->GetEditOptions()->AddConstraint(_T("In Progress"), taskStatusInProgress);
    pColumnStatus->GetEditOptions()->AddConstraint(_T("Completed"), taskStatusCompleted);
    pColumnStatus->GetEditOptions()->AddConstraint(_T("Waiting on someone else"), taskStatusWaiting);
    pColumnStatus->GetEditOptions()->AddConstraint(_T("Deferred"), taskStatusDeferred);
    pColumnStatus->GetEditOptions()->m_bConstraintEdit = TRUE;
    pColumnStatus->GetEditOptions()->m_bAllowEdit = TRUE;
    pColumnStatus->GetEditOptions()->AddComboButton();


--
WBR,
Serge
Back to Top
nomura1 View Drop Down
Newbie
Newbie


Joined: 27 June 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote nomura1 Quote  Post ReplyReply Direct Link To This Post Posted: 28 June 2006 at 11:56am
Hi Serge,

Thanks for the reply.  I don't want to allow users to edit items, I want to use a combo box for filtering, like the "AutoFilter" option in Excel.  Does the ReportControl have this functionality?
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 28 June 2006 at 4:55pm
Try looking at the Report Control -> Filter Window option in the Report Sample.  Maybe this is what you want?

Also See:
CXTPReportControl::GetFilterText()
CXTPReportControl::SetFilterText(LPCTSTR strFilterText)
Back to Top
nomura1 View Drop Down
Newbie
Newbie


Joined: 27 June 2006
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote nomura1 Quote  Post ReplyReply Direct Link To This Post Posted: 28 June 2006 at 6:20pm
Yeah, I had checked that out but no, that's not what I want.  I want to have the column header act as a pull-down menu and serve as a filter, like AutoFilter in Excel.

Thanks!
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 03 July 2006 at 4:27am
Ok, I see, but AutoFilter like in Excel is not natively supported by the Report control. As a workaround you can allow editing for the first row only, catch ValueChanged event and update Rows collection hiding those which doesn't fit the choosen value.

--
WBR,
Serge
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.203 seconds.