{"id":3436,"date":"2016-05-24T03:00:05","date_gmt":"2016-05-23T19:00:05","guid":{"rendered":"http:\/\/www.finereport.com\/en\/?p=3436"},"modified":"2019-10-24T14:47:08","modified_gmt":"2019-10-24T06:47:08","slug":"finereport-template-design","status":"publish","type":"post","link":"https:\/\/frg.fineres.com\/en\/2016\/05\/24\/finereport-template-design\/","title":{"rendered":"FineReport Template Design"},"content":{"rendered":"<p>We will introduce Template Design of FineReport <a title=\"reporting software\" href=\"\/en\/\" target=\"_blank\">reporting software<\/a> in this article.This article includes Design Style,Bind Data Column,Parameter Interface and Define Chart.<\/p>\n<h3>1. Design Style<\/h3>\n<p>The effect is as shown below:<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/20165231.png\" alt=\"\" width=\"536\" height=\"223\" \/><\/p>\n<p><strong>Title:<\/strong> Merge cells A1 to D2 and input Region Sales Situation.<\/p>\n<p><strong>Border:<\/strong> Select area from A3 to D5 and click<img loading=\"lazy\" class=\"alignnone\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/20165232.png\" alt=\"\" width=\"34\" height=\"34\" \/>in the toolbar, open the drop-down menu and select<img loading=\"lazy\" class=\"\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/20165232.png\" alt=\"\" width=\"31\" height=\"31\" \/>to add frames both inside and outside.<\/p>\n<p><strong>Lines:<\/strong> Merge cells A3 to B3, right click the cell and select Cell Element. In the drop-down menu, click Insert Slope Lines. The system will pop up a dialog box to edit the slope line, input information we&#8217;d like to add: product |sales| region. Users can also adjust the words through adding spaces. Effect is as shown below\uff1a<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/20165233.png\" alt=\"\" width=\"519\" height=\"275\" \/><\/p>\n<h3>2. Bind Data Column<\/h3>\n<p>The final effect is as shown below\uff1a<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/20165234.png\" alt=\"\" width=\"482\" height=\"200\" \/><\/p>\n<p><strong>1.1 Bind Data Column<\/strong><\/p>\n<p>Drag the data column to the cell and set properties. The setting position and method is as shown below\uff1a<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/20165235.png\" alt=\"\" width=\"677\" height=\"349\" \/><\/p>\n<p>Following the method below and drag other data columns to the corresponding cells and set properties as shown below\uff1a<\/p>\n<table class=\"centered\" style=\"height: 1240px;\" border=\"1\" width=\"764\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">Cell<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">Data Set<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">Data Columns<\/td>\n<td style=\"text-align: center;\" width=\"200\" height=\"150\">Attributes<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">C3<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">ds1<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">product<\/td>\n<td style=\"text-align: center;\" width=\"200\" height=\"150\">Landscape, Center<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">A4<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">ds1<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">region<\/td>\n<td style=\"text-align: center;\" width=\"200\" height=\"150\">Portrait, Center<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">B4<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">ds1<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">sales<\/td>\n<td style=\"text-align: center;\" width=\"200\" height=\"150\">Portrait, Center<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">C4<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">ds1<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">salesVolume<\/td>\n<td style=\"text-align: center;\" width=\"200\" height=\"150\">No extend, Data Setting\uff1aSummary|Sum, Center<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">D4<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">ds2<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">grossSales<\/td>\n<td style=\"text-align: center;\" width=\"200\" height=\"150\">No extend, Data Setting\uff1aSummary|Sum, Center<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">C5<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">\u2014<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">\u2014<\/td>\n<td style=\"text-align: center;\" width=\"200\" height=\"150\">=sum(C4)<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">D5<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">\u2014<\/td>\n<td style=\"text-align: center;\" width=\"150\" height=\"150\">\u2014<\/td>\n<td style=\"text-align: center;\" width=\"200\" height=\"150\">=sum(D4)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>2.2 Multi-dataset Linkage<\/strong><\/p>\n<p>Because the data comes from two different datasets, it is required to use data filter to build connections between them.<\/p>\n<p>Select cell D4 and click the <span style=\"color: purple;\">Filter<\/span> button in the upper right corner of the property panel as shown below\uff1a<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/20165236.png\" alt=\"\" width=\"333\" height=\"387\" \/><\/p>\n<p>Open Filter setting panel and add conditions as shown below, make sales of ds2 equal sales of ds1.<\/p>\n<p><img class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/20165237.jpg\" alt=\"\" \/><\/p>\n<h3>3. Parameter Interface<\/h3>\n<p>In most cases, users need to use parameters to display part of the data that meets certain requirements. Here, parameter design is actually a dynamic process of filtering data, helping the user to realize real-time interaction with data.<\/p>\n<p>FineReport has an embedded parameter panel to allow users to adjust the positions of parameters; moreover, users can get different data selection style through controls setting. We will introduce the design process of parameter query on the basis of previous report.<\/p>\n<p><strong>3.1 Layout of Parameter Panel<\/strong><\/p>\n<p>Click Parameter Panel and you will enter the editing interface. In New Template and Datasetsection\uff0cwe defined parameter &#8220;region&#8221; in dataset ds1.<\/p>\n<p>The defined parameters will display in the lower-right corner; click <span style=\"color: purple;\">Add All<\/span>, FineReport will use default layout to generate parameter interface, where users can adjust the panel as they wish.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/20165238.png\" alt=\"\" width=\"377\" height=\"333\" \/><\/p>\n<p><strong>3.2 Style of Parameter Control<\/strong><\/p>\n<p>Select ComboBox as the parameter control\u2019s type as shown below.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/20165239.png\" alt=\"\" width=\"702\" height=\"417\" \/><\/p>\n<h3>4. Define Chart<\/h3>\n<p>Apart from table, FineReport can also use chart to visually display data. We will add chart display on the basis of the previous template to show every product&#8217;s sales conditions.<\/p>\n<p>We will select the cell data source, which means the data come form cells.<\/p>\n<p><strong>4.1 Insert Chart<\/strong><\/p>\n<p>Merge cells from A7 to D18 and click <span style=\"color: purple;\">Insert&gt;Cell Element&gt;Insert Chart<\/span> on menu, The dialog box will pop up as shown below. Here we choose <span style=\"color: purple;\">Column Chart<\/span> and click OK.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/201652310.png\" alt=\"\" width=\"710\" height=\"649\" \/><\/p>\n<p>Select the chart, and then choose the Chart Properties-Data in the upper-right corner. Set Datasource by default.<\/p>\n<p>Input formula in the Category textbox: =B4.<\/p>\n<p>Set Series Name and Series Value separately =C3 and =C4.<\/p>\n<p>The effect is as shown below.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/201652311.png\" alt=\"\" width=\"713\" height=\"369\" \/><\/p>\n<p>Finally, clickSave.<\/p>\n<p><strong>4.2 Set Expansion Properties<\/strong><\/p>\n<p>We only want the chart here to reflect the whole conditions, so the Left and Upper Parent should be set None.<\/p>\n<p>Select the chart and Cell Properties-Expansion setting panel is in the lower-right corner as below.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter\" src=\"http:\/\/www.finereport.com\/en\/wp-content\/themes\/fanruan\/images\/201652312.png\" alt=\"\" width=\"679\" height=\"278\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We will introduce Template Design of FineReport reporti&#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\/3436"}],"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=3436"}],"version-history":[{"count":5,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/posts\/3436\/revisions"}],"predecessor-version":[{"id":8464,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/posts\/3436\/revisions\/8464"}],"wp:attachment":[{"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/media?parent=3436"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/categories?post=3436"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/frg.fineres.com\/en\/wp-json\/wp\/v2\/tags?post=3436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}