1 line
5.4 KiB
Plaintext
1 line
5.4 KiB
Plaintext
{"Name":"z_table layout parent child grandchild","Active":true,"Notes":"","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"<html>\n<body>\t\n\n\t<p>Examples within this report template of how to access showing parent (i.e. property of the Work Order) child (i.e. property of the Work Order Item) and grandchild (property of Labor) all on same row</p>\n\t<table><!--beginning of your table-->\n\n\t<thead><!-- this indicates start of your table header section -->\n\t\t<tr><!-- this indicates start of one row in your thead -->\n\t\t\t<th>{{ayT 'WorkOrder'}}</th> <!-- The text in <th> elements are bold and centered by default, can also override by setting specifics in your CSS -->\n\t\t\t<th>{{ayT 'WorkOrderItemWorkOrderStatusID'}}</th>\n\t\t\t<th>{{ayT 'WorkOrderItemLaborServiceStartDate'}}</th>\n\t\t\t<th>{{ayT 'AuthorizationRoleTech'}}</th>\n\t\t</tr><!-- this indicates end of that one row in your thead -->\n\t</thead><!-- this indicates end of your table header section -->\n\n\t{{#each ayReportData}}<!-- this #each encompasses the area that repeats for each object (i.e. each WO) in your Sample Data -->\n\t<!-- if want the header repeated for every WO, the #each to encompass the thead area too, otherwise encompass the tbody -->\t\n\t<tbody>\t<!-- this indicates start of your table body section -->\t\n\t\t{{#each Items}} <!-- this #each encompasses the area that repeats for each Child object (i.e. each Work Order Item) in your Sample Data -->\n\t\t\t{{#each Labors}}\n\t\t\t<tr><!-- this indicates start of one row in your tbody -->\n\t\t\t\t<td class=\"centerlean\">{{../../Serial}}</td> <!-- note the ../../ in front of the Property name in the mustache to display a value from a property two 'levels' up - in this case the Work Order Number-->\n\t\t\t\t<td>{{../WorkOrderItemStatusNameViz}}</td> <!--use a ../ in front of the Property name in the mustache to display a value from a property one 'level' up - in this case the WorkorderItem Status -->\n\t\t\t\t<td class=\"fontgreen\">{{ServiceStartDate}}</td><!-- where for a Labor property, just use the Property name within the mustaches-->\n\t\t\t\t<td>{{UserViz}}</td><!-- where for a Labor property, just use the Property name within the mustaches-->\n\t\t\t</tr>\n\t\t\t{{/each}}<!-- this closes the emcompassed area that repeats for the GrandChild object (i.e. each Labor) in your Sample Data -->\n\t\t{{/each}}<!-- this closes the emcompassed area that repeats for the Child object (i.e. each Work Order Item) in your Sample Data -->\t\t\n\t</tbody>\n\t{{/each}}<!-- this closes the emcompassed area that repeats for each object (i.e. each WO) in your Sample Data -->\n\n\t<tfoot class=\"footertext\"><!-- this applies specific CSS class attributes to all of tfoot and its td's -->\n\t\t<tr>\n\t\t\t<td>footer stuff 1</td>\n\t\t\t<td colspan=\"2\">expands across two columns with or without having to have text</td><!-- this inline colspan spans multiple columns -->\n\t\t\t<td>footer stuff 3</td>\n\t\t</tr>\n\t</tfoot><!-- this indicates end of your table footer section -->\t\n\n\t</table><!-- end of your table-->\t\n\n</body>\n</html>","Style":".singlePage\n{\npage-break-after: always;\n}\n\n.footertext {\n font-size: 14pt;\n font-style: italic;\n background-color: lightsteelblue;\n}\n\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n\ntable { \n border-collapse: collapse;\n white-space: pre-wrap;\n width: 100%;\n table-layout: fixed; /* the # of columns set in the first row of the thead will be fixed and applied throughout table and rows */\n }\n\nth {\n border-bottom: solid 1pt #9e9e9e;\n height: 50px;\n color: #9e9e9e;\n font-size: 11pt;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\n}\n\n\ntbody tr:nth-child(even) {\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\n}\n\n\n.rightlean {\n text-align: right;\n}\n.leftlean {\n text-align: left;\n}\n.centerlean {\n text-align: center;\n}\n\n\n.fontgreen {\n color: green;\n}\n.fontblue {\n color: blue;\n}\n.fontred {\n color:red;\n}\n\n","JsPrerender":"async function ayPrepareData(reportData){ \n //this function (if present) is called with the report data \n //before the report is rendered\n //modify data as required here and return it to change the data before the report renders\n //see the help documentation for details\n\n await ayGetTranslations([\"WorkOrder\", \"WorkOrderItemWorkOrderStatusID\", \"WorkOrderItemLaborServiceStartDate\", \"AuthorizationRoleTech\" ]);\n\n return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\nHandlebars.registerHelper('loud', function (aString) {\n return aString.toUpperCase()\n})","RenderType":0,"HeaderTemplate":"<span style=\"font-size:6pt;width: 94%; text-align:left; \"> Todays date: <span class=\"date\"></span> set in PDF Options</span>","FooterTemplate":"<span style=\"font-size:6pt;width: 94%; text-align: right; \"> set in PDF Options Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span> </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"10mm","MarginOptionsRight":"10mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000} |