{"id":13915,"date":"2018-05-07T14:59:41","date_gmt":"2018-05-07T14:59:41","guid":{"rendered":"https:\/\/kb.sambapos.com\/?p=13915"},"modified":"2020-09-28T15:39:03","modified_gmt":"2020-09-28T15:39:03","slug":"9-1-1-custom-report-templates","status":"publish","type":"post","link":"https:\/\/kb.sambapos.com\/en\/9-1-1-custom-report-templates\/","title":{"rendered":"9.1.1. Custom Report Templates"},"content":{"rendered":"<p>Main Menu &gt; Manage &gt; Reports &gt; Add Report &gt;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-25008 size-large\" src=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-00-1024x546.jpg\" alt=\"\" width=\"640\" height=\"341\" srcset=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-00-1024x546.jpg 1024w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-00-300x160.jpg 300w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-00-768x409.jpg 768w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-00.jpg 1366w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Add this Custom Report Template inside report.<\/p>\n<p>Custom Report 1<\/p>\n<p><code>[Table 1:1,1]<br \/>\n&gt;Sub Row 1|<br \/>\nCell 1|Cell 2<br \/>\nCell 3|Cell 4<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-25010 size-large\" src=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-01-1-1024x546.jpg\" alt=\"\" width=\"640\" height=\"341\" srcset=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-01-1-1024x546.jpg 1024w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-01-1-300x160.jpg 300w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-01-1-768x409.jpg 768w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-01-1.jpg 1366w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>This is what each template line displays.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-25012 size-large\" src=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-02-1024x546.jpg\" alt=\"\" width=\"640\" height=\"341\" srcset=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-02-1024x546.jpg 1024w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-02-300x160.jpg 300w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-02-768x409.jpg 768w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/Editing-Reports-Section-02.jpg 1366w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p class=\"code \">\n<h3><span style=\"font-family: georgia, palatino, serif;\">Formatting Tables<\/span><\/h3>\n<p>When you add a&nbsp;<code>Table Section<\/code>&nbsp;all lines added under that section will appear as a table row. The Syntax for Table Section is<\/p>\n<p><strong>[Table Name:Columns]<\/strong><\/p>\n<p>While defining columns you also define columns sizes. If you need two columns with same size you&#8217;ll add&nbsp;<strong>1,1<\/strong>.<\/p>\n<p><strong>[Table Name:1,1]<\/strong><\/p>\n<p>Column sizes are defined as percents.&nbsp;<strong>Percent = Total number of sizes \/ Column Size.<\/strong>&nbsp;So it will create two columns with %50 size.<\/p>\n<p id=\"examples\" class=\"sectionedit3\">Examples:<\/p>\n<p><code>[Table Name:2,1]<br \/>\nit will create two columns. 3\/2 (%66) for first column and 3\/1 (%33) for second column.<\/code><\/p>\n<p><code>[Table Name:2,1,2]<br \/>\nIt will create three columns. 5\/2 (%40) for first, 5\/1 (%20) and 5\/2 (%40) for third column.<\/code><\/p>\n<h3>Formatting Rows<\/h3>\n<p>Row values are delimited with&nbsp;<code>|<\/code>&nbsp;(pipe)char. The number of pipes for each row should match table&#8217;s column count -1<\/p>\n<p><code>[Table 1:1,1] --- Creates Two Columns<br \/>\nCell 1|Cell 2 --- Has Two values separated with | char.<\/code><\/p>\n<h3 id=\"spanning_rows\" class=\"sectionedit5\">Spanning Rows<\/h3>\n<div class=\"level3\">\n<p>Empty Values will Span. Cell counts should match with column count<\/p>\n<\/div>\n<h4 id=\"examples1\">Examples<\/h4>\n<table style=\"height: 97px; width: 100%; border-collapse: collapse; border-color: #dedede; background-color: #dedede;\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\"><code>[Table 1:1,1]<br \/>\nCell 1|Cell 2<br \/>\nCell 3|&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ---- This row will appear as a single cell<br \/>\nCell 4|Cell 5<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<table style=\"width: 100%; border-collapse: collapse; border-color: #dedede; background-color: #dedede;\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\"><code>[Table 1:1,1,1] ---- Three Columns<br \/>\nCell 1|Cell 2|Cell 3<br \/>\nCell 3||Cell 4 ---- Two Pipes used to match columns<br \/>\nCell 5|Cell 6|Cell 7<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"bold_rows\" class=\"sectionedit6\">Bold Rows<\/h3>\n<div class=\"level3\">\n<p>Adding&nbsp;<code>&gt;<\/code>&nbsp;char before a row will display it as a highlighted bold row. Useful for highlighting headers, splitting reports to sections or highlighting totals.<\/p>\n<\/div>\n<h2 id=\"multiple_tables\" class=\"sectionedit7\">Multiple Tables<\/h2>\n<div class=\"level2\">\n<p>A custom report may contain multiple tables.<\/p>\n<p><code>[Table 1:1,1]<br \/>\nValue 1|Value2<\/code><br \/>\n<code>[Table 2:1,1]<br \/>\nValue 3|Value4<\/code><\/p>\n<h2 id=\"column_alignments\" class=\"sectionedit8\">Column Alignments<\/h2>\n<div class=\"level2\">\n<p>By default all columns are left aligned. If you add a space before column size value it will align to right. Generally it is used to align financial values to right for easier reading.<\/p>\n<p><code>[Table 1:1, 1] ---- Second 1 starts with a space char<br \/>\nValue 1|Value2 ---- Value2 column will align to right.<\/code><\/p>\n<table style=\"width: 100%; border-collapse: collapse; border-color: #dedede; background-color: #dedede;\">\n<tbody>\n<tr><\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Main Menu &gt; Manage &gt; Reports &gt; Add Report &gt; Add this Custom Report Template inside report. Custom Report 1 [Table 1:1,1] &gt;Sub Row 1| Cell 1|Cell 2 Cell 3|Cell 4 This is what each template line displays. Formatting Tables When you add a&nbsp;Table Section&nbsp;all lines added under that section will appear as a table [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-13915","post","type-post","status-publish","format-standard","hentry","category-reports"],"_links":{"self":[{"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/posts\/13915","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/comments?post=13915"}],"version-history":[{"count":53,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/posts\/13915\/revisions"}],"predecessor-version":[{"id":25058,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/posts\/13915\/revisions\/25058"}],"wp:attachment":[{"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/media?parent=13915"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/categories?post=13915"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/tags?post=13915"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}