{"id":14078,"date":"2018-05-08T15:39:14","date_gmt":"2018-05-08T15:39:14","guid":{"rendered":"https:\/\/kb.sambapos.com\/?p=14078"},"modified":"2020-09-30T14:04:11","modified_gmt":"2020-09-30T14:04:11","slug":"9-1-7-custom-report-table-views","status":"publish","type":"post","link":"https:\/\/kb.sambapos.com\/en\/9-1-7-custom-report-table-views\/","title":{"rendered":"9.1.7. Custom Report Table Views"},"content":{"rendered":"<h2 id=\"introduction\" class=\"sectionedit2\">Introduction<\/h2>\n<div class=\"level2\">\n<p>You can convert a Custom Report to a\u00a0<code>Table View<\/code>\u00a0for more sorting, filtering, grouping or data analyzing features. Adding\u00a0<code>#<\/code>\u00a0char in front of a table name converts report to a table.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14079 size-large\" src=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-01-1024x641.jpg\" alt=\"\" width=\"640\" height=\"401\" srcset=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-01-1024x641.jpg 1024w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-01-300x188.jpg 300w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-01-768x481.jpg 768w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-01.jpg 1058w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>This is a simple custom report that lists tickets in date range. In here it is used this\u00a0<a class=\"wikilink1\" title=\"custom_report_templates\" href=\"https:\/\/sambapos.com\/wiki\/doku.php\/custom_report_templates\">Custom Report Template<\/a>\u00a0to generate that report.<\/p>\n<table style=\"width: 100%; border-collapse: collapse; border-color: #dedede; background-color: #dedede;\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\"><code>[Tickets:1,1,1,1]<br \/>\n&gt;Ticket No|Date|Time|Total Amount {REPORT TICKET DETAILS:T.TicketNumber,T.Date,T.Time,T.TotalAmount}<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>You can convert this report to a table by adding\u00a0<code>#<\/code>\u00a0in front of table name. So\u00a0<code>[Tickets:1,1,1,1]<\/code>\u00a0line becomes\u00a0<code>[#Tickets:1,1,1,1]<\/code>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14083 size-large\" src=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-02-1024x641.jpg\" alt=\"\" width=\"640\" height=\"401\" srcset=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-02-1024x641.jpg 1024w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-02-300x188.jpg 300w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-02-768x481.jpg 768w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-02.jpg 1058w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<div class=\"level2\">\n<p>You can click column headers for sorting or right click on headers for advanced options.<\/p>\n<\/div>\n<h2 id=\"setting_column_types\" class=\"sectionedit3\">Setting Column Types<\/h2>\n<div class=\"level2\">\n<p>You can see on the screen shots\u00a0<code>Total Amount<\/code>\u00a0column is left aligned. That means our table processes this value as a string value. You can set type of a column by using column type indicators. It will be added\u00a0<code>[C]<\/code>\u00a0in front of Total Amount header to format this value as Currency.<\/p>\n<table style=\"width: 100%; border-collapse: collapse; border-color: #dedede; background-color: #dedede;\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\"><code>[Tickets:1,1,1,1]<br \/>\n&gt;Ticket No|Date|Time|[C]Total Amount {REPORT TICKET DETAILS:T.TicketNumber,T.Date,T.Time,T.TotalAmount}<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>You can use\u00a0<code>[N]<\/code>\u00a0to format a column as a\u00a0<code>Numeric<\/code>\u00a0column. Useful for formatting non financial numbers such as quantities.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14088 \" src=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-03-1.jpg\" alt=\"\" width=\"640\" height=\"401\" srcset=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-03-1.jpg 979w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-03-1-300x188.jpg 300w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-03-1-768x481.jpg 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<div class=\"level2\">\n<p>Now\u00a0<code>Total Amount<\/code>\u00a0column recognized as a currency column. In further sections it will be seen how to enable total summary footer for that column.<\/p>\n<\/div>\n<h2 id=\"setting_table_height\" class=\"sectionedit4\">Setting Table Height<\/h2>\n<div class=\"level2\">\n<p>In table view mode you can set a height for the table.<\/p>\n<table style=\"width: 100%; border-collapse: collapse; border-color: #dedede; background-color: #dedede;\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\"><code>[#Tickets:1,1,1,1:500]<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"level2\">\n<p>500 means 500px height. If you do not set a value default value is 300px and if you set it as\u00a0<code>0<\/code>\u00a0table will have unlimited height. Table width is determined by report width.<\/p>\n<\/div>\n<h2 id=\"changing_saving_table_settings\" class=\"sectionedit5\">Changing &amp; Saving Table Settings<\/h2>\n<div class=\"level2\">\n<p>You can resize columns, change order, change grouping or change sorting. If you want to store these settings right click on table and click\u00a0<code>Save Settings<\/code>\u00a0command.<\/p>\n<p>By clicking\u00a0<code>View Editor<\/code>\u00a0commands you can enable advanced editing mode. You&#8217;ll find a lot of settings there.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14091 size-large\" src=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-04-1024x641.jpg\" alt=\"\" width=\"640\" height=\"401\" srcset=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-04-1024x641.jpg 1024w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-04-300x188.jpg 300w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-04-768x481.jpg 768w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-04.jpg 1058w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Here are some useful settings. You can type their name on search box to find them easily.<\/p>\n<table class=\"inline\">\n<tbody>\n<tr class=\"row0\">\n<td class=\"col0\">ShowSearchPanelMode<\/td>\n<td class=\"col1\">Default-Always-Never<\/td>\n<td class=\"col2\">Displays search panel.<\/td>\n<\/tr>\n<tr class=\"row1\">\n<td class=\"col0\">ShowVerticalLines<\/td>\n<td class=\"col1\">True-False<\/td>\n<td class=\"col2\">Displays Vertical Lines or not.<\/td>\n<\/tr>\n<tr class=\"row2\">\n<td class=\"col0\">ShowHorizontalLines<\/td>\n<td class=\"col1\">True-False<\/td>\n<td class=\"col2\">Displays Horizontal Lines or not.<\/td>\n<\/tr>\n<tr class=\"row3\">\n<td class=\"col0\">ShowColumnHeaders<\/td>\n<td class=\"col1\">True-False<\/td>\n<td class=\"col2\">Displays Column Headers or not.<\/td>\n<\/tr>\n<tr class=\"row4\">\n<td class=\"col0\">ShowIndicator<\/td>\n<td class=\"col1\">True-False<\/td>\n<td class=\"col2\">Displays Row indicator.<\/td>\n<\/tr>\n<tr class=\"row5\">\n<td class=\"col0\">AutoWidth<\/td>\n<td class=\"col1\">True-False<\/td>\n<td class=\"col2\">Automatically fits column widths to table width.<\/td>\n<\/tr>\n<tr class=\"row6\">\n<td class=\"col0\">ShowAutoFilterRow<\/td>\n<td class=\"col1\">True-False<\/td>\n<td class=\"col2\">Displays excel like auto filter row to filter rows.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 id=\"formatting_total_summaries\" class=\"sectionedit7\">Formatting Total Summaries<\/h3>\n<div class=\"level3\">\n<p>When you enable View Editor &gt; ShowTotalSummary setting a footer bar will appear. Right click under\u00a0<code>Total Amount<\/code>\u00a0column and choose\u00a0<code>Sum<\/code>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14095 size-large\" src=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-05-1-1024x641.jpg\" alt=\"\" width=\"640\" height=\"401\" srcset=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-05-1-1024x641.jpg 1024w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-05-1-300x188.jpg 300w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-05-1-768x481.jpg 768w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-05-1.jpg 1057w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>That will display the sum of\u00a0<code>Total Amount<\/code>\u00a0column.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14097 size-large\" src=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-06-1024x640.jpg\" alt=\"\" width=\"640\" height=\"400\" srcset=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-06-1024x640.jpg 1024w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-06-300x187.jpg 300w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-06-768x480.jpg 768w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-06.jpg 1060w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>Click\u00a0<code>Customize<\/code>\u00a0to change how sum value appears.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14099 size-large\" src=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-07-1024x641.jpg\" alt=\"\" width=\"640\" height=\"401\" srcset=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-07-1024x641.jpg 1024w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-07-300x188.jpg 300w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-07-768x481.jpg 768w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-07.jpg 1058w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h2 id=\"custom_report_widget_settings_for_table_view\" class=\"sectionedit8\">Custom Report Widget Settings for Table View<\/h2>\n<div class=\"level2\">\n<p>It is possible to add this report as a\u00a0<a class=\"wikilink2\" title=\"widgets\" href=\"https:\/\/sambapos.com\/wiki\/doku.php\/widgets\" rel=\"nofollow\">Widget<\/a>\u00a0in a\u00a0<a class=\"wikilink2\" title=\"custom_entity_screens\" href=\"https:\/\/sambapos.com\/wiki\/doku.php\/custom_entity_screens\" rel=\"nofollow\">Custom Entity Screen<\/a>.\u00a0<a class=\"wikilink1\" title=\"custom_report_viewer_widget\" href=\"https:\/\/sambapos.com\/wiki\/doku.php\/custom_report_viewer_widget\">Custom Report Viewer Widget<\/a>\u00a0displays custom reports in entity screens.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14101 \" src=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-08.jpg\" alt=\"\" width=\"640\" height=\"474\" srcset=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-08.jpg 893w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-08-300x222.jpg 300w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-08-768x569.jpg 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>You can use this table for advanced UI customization.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-14103 \" src=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-09.jpg\" alt=\"\" width=\"640\" height=\"475\" srcset=\"https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-09.jpg 893w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-09-300x222.jpg 300w, https:\/\/kb.sambapos.com\/wp-content\/uploads\/2018\/05\/9-1-7-Custom-Report-Table-Views-09-768x569.jpg 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<h3><\/h3>\n<h3 id=\"setting_mappings\" class=\"sectionedit9\">Setting Mappings<\/h3>\n<div class=\"level3\">\n<p><strong>Syntax: &lt;setting name&gt;=&lt;table name&gt;.&lt;field no&gt;<\/strong><\/p>\n<p>In\u00a0<code>Setting Mappings<\/code>\u00a0editor you can map table column values to\u00a0<a class=\"wikilink2\" title=\"custom_settings\" href=\"https:\/\/sambapos.com\/wiki\/doku.php\/custom_settings\" rel=\"nofollow\">Custom Settings<\/a>.\u00a0<code>TICKETNUMBER=Tickets.1<\/code>\u00a0means we can access 1st value of\u00a0<code>Tickets<\/code>\u00a0table (we named it as Tickets inside report template) with\u00a0<code>[:TICKETNUMBER]<\/code>\u00a0tag. As 1st field is in our report template is\u00a0<code>TicketNumber<\/code>,\u00a0<code>TICKETNUMBER<\/code>\u00a0setting becomes selected row&#8217;s Ticket Number value as we navigate through rows. You can map multiple values to different settings by adding a separate line for each setting in\u00a0<code>Setting Mappings<\/code>editor.<\/p>\n<p><span class=\"wrap_tip \">Tip;<\/span>\u00a0Field numbers are relative to report template. Changing column orders or visibility through table settings won&#8217;t change field numbers.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Introduction You can convert a Custom Report to a\u00a0Table View\u00a0for more sorting, filtering, grouping or data analyzing features. Adding\u00a0#\u00a0char in front of a table name converts report to a table. This is a simple custom report that lists tickets in date range. In here it is used this\u00a0Custom Report Template\u00a0to generate that report. [Tickets:1,1,1,1] &gt;Ticket [&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-14078","post","type-post","status-publish","format-standard","hentry","category-reports"],"_links":{"self":[{"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/posts\/14078","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=14078"}],"version-history":[{"count":8,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/posts\/14078\/revisions"}],"predecessor-version":[{"id":25080,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/posts\/14078\/revisions\/25080"}],"wp:attachment":[{"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/media?parent=14078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/categories?post=14078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.sambapos.com\/en\/wp-json\/wp\/v2\/tags?post=14078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}