rename all variants of naming that hold an AyaType value to "aType" (parameter) / "AType" (not parameter) everywhere front and back; "ayType", "objectType", "oType" all are used in various areas

This commit is contained in:
2021-03-23 17:06:05 +00:00
parent dfef3f7934
commit dde1b8bb8c
113 changed files with 450 additions and 450 deletions

View File

@@ -1 +1 @@
{"Name":"EXAMPLE API use and meta data","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: Meta data and API usage</h2>\n\t<p>See help documentation for details</p>\n\t\n\t<div>\n\t\t<h4>ayServerMetaData</h4>\n\t\t{{ ayJSON ayServerMetaData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayClientMetaData</h4>\n\t\t{{ ayJSON ayClientMetaData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayReportMetaData</h4>\n\t\t{{ ayJSON ayReportMetaData }}\n\t</div>\n\n\n\t<div>\n\t\t<h4>myData</h4>\n\t\t<h5>(Fetched dynamically from API route <strong>enum-list/list/AyaType</strong>)</h5>\n\t\t{{ ayJSON myData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayReportData</h4>\n\t\t{{#each ayReportData}}\n\t\t<h2>{{ Name }}</h2>\n\t\t<div>Notes: <span class=\"example\">{{ Notes }}</span></div>\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".example {\n color: blue;\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\n //Example of using API GET method to fetch data from API server and make it available to the report template\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: \"Fresh\"};\n reportData.myData.SearchResults=await ayPostToAPI(\"search\", searchPostData);\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}
{"Name":"EXAMPLE API use and meta data","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: Meta data and API usage</h2>\n\t<p>See help documentation for details</p>\n\t\n\t<div>\n\t\t<h4>ayServerMetaData</h4>\n\t\t{{ ayJSON ayServerMetaData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayClientMetaData</h4>\n\t\t{{ ayJSON ayClientMetaData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayReportMetaData</h4>\n\t\t{{ ayJSON ayReportMetaData }}\n\t</div>\n\n\n\t<div>\n\t\t<h4>myData</h4>\n\t\t<h5>(Fetched dynamically from API route <strong>enum-list/list/AyaType</strong>)</h5>\n\t\t{{ ayJSON myData }}\n\t</div>\n\n\t<div>\n\t\t<h4>ayReportData</h4>\n\t\t{{#each ayReportData}}\n\t\t<h2>{{ Name }}</h2>\n\t\t<div>Notes: <span class=\"example\">{{ Notes }}</span></div>\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".example {\n color: blue;\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\n //Example of using API GET method to fetch data from API server and make it available to the report template\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: \"Fresh\"};\n reportData.myData.SearchResults=await ayPostToAPI(\"search\", searchPostData);\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}

View File

@@ -1 +1 @@
{"Name":"EXAMPLE Bar code helper","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: Bar code helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>\n\t\tSerial as \"CODE-128\" BarCode:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tSerial as \"QR\" Code:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":3}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tSample \"UPC-A\" Code (Serial wouldn't be a valid UPC code so hard coded here):<br/>\n\t\t{{ ayBC \"712345678904\" '{ \"bcid\": \"upca\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<br/>\n\t<hr/>\n\t{{/each}}\n</body>\n\n</html>","Style":".example {\n color: blue;\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 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}
{"Name":"EXAMPLE Bar code helper","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: Bar code helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>\n\t\tSerial as \"CODE-128\" BarCode:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"code128\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tSerial as \"QR\" Code:<br/>\n\t\t{{ ayBC Serial '{ \"bcid\": \"qrcode\",\"includetext\":true, \"scale\":3}' }}\n\t</div>\n\t<br/>\n\t<div>\n\t\tSample \"UPC-A\" Code (Serial wouldn't be a valid UPC code so hard coded here):<br/>\n\t\t{{ ayBC \"712345678904\" '{ \"bcid\": \"upca\",\"includetext\":true, \"scale\":1}' }}\n\t</div>\n\t<br/>\n\t<br/>\n\t<hr/>\n\t{{/each}}\n</body>\n\n</html>","Style":".example {\n color: blue;\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 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}

View File

@@ -1 +1 @@
{"Name":"EXAMPLE Logo helper","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: LOGO </h2>\n\t<p>See Report editor help documentation for details</p>\n\t<p>Note: you must upload a logo via the Global Settings form in order to see them here</p>\n\n\t<h4>Small logo</h4>\n\t{{ ayLogo \"small\" }}\n\n\t<h4>Medium logo</h4>\n\t{{ ayLogo \"medium\" }}\n\n\t<h4>Large logo</h4>\n\t{{ ayLogo \"large\" }}\n\n\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>Notes: <span class='example'>{{ Notes }}</span></div>\n\t{{/each}}\n</body>\n\n</html>","Style":".example {\n color: blue;\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 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}
{"Name":"EXAMPLE Logo helper","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: LOGO </h2>\n\t<p>See Report editor help documentation for details</p>\n\t<p>Note: you must upload a logo via the Global Settings form in order to see them here</p>\n\n\t<h4>Small logo</h4>\n\t{{ ayLogo \"small\" }}\n\n\t<h4>Medium logo</h4>\n\t{{ ayLogo \"medium\" }}\n\n\t<h4>Large logo</h4>\n\t{{ ayLogo \"large\" }}\n\n\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>Notes: <span class='example'>{{ Notes }}</span></div>\n\t{{/each}}\n</body>\n\n</html>","Style":".example {\n color: blue;\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 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}

View File

@@ -1 +1 @@
{"Name":"EXAMPLE PDF Options page number","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>Notes: <span class='example'>{{ Notes }}</span></div>\n\t{{/each}}\n</body>\n\n</html>","Style":"","JsPrerender":"","JsHelpers":"","RenderType":0,"HeaderTemplate":" <span style=\"font-size:12px;color:blue; \">&nbsp;Header: Page&nbsp;<span class=\"pageNumber\"></span>&nbsp;of&nbsp;<span class=\"totalPages\"></span></span>","FooterTemplate":" <span style=\"font-size:12px;color:green; \">&nbsp;Footer: Page&nbsp;<span class=\"pageNumber\"></span>&nbsp;of&nbsp;<span class=\"totalPages\"></span></span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"40px","MarginOptionsLeft":"40px","MarginOptionsRight":"40px","MarginOptionsTop":"40px","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.0000}
{"Name":"EXAMPLE PDF Options page number","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t{{#each ayReportData}}\n\t<h2>{{ Name }}</h2>\n\t<div>Notes: <span class='example'>{{ Notes }}</span></div>\n\t{{/each}}\n</body>\n\n</html>","Style":"","JsPrerender":"","JsHelpers":"","RenderType":0,"HeaderTemplate":" <span style=\"font-size:12px;color:blue; \">&nbsp;Header: Page&nbsp;<span class=\"pageNumber\"></span>&nbsp;of&nbsp;<span class=\"totalPages\"></span></span>","FooterTemplate":" <span style=\"font-size:12px;color:green; \">&nbsp;Footer: Page&nbsp;<span class=\"pageNumber\"></span>&nbsp;of&nbsp;<span class=\"totalPages\"></span></span>","DisplayHeaderFooter":true,"PaperFormat":10,"Landscape":false,"MarginOptionsBottom":"40px","MarginOptionsLeft":"40px","MarginOptionsRight":"40px","MarginOptionsTop":"40px","PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":true,"Scale":1.0000}

View File

@@ -1 +1 @@
{"Name":"EXAMPLE Translation helper","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\n\t<h2>Example: Translation helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\n\t<div>\n\t\t<h4>ayReportData</h4>\n\t\t{{#each ayReportData}}\n\t\t<h2>{{ayT 'WidgetName' }}: {{ Name }}</h2>\n\t\t<div>{{ayT 'WidgetSerial' }}:{{ Serial }}</div>\n\t\t<div>{{ayT 'WidgetDollarAmount' }}:{{ DollarAmount }}</div>\n\t\t<div>{{ayT 'WidgetStartDate' }}:{{ StartDate }}</div>\n\t\t<div>{{ayT 'WidgetNotes' }}:{{ Notes }}</div>\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //Fetch translation keys required for report \n //Server will get the translations that match the current logged in user's language\n //Only translation keys pre-fetched here will be available for use with the ayT translation helper\n\n //NOTE: you *must* await the call to ayGetTranslations or they will not be present for the report template use\n\n await ayGetTranslations([\n \"Widget\",\n \"WidgetName\",\n \"WidgetSerial\",\n \"WidgetDollarAmount\",\n \"WidgetCount\",\n \"WidgetStartDate\",\n \"WidgetEndDate\",\n \"WidgetNotes\",\n \"WidgetCustom1\",\n \"WidgetCustom2\",\n \"WidgetCustom3\",\n \"WidgetCustom4\",\n \"WidgetCustom5\",\n \"WidgetCustom6\",\n \"WidgetCustom7\",\n \"WidgetCustom8\",\n \"WidgetCustom9\",\n \"WidgetCustom10\",\n \"WidgetCustom11\",\n \"WidgetCustom12\",\n \"WidgetCustom13\",\n \"WidgetCustom14\",\n \"WidgetCustom15\",\n \"WidgetCustom16\",\n ]);\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}
{"Name":"EXAMPLE Translation helper","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\n\t<h2>Example: Translation helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\n\t<div>\n\t\t<h4>ayReportData</h4>\n\t\t{{#each ayReportData}}\n\t\t<h2>{{ayT 'WidgetName' }}: {{ Name }}</h2>\n\t\t<div>{{ayT 'WidgetSerial' }}:{{ Serial }}</div>\n\t\t<div>{{ayT 'WidgetDollarAmount' }}:{{ DollarAmount }}</div>\n\t\t<div>{{ayT 'WidgetStartDate' }}:{{ StartDate }}</div>\n\t\t<div>{{ayT 'WidgetNotes' }}:{{ Notes }}</div>\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //Fetch translation keys required for report \n //Server will get the translations that match the current logged in user's language\n //Only translation keys pre-fetched here will be available for use with the ayT translation helper\n\n //NOTE: you *must* await the call to ayGetTranslations or they will not be present for the report template use\n\n await ayGetTranslations([\n \"Widget\",\n \"WidgetName\",\n \"WidgetSerial\",\n \"WidgetDollarAmount\",\n \"WidgetCount\",\n \"WidgetStartDate\",\n \"WidgetEndDate\",\n \"WidgetNotes\",\n \"WidgetCustom1\",\n \"WidgetCustom2\",\n \"WidgetCustom3\",\n \"WidgetCustom4\",\n \"WidgetCustom5\",\n \"WidgetCustom6\",\n \"WidgetCustom7\",\n \"WidgetCustom8\",\n \"WidgetCustom9\",\n \"WidgetCustom10\",\n \"WidgetCustom11\",\n \"WidgetCustom12\",\n \"WidgetCustom13\",\n \"WidgetCustom14\",\n \"WidgetCustom15\",\n \"WidgetCustom16\",\n ]);\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}

View File

@@ -1 +1 @@
{"Name":"EXAMPLE WIKI helper","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: WIKI / markdown field usage </h2>\n\t<p>See help documentation for details</p>\n\n\t{{#each ayReportData}}\n\t<h1>Object name:</h1>\n\t{{ Name }}\n\t<h1>Object WIKI:</h1>\n\t{{ ayWiki Wiki }}\n\t{{/each}}\n</body>\n\n</html>","Style":"","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 return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\n","RenderType":0}
{"Name":"EXAMPLE WIKI helper","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: WIKI / markdown field usage </h2>\n\t<p>See help documentation for details</p>\n\n\t{{#each ayReportData}}\n\t<h1>Object name:</h1>\n\t{{ Name }}\n\t<h1>Object WIKI:</h1>\n\t{{ ayWiki Wiki }}\n\t{{/each}}\n</body>\n\n</html>","Style":"","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 return reportData;\n}","JsHelpers":"//Register custom Handlebars helpers here to use in your report script\n//https://handlebarsjs.com/guide/#custom-helpers\n","RenderType":0}

View File

@@ -1 +1 @@
{"Name":"EXAMPLE custom fields","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: custom fields usage </h2>\n\t<p>See help documentation for details</p>\n\n\t<div>\n\t\t{{#each ayReportData}}\n\n\t\t<h2>Non custom fields </h2>\n\t\tName: {{ Name }} <br/>\n\t\tDollarAmount as Number: {{ ayDecimal DollarAmount}} <br/>\n\n\t\t<h2>Custom fields </h2>\n\t\t<p>Custom field items can be accessed via the main object's CustomFields property and then by dot notation for each of the 16 possible custom fields as .c1 to .c16 \n\t\tIf a custom field is unused it will return a blank for that item.\n\t\t(note, example assumes generated sample data and that c1 and c5 have data)</p>\n\t\tCustom c1 as DateTime: {{ ayDateTime CustomFields.c1}} <br/>\n\t\tcustom c5 as Number: {{ ayDecimal CustomFields.c5}} <br/>\t\n\t\t<hr />\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":"","JsPrerender":"async function ayPrepareData(reportData){ \n return reportData;\n}","JsHelpers":"","RenderType":0}
{"Name":"EXAMPLE custom fields","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: custom fields usage </h2>\n\t<p>See help documentation for details</p>\n\n\t<div>\n\t\t{{#each ayReportData}}\n\n\t\t<h2>Non custom fields </h2>\n\t\tName: {{ Name }} <br/>\n\t\tDollarAmount as Number: {{ ayDecimal DollarAmount}} <br/>\n\n\t\t<h2>Custom fields </h2>\n\t\t<p>Custom field items can be accessed via the main object's CustomFields property and then by dot notation for each of the 16 possible custom fields as .c1 to .c16 \n\t\tIf a custom field is unused it will return a blank for that item.\n\t\t(note, example assumes generated sample data and that c1 and c5 have data)</p>\n\t\tCustom c1 as DateTime: {{ ayDateTime CustomFields.c1}} <br/>\n\t\tcustom c5 as Number: {{ ayDecimal CustomFields.c5}} <br/>\t\n\t\t<hr />\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":"","JsPrerender":"async function ayPrepareData(reportData){ \n return reportData;\n}","JsHelpers":"","RenderType":0}

View File

@@ -1 +1 @@
{"Name":"EXAMPLE localization helpers","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: Localization helpers </h2>\n\t<p>See help documentation for details</p>\n\n\t<div>\n\t\t<h3>Client locale settings used</h3>\n\t\tBrowser TimeZone: {{ ayClientMetaData.TimeZoneName }}<br/>\n\t\tBrowser LanguageName: {{ ayClientMetaData.LanguageName }}<br/>\n\t\tHour12: {{ ayClientMetaData.Hour12 }}<br/>\n\t\tCurrencyName: {{ ayClientMetaData.CurrencyName }}<br/>\n\t</div>\n\t<div>\n\t\t{{#each ayReportData}}\n\t\t<h2>Name: {{ Name }}</h2>\n\t\tStartDate as DateTime: {{ ayDateTime StartDate}} <br/>\n\t\tStartDate as Date : {{ ayDate StartDate}} <br/>\n\t\tStartDate as Time: {{ ayTime StartDate}} <br/>\n\t\tDollarAmount as Currency: {{ ayCurrency DollarAmount}} <br/>\n\t\tDollarAmount as Number: {{ ayDecimal DollarAmount}} <br/>\n\t\t<hr />\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData){ \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}
{"Name":"EXAMPLE localization helpers","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: Localization helpers </h2>\n\t<p>See help documentation for details</p>\n\n\t<div>\n\t\t<h3>Client locale settings used</h3>\n\t\tBrowser TimeZone: {{ ayClientMetaData.TimeZoneName }}<br/>\n\t\tBrowser LanguageName: {{ ayClientMetaData.LanguageName }}<br/>\n\t\tHour12: {{ ayClientMetaData.Hour12 }}<br/>\n\t\tCurrencyName: {{ ayClientMetaData.CurrencyName }}<br/>\n\t</div>\n\t<div>\n\t\t{{#each ayReportData}}\n\t\t<h2>Name: {{ Name }}</h2>\n\t\tStartDate as DateTime: {{ ayDateTime StartDate}} <br/>\n\t\tStartDate as Date : {{ ayDate StartDate}} <br/>\n\t\tStartDate as Time: {{ ayTime StartDate}} <br/>\n\t\tDollarAmount as Currency: {{ ayCurrency DollarAmount}} <br/>\n\t\tDollarAmount as Number: {{ ayDecimal DollarAmount}} <br/>\n\t\t<hr />\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".example {\n color: blue;\n}","JsPrerender":"async function ayPrepareData(reportData){ \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}

View File

@@ -1 +1 @@
{"Name":"EXAMPLE modify data before rendering","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t{{#each ayReportData}}\n\tName: {{ Name }}, DollarAmount: {{ ayCurrency DollarAmount }}, RunningTotal: {{ ayCurrency MyRunningTotal }} <br/>\n\t{{/each}}\n\n\t<h2>Total dollar amount: {{ ayCurrency MyTotalDollarAmount }}\n</body>\n\n</html>","Style":"","JsPrerender":"async function ayPrepareData(reportData) {\n //Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\n //Declare a temporary variable to hold the running total\n let TotalDollarAmount = 0;\n\n //Iterate through all the records in the reportData\n //adding the dollar amount of each item to the TotalDollarAmount variable\n for (MyItem of reportData.ayReportData) {\n\n //make sure it has a value before attempting to add it to the running total\n if (MyItem.DollarAmount != null) {\n TotalDollarAmount += MyItem.DollarAmount;\n }\n\n //add a new key to each record in the reportData object named \"MyRunningTotal\" with the running total so far\n MyItem.MyRunningTotal=TotalDollarAmount;\n }\n\n //Add the TotalDollarAmount variable to the reportData so it can be \n //accessed in the report template\n reportData.MyTotalDollarAmount=TotalDollarAmount;\n\n return reportData;\n}","JsHelpers":"","RenderType":0}
{"Name":"EXAMPLE modify data before rendering","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t{{#each ayReportData}}\n\tName: {{ Name }}, DollarAmount: {{ ayCurrency DollarAmount }}, RunningTotal: {{ ayCurrency MyRunningTotal }} <br/>\n\t{{/each}}\n\n\t<h2>Total dollar amount: {{ ayCurrency MyTotalDollarAmount }}\n</body>\n\n</html>","Style":"","JsPrerender":"async function ayPrepareData(reportData) {\n //Example of both manipulating the reportData before rendering the report (by adding a running total field)\n //and adding a field to the overall data calculating the total dollar amount for all records\n\n //Declare a temporary variable to hold the running total\n let TotalDollarAmount = 0;\n\n //Iterate through all the records in the reportData\n //adding the dollar amount of each item to the TotalDollarAmount variable\n for (MyItem of reportData.ayReportData) {\n\n //make sure it has a value before attempting to add it to the running total\n if (MyItem.DollarAmount != null) {\n TotalDollarAmount += MyItem.DollarAmount;\n }\n\n //add a new key to each record in the reportData object named \"MyRunningTotal\" with the running total so far\n MyItem.MyRunningTotal=TotalDollarAmount;\n }\n\n //Add the TotalDollarAmount variable to the reportData so it can be \n //accessed in the report template\n reportData.MyTotalDollarAmount=TotalDollarAmount;\n\n return reportData;\n}","JsHelpers":"","RenderType":0}

View File

@@ -1 +1 @@
{"Name":"SAMPLE one object prints per page","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\n\t<h2>Example: Translation helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\t<p> this will show on the first page only as is HTML code BEFORE the #each aspect which is used for iteration</p>\n\t<p> if want this on its own page unto itself, wrap it also in a class that does a page-break</p>\n\n{{#each ayReportData}} <!-- the #each aspect MUST encompass the section where the class is that forces page break -->\n\t<div class=\"singlePage\" >\t\t\n\t\t<h2>{{ayT 'WidgetName' }}: {{ Name }}</h2>\n\t\t<div>{{ayT 'WidgetSerial' }}:{{ Serial }}</div>\n\t\t<div class=\"example\" >{{ayT 'WidgetDollarAmount' }}:{{ DollarAmount }}</div>\n\t\t<div>{{ayT 'WidgetStartDate' }}:{{ StartDate }}</div>\n\t\t<div>{{ayT 'WidgetNotes' }}:{{ Notes }}</div>\t\t\n\t</div>\n{{/each}}\n\n\n</body>\n\n</html>","Style":".example {\n color: blue;\n}\n\n\n.singlePage\n{\npage-break-after: always;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //Fetch translation keys required for report \n //Server will get the translations that match the current logged in user's language\n //Only translation keys pre-fetched here will be available for use with the ayT translation helper\n\n //NOTE: you *must* await the call to ayGetTranslations or they will not be present for the report template use\n\n await ayGetTranslations([\n \"Widget\",\n \"WidgetName\",\n \"WidgetSerial\",\n \"WidgetDollarAmount\",\n \"WidgetCount\",\n \"WidgetStartDate\",\n \"WidgetEndDate\",\n \"WidgetNotes\",\n \"WidgetCustom1\",\n \"WidgetCustom2\",\n \"WidgetCustom3\",\n \"WidgetCustom4\",\n \"WidgetCustom5\",\n \"WidgetCustom6\",\n \"WidgetCustom7\",\n \"WidgetCustom8\",\n \"WidgetCustom9\",\n \"WidgetCustom10\",\n \"WidgetCustom11\",\n \"WidgetCustom12\",\n \"WidgetCustom13\",\n \"WidgetCustom14\",\n \"WidgetCustom15\",\n \"WidgetCustom16\",\n ]);\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":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000}
{"Name":"SAMPLE one object prints per page","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\n\t<h2>Example: Translation helper </h2>\n\t<p>See Report editor help documentation for details</p>\n\t<p> this will show on the first page only as is HTML code BEFORE the #each aspect which is used for iteration</p>\n\t<p> if want this on its own page unto itself, wrap it also in a class that does a page-break</p>\n\n{{#each ayReportData}} <!-- the #each aspect MUST encompass the section where the class is that forces page break -->\n\t<div class=\"singlePage\" >\t\t\n\t\t<h2>{{ayT 'WidgetName' }}: {{ Name }}</h2>\n\t\t<div>{{ayT 'WidgetSerial' }}:{{ Serial }}</div>\n\t\t<div class=\"example\" >{{ayT 'WidgetDollarAmount' }}:{{ DollarAmount }}</div>\n\t\t<div>{{ayT 'WidgetStartDate' }}:{{ StartDate }}</div>\n\t\t<div>{{ayT 'WidgetNotes' }}:{{ Notes }}</div>\t\t\n\t</div>\n{{/each}}\n\n\n</body>\n\n</html>","Style":".example {\n color: blue;\n}\n\n\n.singlePage\n{\npage-break-after: always;\n}","JsPrerender":"async function ayPrepareData(reportData) {\n //Fetch translation keys required for report \n //Server will get the translations that match the current logged in user's language\n //Only translation keys pre-fetched here will be available for use with the ayT translation helper\n\n //NOTE: you *must* await the call to ayGetTranslations or they will not be present for the report template use\n\n await ayGetTranslations([\n \"Widget\",\n \"WidgetName\",\n \"WidgetSerial\",\n \"WidgetDollarAmount\",\n \"WidgetCount\",\n \"WidgetStartDate\",\n \"WidgetEndDate\",\n \"WidgetNotes\",\n \"WidgetCustom1\",\n \"WidgetCustom2\",\n \"WidgetCustom3\",\n \"WidgetCustom4\",\n \"WidgetCustom5\",\n \"WidgetCustom6\",\n \"WidgetCustom7\",\n \"WidgetCustom8\",\n \"WidgetCustom9\",\n \"WidgetCustom10\",\n \"WidgetCustom11\",\n \"WidgetCustom12\",\n \"WidgetCustom13\",\n \"WidgetCustom14\",\n \"WidgetCustom15\",\n \"WidgetCustom16\",\n ]);\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":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000}

View File

@@ -1 +1 @@
{"Name":"SAMPLE showing IF ELSE inline html","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: custom fields usage </h2>\n\t<p>this is an examle report template that shows value of Count <span class='redFont'>in red if has 0 or null</span>, or shows <span class='greenFont'>green if has ANY value</span></p>\n\n\t<div>\n\t\t{{#each ayReportData}}\n\t\t<h3>Name: {{ Name }} </h3>\n\t\t{{#if Count}}<p class='greenFont'>Count is: {{ Count }}</p>{{else}} <p class='redFont'>has 0 or null</p>{{/if}}\n\t\t<hr>\t\t\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".redFont {\r\n color: red;\r\n}\r\n\r\n.greenFont {\r\n color: green;\r\n}\r\n","JsPrerender":"async function ayPrepareData(reportData){ \n return reportData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000}
{"Name":"SAMPLE showing IF ELSE inline html","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: custom fields usage </h2>\n\t<p>this is an examle report template that shows value of Count <span class='redFont'>in red if has 0 or null</span>, or shows <span class='greenFont'>green if has ANY value</span></p>\n\n\t<div>\n\t\t{{#each ayReportData}}\n\t\t<h3>Name: {{ Name }} </h3>\n\t\t{{#if Count}}<p class='greenFont'>Count is: {{ Count }}</p>{{else}} <p class='redFont'>has 0 or null</p>{{/if}}\n\t\t<hr>\t\t\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".redFont {\r\n color: red;\r\n}\r\n\r\n.greenFont {\r\n color: green;\r\n}\r\n","JsPrerender":"async function ayPrepareData(reportData){ \n return reportData;\n}","JsHelpers":"","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000}

View File

@@ -1 +1 @@
{"Name":"SAMPLE showing tag only if has specific tagword","Active":true,"Notes":"","Roles":124927,"ObjectType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: custom fields usage </h2>\n\t<p>See help documentation for details</p>\n\n\t<div>\n\t\t{{#each ayReportData}}\n\n\t\tName: {{ Name }} <br/>\n\t\t\n\t\t<p>Tags: </p>\n\t\t<p>Displays first tag :::::{{ Tags.[0]}} </p>\n\t\t<p>Displays all tags for this object::::: {{ Tags}} </p>\n\t\t<p>Displays if has brown in its tags::::: {{ isInTag2 Tags}} </p>\n\t\t<p> Count: {{Count}}</p>\n\t\t\n\t\t<! below example of using #if helper to show if is true or has value, or show in green if if false, undefined, null, \"\", 0, or [] >\n\t\t<ul>\n\t\t\t {{#if CustomFields.c4}} <li class='redMe' >true custom fields c4 is true</li> {{else}} <li class='greenMe' >custom fields c4 is false</li> {{/if}}\n\t\t\t <li>Actual Count value: {{Count}} </li>\n\t\t\t {{#if Count}} <li class='redMe' >renders in red font if 'Count' has any value </li> {{else}} <li class='greenMe' >renders in green font if false, undefined, null, \"\", 0, or []</li> {{/if}}\n\t\t</ul>\n\n\t\t<p>{{isInTag3 Tags}} </p>\n\t\t\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".redMe {\r\n color: red;\r\n}\r\n\r\n.greenMe {\r\n color: green;\r\n}\r\n\r\n.redfont {\r\n color: red;\r\n}","JsPrerender":"async function ayPrepareData(reportData){ \n return reportData;\n}","JsHelpers":"\r\n\r\nHandlebars.registerHelper('isInTag', function (Tags) \r\n{\r\n for (var i=0; i<Tags.length; i++) \r\n\t{\r\n if (Tags[i].match('brown'))\r\n\t\t{ \r\n return 'brown'; \r\n\t\t}\r\n }\r\n return 'no brown';\r\n});\r\n\r\nHandlebars.registerHelper('isInTag2', function (Tags) \r\n{\r\n for (var i=0; i<Tags.length; i++) \r\n\t{\r\n if (Tags[i].match('brow'))\r\n\t\t{ \r\n\t\t\treturn 'THE WORD or part of word BROW IS IN HERE';\r\n\t\t}\r\n }\r\n return 'NOPE part of full word with \\'brow\\' is NOT HERE';\r\n});\r\n\r\nHandlebars.registerHelper('isInTag3', function (Tags) \r\n{\r\n for (var i=0; i<Tags.length; i++) \r\n\t{\r\n if (Tags[i].match('brow'))\r\n\t\t{ \r\n\t\t\treturn new Handlebars.SafeString(\"<p class='redMe' >\" + \"brownbrwnbrown is in here!!!!!!!!!!!!\" +\"</p>\");\r\n\t\t}\r\n }\r\n return 'some other text'; //if don't want to return any element at all, comment this else aspect out fully\r\n});\r\n","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000}
{"Name":"SAMPLE showing tag only if has specific tagword","Active":true,"Notes":"","Roles":124927,"AType":2,"Template":"<html>\n\n<body>\n\t<h2>Example: custom fields usage </h2>\n\t<p>See help documentation for details</p>\n\n\t<div>\n\t\t{{#each ayReportData}}\n\n\t\tName: {{ Name }} <br/>\n\t\t\n\t\t<p>Tags: </p>\n\t\t<p>Displays first tag :::::{{ Tags.[0]}} </p>\n\t\t<p>Displays all tags for this object::::: {{ Tags}} </p>\n\t\t<p>Displays if has brown in its tags::::: {{ isInTag2 Tags}} </p>\n\t\t<p> Count: {{Count}}</p>\n\t\t\n\t\t<! below example of using #if helper to show if is true or has value, or show in green if if false, undefined, null, \"\", 0, or [] >\n\t\t<ul>\n\t\t\t {{#if CustomFields.c4}} <li class='redMe' >true custom fields c4 is true</li> {{else}} <li class='greenMe' >custom fields c4 is false</li> {{/if}}\n\t\t\t <li>Actual Count value: {{Count}} </li>\n\t\t\t {{#if Count}} <li class='redMe' >renders in red font if 'Count' has any value </li> {{else}} <li class='greenMe' >renders in green font if false, undefined, null, \"\", 0, or []</li> {{/if}}\n\t\t</ul>\n\n\t\t<p>{{isInTag3 Tags}} </p>\n\t\t\n\t\t{{/each}}\n\t</div>\n</body>\n\n</html>","Style":".redMe {\r\n color: red;\r\n}\r\n\r\n.greenMe {\r\n color: green;\r\n}\r\n\r\n.redfont {\r\n color: red;\r\n}","JsPrerender":"async function ayPrepareData(reportData){ \n return reportData;\n}","JsHelpers":"\r\n\r\nHandlebars.registerHelper('isInTag', function (Tags) \r\n{\r\n for (var i=0; i<Tags.length; i++) \r\n\t{\r\n if (Tags[i].match('brown'))\r\n\t\t{ \r\n return 'brown'; \r\n\t\t}\r\n }\r\n return 'no brown';\r\n});\r\n\r\nHandlebars.registerHelper('isInTag2', function (Tags) \r\n{\r\n for (var i=0; i<Tags.length; i++) \r\n\t{\r\n if (Tags[i].match('brow'))\r\n\t\t{ \r\n\t\t\treturn 'THE WORD or part of word BROW IS IN HERE';\r\n\t\t}\r\n }\r\n return 'NOPE part of full word with \\'brow\\' is NOT HERE';\r\n});\r\n\r\nHandlebars.registerHelper('isInTag3', function (Tags) \r\n{\r\n for (var i=0; i<Tags.length; i++) \r\n\t{\r\n if (Tags[i].match('brow'))\r\n\t\t{ \r\n\t\t\treturn new Handlebars.SafeString(\"<p class='redMe' >\" + \"brownbrwnbrown is in here!!!!!!!!!!!!\" +\"</p>\");\r\n\t\t}\r\n }\r\n return 'some other text'; //if don't want to return any element at all, comment this else aspect out fully\r\n});\r\n","RenderType":0,"HeaderTemplate":null,"FooterTemplate":null,"DisplayHeaderFooter":false,"PaperFormat":0,"Landscape":false,"MarginOptionsBottom":null,"MarginOptionsLeft":null,"MarginOptionsRight":null,"MarginOptionsTop":null,"PageRanges":null,"PreferCSSPageSize":false,"PrintBackground":false,"Scale":1.0000}