Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Columns wise filterting
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Columns wise filterting

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

Joined: 22 August 2013
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote vishal Quote  Post ReplyReply Direct Link To This Post Topic: Columns wise filterting
    Posted: 22 August 2013 at 8:46am
Dear All,

I want to apply filtering on multiple columns with different value.

I add on header row but please help me how to apply multiple filter string on Report control with columns wise.

Please help me for solve this issue.

Thanks,
Ahir Vishal D.
Back to Top
dleibold View Drop Down
Groupie
Groupie
Avatar

Joined: 08 March 2010
Location: Canada
Status: Offline
Points: 13
Post Options Post Options   Thanks (0) Thanks(0)   Quote dleibold Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2013 at 11:51am
Look into CXTPReportControl::SetFilterText

e.g.

m_ReportControl.SetFilterText(strFilter); // strFilter is the value to filter for
m_ReportControl.Populate(); // must call this to refresh the grid


Back to Top
Willowmaster View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 July 2010
Location: Netherlands
Status: Offline
Points: 180
Post Options Post Options   Thanks (0) Thanks(0)   Quote Willowmaster Quote  Post ReplyReply Direct Link To This Post Posted: 05 November 2013 at 8:34am
That filters on all columns and you can't use different values for multiple columns. I think you have to code the filtering yourself by hiding the rows that don't match the criteria.
Product: Xtreme SuitePro (ActiveX) version 15.3.1

Platform: Windows XP (32bit) - SP 3 (on VMWare)

Language: Visual Basic 6.0



Back to Top
vishal View Drop Down
Groupie
Groupie
Avatar

Joined: 22 August 2013
Status: Offline
Points: 14
Post Options Post Options   Thanks (0) Thanks(0)   Quote vishal Quote  Post ReplyReply Direct Link To This Post Posted: 07 November 2013 at 11:55pm
Hello All,

Thanks to give me replay your replay is very helpful to me

if possible then please give me sample code for filter on multiple columns into CXTPReportControl.

Thanks for your help.
Ahir Vishal D.
Back to Top
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Posted: 11 November 2013 at 1:13am
Vishal - I accomplished this by modifying the CodeJock library filtering mechanism. What you want to look for is here. Observe the tokenizing:

File: XTPReportControl.cpp

Function: BOOL CXTPReportControl::_ApplyFilter(CXTPReportRecord* pRecord, CString strFilterText, BOOL bIncludePreview)

The trick that worked for me was to retain the filtered state of the record.

    if ( GetKeepFiltered() )
    {
        if ( pRecord->IsFiltered() )
            return TRUE;
    }
    else pRecord->SetFiltered(FALSE);

Hopefully this will point you in the right direction and make your day easier. Smile


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.125 seconds.