This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"Name":"💡 Wiki displayed PO","Active":true,"Notes":"","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n<body>\t\n\t<table>\n\n\t<thead>\n\t\t<tr>\n\t\t\t<th colspan=\"1\">column header 1</th>\n\t\t\t<th colspan=\"1\">column header 2</th>\n\t\t</tr>\n\t</thead>\n\n\t{{#each ayReportData}}<!-- this #each encompasses the area that repeats for each object (i.e. each PO) in your Sample Data -->\n\t<!-- if want the header repeated for every PO, 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\t<tr><!-- this indicates start of one row in your tbody -->\n\t\t\t\t<td colspan=\"1\">{{ayT 'PurchaseOrder'}} {{Serial}}</td>\n\t\t\t\t<td colspan=\"1\">{{ayWiki Wiki}}</td> <!-- to display the Wiki, prefix ayWiki to the key encompass both in the mustache -->\n\t\t\t</tr>\n\t</tbody><!-- this indicates end of your table body section -->\n\t{{/each}}<!-- this closes the emcompassed area that repeats for each object (i.e. each PO) 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 colspan=\"2\">and some footer text</td><!-- this inline colspan spans multiple columns -->\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: pink;\n}\n\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n color: #9e9e9e;\n text-align: center;\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 font-size: 13pt; \n color: #9e9e9e;\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([\"PurchaseOrder\" ]);\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}
|
||||
{"Name":"z_Wiki displayed PO","Active":true,"Notes":"","Roles":124927,"AType":26,"IncludeWoItemDescendants":false,"Template":"<html>\n<body>\t\n\t<table>\n\n\t<thead>\n\t\t<tr>\n\t\t\t<th colspan=\"1\">column header 1</th>\n\t\t\t<th colspan=\"1\">column header 2</th>\n\t\t</tr>\n\t</thead>\n\n\t{{#each ayReportData}}<!-- this #each encompasses the area that repeats for each object (i.e. each PO) in your Sample Data -->\n\t<!-- if want the header repeated for every PO, 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\t<tr><!-- this indicates start of one row in your tbody -->\n\t\t\t\t<td colspan=\"1\">{{ayT 'PurchaseOrder'}} {{Serial}}</td>\n\t\t\t\t<td colspan=\"1\">{{ayWiki Wiki}}</td> <!-- to display the Wiki, prefix ayWiki to the key encompass both in the mustache -->\n\t\t\t</tr>\n\t</tbody><!-- this indicates end of your table body section -->\n\t{{/each}}<!-- this closes the emcompassed area that repeats for each object (i.e. each PO) 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 colspan=\"2\">and some footer text</td><!-- this inline colspan spans multiple columns -->\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: pink;\n}\n\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n color: #9e9e9e;\n text-align: center;\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 font-size: 13pt; \n color: #9e9e9e;\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([\"PurchaseOrder\" ]);\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}
|
||||
@@ -1 +1 @@
|
||||
{"Name":"💡 Wiki displayed","Active":true,"Notes":"","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"<html>\n<body>\t\n\t<table><!-- beginning of your table-->\t\n\n\t<thead>\n\t\t<tr>\n\t\t\t<th colspan=\"1\">column header text repeats every page</th>\n\t\t\t<th colspan=\"1\">column header 2</th>\n\t\t</tr>\n\t</thead>\n\n\t{{#each ayReportData}}<!-- this #each encompasses the area that repeats for each object (i.e. each PO) in your Sample Data -->\n\t<!-- if want the header repeated for every PO, 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\t<tr><!-- this indicates start of one row in your tbody -->\n\t\t\t\t<td colspan=\"1\">{{ayT 'WorkOrder'}} {{Serial}}</td>\n\t\t\t\t<td colspan=\"1\">{{ayWiki Wiki}}</td> <!-- to display the Wiki, prefix ayWiki to the key encompass both in the mustache -->\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"2\"></td>\n\t\t\t</tr>\n\t</tbody><!-- this indicates end of your table body section -->\n\t{{/each}}<!-- this closes the emcompassed area that repeats for each object (i.e. each PO) 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 colspan=\"2\">and some footer text that will be repeated every page</td><!-- this inline colspan spans multiple columns -->\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.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n color: #9e9e9e;\n text-align: center;\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 font-size: 13pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\n}\n\n\ntbody tr:nth-child(odd) {\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\" ]);\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}
|
||||
{"Name":"z_Wiki displayed","Active":true,"Notes":"","Roles":124927,"AType":34,"IncludeWoItemDescendants":false,"Template":"<html>\n<body>\t\n\t<table><!-- beginning of your table-->\t\n\n\t<thead>\n\t\t<tr>\n\t\t\t<th colspan=\"1\">column header text repeats every page</th>\n\t\t\t<th colspan=\"1\">column header 2</th>\n\t\t</tr>\n\t</thead>\n\n\t{{#each ayReportData}}<!-- this #each encompasses the area that repeats for each object (i.e. each PO) in your Sample Data -->\n\t<!-- if want the header repeated for every PO, 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\t<tr><!-- this indicates start of one row in your tbody -->\n\t\t\t\t<td colspan=\"1\">{{ayT 'WorkOrder'}} {{Serial}}</td>\n\t\t\t\t<td colspan=\"1\">{{ayWiki Wiki}}</td> <!-- to display the Wiki, prefix ayWiki to the key encompass both in the mustache -->\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"2\"></td>\n\t\t\t</tr>\n\t</tbody><!-- this indicates end of your table body section -->\n\t{{/each}}<!-- this closes the emcompassed area that repeats for each object (i.e. each PO) 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 colspan=\"2\">and some footer text that will be repeated every page</td><!-- this inline colspan spans multiple columns -->\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.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 13pt; \n color: #9e9e9e;\n text-align: center;\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 font-size: 13pt; \n color: #9e9e9e;\n}\n\ntbody td {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\n}\n\n\ntbody tr:nth-child(odd) {\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\" ]);\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}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
||||
{"Name":"💡 myData search results","Active":true,"Notes":"Examples of obtaining custom search results using custom Prepare ","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n\n <div>\n <p>myData.SearchResults - Fetched dynamically from API route <strong>enum-list/list/AyaType</strong> using report template's Prepare</p>\n <p>specifically, Prepare searches for the text \"Purple\" in any object in the database and returns....</p>\n <p>{{ayJSON myData.SearchResults}}</p>\n </div>\n \n <table class=\"singlePage\"> <!--this class causes a page break for each object - for each work order -->\n <thead>\n <tr>\n <th colspan=\"5\">Column to the right displays the individual property myData.SearchResults.data.totalResultsFound obtained:</th>\n <td colspan=\"5\">{{ayJSON myData.SearchResults.data.totalResultsFound}}</td>\n </tr>\n <tr>\n <th colspan=\"5\">Column to the right displays the third array in the search results:</th>\n <td colspan=\"5\">{{ayJSON myData.SearchResults.data.searchResults.[2]}}</td>\n </tr>\n <tr>\n <th colspan=\"10\"> </th>\n </tr>\n <tr>\n <th colspan=\"10\">Below displays each record that has the search result</th>\n </tr>\n <tr>\n <th colspan=\"6\">Name</th>\n <th colspan=\"2\">Type</th>\n <th colspan=\"2\">ID</th>\n </tr>\n </thead>\n\n {{#each myData.SearchResults.data.searchResults}}<!--iterates through for each result -->\n <tbody> \n <tr>\n <td colspan=\"6\">{{name}}</td>\n <td colspan=\"2\">{{type}}</td>\n <td colspan=\"2\">{{id}}</td>\n </tr> \n </tbody> \n {{/each}}\n\n </table>\n\n </div>\n</body>\n</html>","Style":".singlePage\n{\npage-break-after: always;\n}\n\np {\n word-wrap: break-word;\n font-size: 9pt;\n}\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 11pt; \n color: #9e9e9e;\n} \n\ntable, td, th {\n border: 1px solid black;\n}\n\ntable { \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 height: 30px;\n font-size: 9pt; \n color: #9e9e9e;\n}\n\ntd {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\n text-align: center;\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\n //Put the data into the main report data object so it's available to the template\n reportData.myData={ServerInfo:await ayGetFromAPI(\"server-info\")};\n \n //Example API POST method to fetch data from api server\n let searchPostData={phrase: \"Purple\"};\n reportData.myData.SearchResults=await ayPostToAPI(\"search\", searchPostData);\n\n\t\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> </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \"> Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span> </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}
|
||||
{"Name":"z_myData search results","Active":true,"Notes":"Examples of obtaining custom search results using custom Prepare ","Roles":50538,"AType":34,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n <div>\n\n <div>\n <p>myData.SearchResults - Fetched dynamically from API route <strong>enum-list/list/AyaType</strong> using report template's Prepare</p>\n <p>specifically, Prepare searches for the text \"Purple\" in any object in the database and returns....</p>\n <p>{{ayJSON myData.SearchResults}}</p>\n </div>\n \n <table class=\"singlePage\"> <!--this class causes a page break for each object - for each work order -->\n <thead>\n <tr>\n <th colspan=\"5\">Column to the right displays the individual property myData.SearchResults.data.totalResultsFound obtained:</th>\n <td colspan=\"5\">{{ayJSON myData.SearchResults.data.totalResultsFound}}</td>\n </tr>\n <tr>\n <th colspan=\"5\">Column to the right displays the third array in the search results:</th>\n <td colspan=\"5\">{{ayJSON myData.SearchResults.data.searchResults.[2]}}</td>\n </tr>\n <tr>\n <th colspan=\"10\"> </th>\n </tr>\n <tr>\n <th colspan=\"10\">Below displays each record that has the search result</th>\n </tr>\n <tr>\n <th colspan=\"6\">Name</th>\n <th colspan=\"2\">Type</th>\n <th colspan=\"2\">ID</th>\n </tr>\n </thead>\n\n {{#each myData.SearchResults.data.searchResults}}<!--iterates through for each result -->\n <tbody> \n <tr>\n <td colspan=\"6\">{{name}}</td>\n <td colspan=\"2\">{{type}}</td>\n <td colspan=\"2\">{{id}}</td>\n </tr> \n </tbody> \n {{/each}}\n\n </table>\n\n </div>\n</body>\n</html>","Style":".singlePage\n{\npage-break-after: always;\n}\n\np {\n word-wrap: break-word;\n font-size: 9pt;\n}\nbody {\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \n}\n\n.reporttitle { \n margin-bottom: 20pt; \n font-weight: bold; \n font-size: 11pt; \n color: #9e9e9e;\n} \n\ntable, td, th {\n border: 1px solid black;\n}\n\ntable { \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 height: 30px;\n font-size: 9pt; \n color: #9e9e9e;\n}\n\ntd {\n padding: 10px;\n word-wrap: break-word;\n font-size: 9pt;\n text-align: center;\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\n //Put the data into the main report data object so it's available to the template\n reportData.myData={ServerInfo:await ayGetFromAPI(\"server-info\")};\n \n //Example API POST method to fetch data from api server\n let searchPostData={phrase: \"Purple\"};\n reportData.myData.SearchResults=await ayPostToAPI(\"search\", searchPostData);\n\n\t\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> </span>","FooterTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \"> Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span> </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":true,"MarginOptionsBottom":"15mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"10mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}
|
||||
@@ -1 +1 @@
|
||||
{"Name":"💡 replace carriage return with space","Active":true,"Notes":"Example custom Prepare to replace carriage return with space for a specific key of this object ","Roles":124927,"AType":8,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<div>\n\t\t<div class=\"reporttitle\">\n\t\t\t<p>Custom Prepare to remove carriage returns</p>\n\t\t</div>\n\t\t<table>\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"7\" class=\"leftlean\">{{ayT 'Customer'}}</th>\n\t\t\t\t\t<th colspan=\"1\"> </th>\n\t\t\t\t\t<th colspan=\"7\">{{ayT 'CustomerNotes'}}</th>\n\t\t\t\t\t<th colspan=\"1\"> </th>\n\t\t\t\t\t<th colspan=\"8\">Customized {{ayT 'CustomerNotes'}}</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\n\t\t\t<tbody>\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"7\">{{Name}}</td>\n\t\t\t\t\t<td colspan=\"1\"> </td>\n\t\t\t\t\t<td colspan=\"7\">{{Notes}}</td>\n\t\t\t\t\t<td colspan=\"1\"> </td>\n\t\t\t\t\t<td colspan=\"8\">{{NotesNoCarriage}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"24\"> </td>\n\t\t\t\t</tr>\n\t\t\t\t{{/each}}\n\t\t\t</tbody>\n\t\t</table>\n\n\t\t<table>\n {{#each ayReportData}}\n <tbody>\n\t\t\t \t<tr>\n\t\t\t\t\t<td colspan=\"24\"> </td>\n\t\t\t\t</tr>\n <tr>\n <td colspan=\"24\">This is a printout of the data returned from the Custom Prepare that this report now uses, each \"group\" is an object. Compare against the data that shows in the \"Sample Data\" when editing this report template.</td>\n </tr>\n <tr>\n\t\t\t <td colspan=\"24\">{{ayJSON this}}</td>\n </tr>\n </tbody>\n {{/each}}\n </table>\n\t</div>\n</body>\n</html>","Style":"\r\n.singlePage\r\n{\r\npage-break-after: always;\r\n}\r\n\r\nbody {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n text-align: center;\r\n color: #9e9e9e;\r\n} \r\n\r\n\r\ntable { \r\n table-layout: fixed; //setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected\r\n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n font-size: 8pt;\r\n width: 100%;\r\n }\r\n\r\n\r\nth {\r\n height: 30px;\r\n text-align: left;\r\n color: #9e9e9e;\r\n}\r\n\r\n\r\ntbody tr {\r\n height: 10px;\r\n word-wrap: break-word;\r\n}\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([ \"Customer\", \"CustomerNotes\" ]);\n\n //for each Customer, if the General Notes field is NOT null, creates a new key NotesNoCarriage and puts into it the text from Notes replacing ANY carriage returns with a space, so all text is on same line(s)\n for (EachCU of ayData.ayReportData) {\n if (EachCU.Notes != null) {\n n = EachCU.Notes;\n EachCU.NotesNoCarriage = n.replace(/[\\n\\r]+/g, ' ');\n }\n }\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \"> Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span> </span>","FooterTemplate":"<span> </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}
|
||||
{"Name":"z_replace carriage return with space","Active":true,"Notes":"Example custom Prepare to replace carriage return with space for a specific key of this object ","Roles":124927,"AType":8,"IncludeWoItemDescendants":false,"Template":"<html>\n\n<body>\n\t<div>\n\t\t<div class=\"reporttitle\">\n\t\t\t<p>Custom Prepare to remove carriage returns</p>\n\t\t</div>\n\t\t<table>\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th colspan=\"7\" class=\"leftlean\">{{ayT 'Customer'}}</th>\n\t\t\t\t\t<th colspan=\"1\"> </th>\n\t\t\t\t\t<th colspan=\"7\">{{ayT 'CustomerNotes'}}</th>\n\t\t\t\t\t<th colspan=\"1\"> </th>\n\t\t\t\t\t<th colspan=\"8\">Customized {{ayT 'CustomerNotes'}}</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\n\t\t\t<tbody>\n\t\t\t\t{{#each ayReportData}}\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"7\">{{Name}}</td>\n\t\t\t\t\t<td colspan=\"1\"> </td>\n\t\t\t\t\t<td colspan=\"7\">{{Notes}}</td>\n\t\t\t\t\t<td colspan=\"1\"> </td>\n\t\t\t\t\t<td colspan=\"8\">{{NotesNoCarriage}}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"24\"> </td>\n\t\t\t\t</tr>\n\t\t\t\t{{/each}}\n\t\t\t</tbody>\n\t\t</table>\n\n\t\t<table>\n {{#each ayReportData}}\n <tbody>\n\t\t\t \t<tr>\n\t\t\t\t\t<td colspan=\"24\"> </td>\n\t\t\t\t</tr>\n <tr>\n <td colspan=\"24\">This is a printout of the data returned from the Custom Prepare that this report now uses, each \"group\" is an object. Compare against the data that shows in the \"Sample Data\" when editing this report template.</td>\n </tr>\n <tr>\n\t\t\t <td colspan=\"24\">{{ayJSON this}}</td>\n </tr>\n </tbody>\n {{/each}}\n </table>\n\t</div>\n</body>\n</html>","Style":"\r\n.singlePage\r\n{\r\npage-break-after: always;\r\n}\r\n\r\nbody {\r\n font-family: 'Helvetica', 'Helvetica Neue', Arial, sans-serif; \r\n}\r\n\r\n.reporttitle { \r\n margin-bottom: 20pt; \r\n font-weight: bold; \r\n font-size: 13pt; \r\n text-align: center;\r\n color: #9e9e9e;\r\n} \r\n\r\n\r\ntable { \r\n table-layout: fixed; //setting this to fixed causes columns to be evenly spaced for the entire table regardless of cell content, and then colspan then \"works\" as expected\r\n font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif;\r\n border-collapse: collapse;\r\n white-space: pre-wrap;\r\n font-size: 8pt;\r\n width: 100%;\r\n }\r\n\r\n\r\nth {\r\n height: 30px;\r\n text-align: left;\r\n color: #9e9e9e;\r\n}\r\n\r\n\r\ntbody tr {\r\n height: 10px;\r\n word-wrap: break-word;\r\n}\r\n\r\ntbody tr:nth-child(even) {\r\n background-color: #f8f8f8; /* MUST checkmark Print background in PDF Options for this to show */\r\n}\r\n\r\n\r\n.fontgreen {\r\n color: green;\r\n}\r\n.fontblue {\r\n color: blue;\r\n}\r\n.fontred {\r\n color:red;\r\n}\r\n\r\n\r\n.rightlean {\r\n text-align: right;\r\n}\r\n.leftlean {\r\n text-align: left;\r\n}\r\n.centerlean {\r\n text-align: center;\r\n}","JsPrerender":"async function ayPrepareData(ayData){ \n\n await ayGetTranslations([ \"Customer\", \"CustomerNotes\" ]);\n\n //for each Customer, if the General Notes field is NOT null, creates a new key NotesNoCarriage and puts into it the text from Notes replacing ANY carriage returns with a space, so all text is on same line(s)\n for (EachCU of ayData.ayReportData) {\n if (EachCU.Notes != null) {\n n = EachCU.Notes;\n EachCU.NotesNoCarriage = n.replace(/[\\n\\r]+/g, ' ');\n }\n }\n\n return ayData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":"<span style=\"font-size:6pt; width: 96%;text-align:left; \"> Printed date: PDFDate</span>\n<span style=\"font-size:6pt;width: 96%; text-align: right; \">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span> </span>","FooterTemplate":"<span> </span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"20mm","MarginOptionsLeft":"15mm","MarginOptionsRight":"15mm","MarginOptionsTop":"15mm","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.00000}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user