{"id":72,"date":"2007-12-30T21:28:53","date_gmt":"2007-12-31T04:28:53","guid":{"rendered":"http:\/\/members.crystalreportsbook.com\/crystal-reports-xi\/4-6-tutorial-4-1-selecting-records\/"},"modified":"2010-11-17T18:11:34","modified_gmt":"2010-11-18T01:11:34","slug":"4-6-tutorial-4-1-selecting-records","status":"publish","type":"post","link":"http:\/\/www.crystalreportsonlinetraining.com\/training\/4-6-tutorial-4-1-selecting-records\/","title":{"rendered":"4.06 Tutorial 4-1. Selecting Records"},"content":{"rendered":"<h2>Tutorial 4-1. Selecting Records<\/h2>\n<p>Let&#8217;s put what we learned about selecting records to use. In this tutorial, we set a filter on two fields: Country and Last Year&#8217;s Sales. For Country, we want to select a specific set of countries to print (Canada, England, and USA). For the Last Years Sales field, we only want to see records with a sales amount over $25,000.<\/p>\n<ol>\n<li Value=\"1\">Open the Crystal Reports sample report Group.rpt. This report demonstrates grouping data on the Country and Customer Name fields. It shows the previous year&#8217;s sales by customer and their percentage of the total sales.<\/li>\n<li Value=\"2\">Save the report as Select Expert Tutorial.rpt.<\/li>\n<li Value=\"3\">Click the menu items Report > Select Expert.<\/li>\n<li Value=\"4\">The Choose Field dialog box opens for you to select the field to filter on. Select the Customer.Country field.<\/li>\n<li Value=\"5\">The Select Expert dialog box opens with the Customer.Country tab shown. For the comparison type, select Is One Of from the dropdown list.<\/li>\n<li Value=\"6\">In the second dropdown list, select each of the following values: Canada, England and USA. This selects all records that are from one of those three countries.<\/li>\n<li Value=\"7\">Create a second filter field by clicking on the <new> tab and select the field Customer.Last Year&#8217;s Sales. Click the Ok button to go back to the Select Expert dialog box.<\/li>\n<li Value=\"8\">For this field, we want all sales that are greater than $25,000.  For the condition criteria, select Is Greater Than or Equal To. In the second dropdown list type in $25,000.<\/li>\n<li Value=\"9\">To make sure you&#8217;ve entered both conditions properly, click on the Show Formula button in the bottom right hand corner. Compare your formula to the following:<\/li>\n<\/ol>\n<p>         <code>{Customer.Country} in [\"USA\", \"England\", \"Canada\"] and &#xB;{Customer.Last Year's Sales} >= $25000.00<\/code><\/p>\n<ol>\n<li Value=\"10\">Make any necessary corrections to your formula if there is a mistake.<\/li>\n<li Value=\"11\">Preview the report and it should look like the following. Notice that each sales amount is greater than $25,000.<\/li>\n<\/ol>\n<p>         <a href=\"http:\/\/www.crystalreportsonlinetraining.com\/Images\/CRXI\/Ch04\/image011.png\"><br \/>\n            <img decoding=\"async\" src=\"http:\/\/www.crystalreportsonlinetraining.com\/Images\/CRXI\/Ch04\/image012.jpg\"><\/img><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Tutorial 4-1. Selecting Records Let&#8217;s put what we learned about selecting records to use. In this tutorial, we set a filter on two fields: Country and Last Year&#8217;s Sales. For Country, we want to select a specific set of countries to print (Canada, England, and USA). For the Last Years Sales field, we only want [&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-72","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\/72","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=72"}],"version-history":[{"count":1,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/72\/revisions"}],"predecessor-version":[{"id":1409,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/72\/revisions\/1409"}],"wp:attachment":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/media?parent=72"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/categories?post=72"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/tags?post=72"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}