Print Page | Close Window

Columns wise filterting

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=21855
Printed Date: 28 September 2024 at 6:13pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Columns wise filterting
Posted By: vishal
Subject: Columns wise filterting
Date 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.



Replies:
Posted By: dleibold
Date 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




Posted By: Willowmaster
Date 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





Posted By: vishal
Date 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.


Posted By: Algae
Date 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





Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net