{"id":3547,"date":"2016-06-15T03:00:36","date_gmt":"2016-06-14T19:00:36","guid":{"rendered":"http:\/\/www.finereport.com\/en\/?p=3547"},"modified":"2019-10-14T16:18:11","modified_gmt":"2019-10-14T08:18:11","slug":"template-parameter","status":"publish","type":"post","link":"https:\/\/frg.fineres.com\/en\/2016\/06\/15\/template-parameter\/","title":{"rendered":"Detail of Template Parameter."},"content":{"rendered":"<p>Template parameter of Finereport <a href=\"http:\/\/www.finereport.com\/en\/\" target=\"_blank\"><span style=\"color:blue;\">BI<\/span><\/a> means the parameter that is only applicable to current template, which is to be used with filter conditions.<\/p>\n<h3>1. Description<\/h3>\n<p>Template parameter in our <a title=\"FineReport BI and reporting tool report designer\" href=\"http:\/\/www.finereport.com\/en\/features\/report-designer\" target=\"_blank\">report designer<\/a> means the parameter that is only applicable to current template, which is to be used with filter conditions. It means that the data set takes out all data and template parameter will filter all useful data in data extension. The template parameter needs to be used with data column filtering.<\/p>\n<h3>2. Creating steps<\/h3>\n<p><strong>2.1 Open report<\/strong><\/p>\n<p><strong>2.2 Define template parameter<\/strong><\/p>\n<p>Click <span style=\"color: purple;\">Template &gt; Template Parameter<\/span> menu to add an area parameter default as \u201cNorth China\u201d, as shown below:<\/p>\n<p><img class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/201661401.png\" alt=\"\" \/><\/p>\n<p><strong>2.3 Set parameter filter<\/strong><\/p>\n<p>When previewing template in report designer at this time, you will find the data column still extends all data in the data set. Therefore, template parameter is required for filtering. Double click the Area Data Column cell, and click Filter tab. The Condition will be Area = Parameter $ Area, as shown below:<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/201661402.png\" alt=\"\" width=\"756\" height=\"273\" \/><\/p>\n<p><span style=\"color: red;\"> Note: Select Data Type as Parameter, and the drop-down box will list names of all available parameters. Directly select one.<\/span><\/p>\n<p><strong>2.4 Create parameter interface<\/strong><\/p>\n<p>Click the Pen at the Parameter Module to make the Parameter Interface in an editable status. At the right bottom corner of the Parameter Interface will display the parameter names with no control, as shown below:<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/201661403.png\" alt=\"\" width=\"701\" height=\"279\" \/><\/p>\n<p><span style=\"color: red;\"> Note: Parameter and control are bound via parameter name. That means, if the control name and the parameter name are same, they are successfully bound. If a parameter is bound to a control, it means that an assignment to control at web side is equivalent to an assignment to parameter. Click non-generated parameter, and the control will be automatically bound to the parameter.<\/span><\/p>\n<p>Click Add All to bind all parameters to controls and the controls will be displayed in the Parameter Interface. Here, controls include assignment controls corresponding to each parameter, all tab controls and query buttons. Default parameter interface is as shown below:<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/201661404.png\" alt=\"\" width=\"722\" height=\"225\" \/><\/p>\n<p>Click Set button in the Control and select Parameter Control Type.<\/p>\n<p><span style=\"color: red;\">Note: Aside from clicking Add All, you can also directly drag the control from Control bar to the Parameter Interface. Change the control name as the parameter name to bind the control with parameter. In this way, control assignment will be parameter assignment.<\/span><\/p>\n<p><strong>2.5 Save and issue reports<\/strong><\/p>\n<p>Save report and take a page break preview. Change the Parameter Value as \u201cEast China\u201d to query the data of East China.<\/p>\n<p><img class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/201661405.png\" alt=\"\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Template parameter of Finereport BI means the parameter&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[111],"tags":[117],"_links":{"self":[{"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/posts\/3547"}],"collection":[{"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/comments?post=3547"}],"version-history":[{"count":6,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/posts\/3547\/revisions"}],"predecessor-version":[{"id":8256,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/posts\/3547\/revisions\/8256"}],"wp:attachment":[{"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/media?parent=3547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/categories?post=3547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/tags?post=3547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}