{"id":69,"date":"2007-12-30T21:28:53","date_gmt":"2007-12-31T04:28:53","guid":{"rendered":"http:\/\/members.crystalreportsbook.com\/crystal-reports-xi\/4-3-filtering-with-wildcards\/"},"modified":"2010-11-17T18:11:13","modified_gmt":"2010-11-18T01:11:13","slug":"4-3-filtering-with-wildcards","status":"publish","type":"post","link":"http:\/\/www.crystalreportsonlinetraining.com\/training\/4-3-filtering-with-wildcards\/","title":{"rendered":"4.03 Filtering with Wildcards"},"content":{"rendered":"<h2>Filtering with Wildcards<\/h2>\n<p>The comparisons Is Like and Is Not Like have two characteristics which require more explanation. The first characteristic is that they let you build a custom list of allowable criteria. This is similar to the comparisons Is One Of and Is Not One Of described previously. As long as a field&#8217;s value matches any one of the values in the list, the record is printed.<\/p>\n<p>The second unique characteristic is that you can use wildcard characters to create a search string. Wildcards let you create a group of matching data without being limited by a beginning and ending range. The strings are selected if they fit the pattern&#8217;s search criteria.<\/p>\n<p>Search filters use two wildcard characters: ? and *. The ? allows any character to be in that position in the string. For example, let&#8217;s say that you want to print a report with all employees with the first name of Brian. You know that Brian is commonly spelled with a &#8220;y&#8221; as well as with an &#8220;i&#8221; and you want to find both spellings. The filter &#8220;Br?an&#8221; would match both spellings. The ? in the third position tells Crystal Reports that you don&#8217;t care which letter is used there as long as the rest of the string matches exactly.<\/p>\n<p>Another example of using the ? wildcard is to generate a report showing records where there is a typo in the social security number. Sometimes, people mistakenly skip a number when typing in the SSN or they forget to include the dashes. Using a criteria of Is Not Like and setting the filter to ???-??-???? tells Crystal Reports which characters should have a number in them and which ones can only be the dash. By using the Is Not Like comparison, the report lists the records that have a typo in them because they don&#8217;t match the filter.<\/p>\n<p>The second wildcard character is the *. It matches any number of characters in the string. This is best used when you want to find values that start a certain prefix. For example, if you want to find all the names that start with the letter C then you would use a filter string of C*.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Filtering with Wildcards The comparisons Is Like and Is Not Like have two characteristics which require more explanation. The first characteristic is that they let you build a custom list of allowable criteria. This is similar to the comparisons Is One Of and Is Not One Of described previously. As long as a field&#8217;s value [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,1],"tags":[],"class_list":["post-69","post","type-post","status-publish","format-standard","hentry","category-chapter-4-filtering-data-with-parameters","category-crystal-reports-xi","entry"],"_links":{"self":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":1,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/69\/revisions"}],"predecessor-version":[{"id":1406,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/69\/revisions\/1406"}],"wp:attachment":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/media?parent=69"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/categories?post=69"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/tags?post=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}