Print Page | Close Window

Wilcards in filters...

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=13651
Printed Date: 17 November 2024 at 12:57pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Wilcards in filters...
Posted By: ddlittle
Subject: Wilcards in filters...
Date Posted: 11 March 2009 at 12:56pm

Has anybody implemented a filter with wildcard capabilities?  If i had a name list and wanted to find every name that starts with an 'S' and ends in 'I', i would type S*I should find everybody. 

Any ideas?
 
- David



Replies:
Posted By: mdoubson
Date Posted: 11 March 2009 at 9:16pm
Using current implementation of function CXTPReportRecordItem* CXTPReportRecords::FindRecordItem(int nStartRecord, int nEndRecord,

int nStartColumn, int nEndColumn, int nRecord, int nItem, LPCTSTR pcszText, int nFlags)

you can sequentially find all items with caption stating with your BeginningPattern (e.g. "S") using nFlags = 0 or nFlags = xtpReportTextSearchBackward for backward search direction.
Mark a while-found-loop by initial search postion (nStartRecord, nEndRecord, nStartColumn, nEndColumn...)  and anaylyze result by your EndingPattern (e.g "I")
 

// nStartRecord - Starting record index.

// nEndRecord - End record index.

// nStartColumn - Starting column index.

// nEndColumn - End column index.

// nRecord - Record index to start search from.

// nItem - Record item index to start search from.



-------------
Mark Doubson, Ph.D.


Posted By: mdoubson
Date Posted: 05 May 2009 at 5:45pm
We have now new flag for FindRecordItem function (xtpReportTextSearchExactStart) which means only string starting with pattern return (not pattern inside case) and new function FindRecordItemByRows which use same flag set but operate with Rows instead of Records - same way you can sort your report and call this function after e.g. providing top 10 rows as search positions


-------------
Mark Doubson, Ph.D.



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