{"id":84,"date":"2007-12-30T21:28:53","date_gmt":"2007-12-31T04:28:53","guid":{"rendered":"http:\/\/members.crystalreportsbook.com\/crystal-reports-xi\/418-multiple-discrete-and-range-values\/"},"modified":"2007-12-30T21:28:53","modified_gmt":"2007-12-31T04:28:53","slug":"418-multiple-discrete-and-range-values","status":"publish","type":"post","link":"http:\/\/www.crystalreportsonlinetraining.com\/training\/418-multiple-discrete-and-range-values\/","title":{"rendered":"4.18 Multiple, Discrete and Range Values"},"content":{"rendered":"<h3>Multiple, Discrete and Range Values<\/h3>\n<p>A parameter has the flexibility to store a single value, a range of values, or a combination of the two. This gives you a lot to think about when deciding which is appropriate for each parameter. Since these three options can be used in conjunction with each other, it&#8217;s best to get an overall understanding of them at the same time.<\/p>\n<p>Discrete parameters are good when you need to store a single value. An example is when you want to print a report based on a Company ID. Another example is storing a Boolean value that determines when a report feature is to be displayed or hidden.<\/p>\n<p>Range values give you more flexibility by allowing you to set a start and end point of acceptable values. Any value that falls within this range is included. This is useful when you want to print multiple values and these values have a definite starting point and ending point. Range values are frequently used when filtering dates because you can set the beginning and ending dates and all dates in between get included.<\/p>\n<p>Parameters let you go one step further by combining both discrete values and range values into the same parameter. These are called multi-value parameters. A multi-value parameter is a list of different values (i.e. an array of values&#x2;). This gives the user the ability to create a list of acceptable values that can be discrete values, range values, or a combination of the two. This can result in a complex list of acceptable values. For example, consider financial reports which are often based on account codes. Each type of account category (assets, liabilities, etc.) is represented by a starting and ending range. An auditor that is investigating fraudulent information could print out certain related accounts by entering multiple account codes such as 10000-11000, 50000-51000, and the individual accounts 05928 and 05970. The multi-value parameter lets all the accounts be printed on the same report for easier analysis. If the report didn&#8217;t use a multi-value parameter, then each of these accounts and account ranges would have to be printed on a separate report and pieced together. Table 4-3 shows a summary of the different type parameter options.<\/p>\n<p>         <b>Table 4-3. Options for parameter fields<\/b><\/p>\n<table border=\"1\">\n<tr>\n<th>Option<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>Discrete value(s)<\/td>\n<td>The user must enter a single value.<\/td>\n<\/tr>\n<tr>\n<td>Range value(s)<\/td>\n<td>The user enters two the start and end points of a range. The range will include the values entered. For example, if you entered a range of 1,000 and 1,999 then it would include all numbers from 1,000 up to and including 1,999. The numbers 999 and 2,000 would not be included.<\/td>\n<\/tr>\n<tr>\n<td>Allow multiple values<\/td>\n<td>Allows a parameter to accept discrete and range values and store them as a series.<\/td>\n<\/tr>\n<\/table>\n<p>Now that you understand the different data types and options available for parameters, let&#8217;s look at how to create parameters in a report.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Multiple, Discrete and Range Values A parameter has the flexibility to store a single value, a range of values, or a combination of the two. This gives you a lot to think about when deciding which is appropriate for each parameter. Since these three options can be used in conjunction with each other, it&#8217;s best [&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-84","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\/84","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=84"}],"version-history":[{"count":0,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.crystalreportsonlinetraining.com\/training\/wp-json\/wp\/v2\/tags?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}