Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Wilcards in filters...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Wilcards in filters...

 Post Reply Post Reply
Author
Message
ddlittle View Drop Down
Senior Member
Senior Member


Joined: 19 February 2004
Location: United States
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote ddlittle Quote  Post ReplyReply Direct Link To This Post Topic: Wilcards in filters...
    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
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: 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.

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: 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
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.109 seconds.