


Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.

<a href="/item/api_payload/5f9f57d7-28a7-11ef-b4cb-743af4bc475f?filename=Nominal.ftres">Download</a>
SELECT
name,
substr(guid, 1, 8) || '-' ||
substr(guid, 9, 4) || '-' ||
substr(guid, 13, 4) || '-' ||
substr(guid, 17, 4) || '-' ||
substr(guid, 21, 12) AS formatted_guid
FROM data_item;

labels_column: [Filename, Download link]
<script>
const a = document.querySelectorAll("table");
const targetTable = a[0];
for (var i = 1; i < targetTable.rows.length; i++) {
targetTable.rows[i].cells[1].innerHTML = "<a href='/item/payload/" +
targetTable.rows[i].cells[1].innerHTML + "?formatted=1'>" +
targetTable.rows[i].cells[0].innerHTML + "</a>";
}
</script>

import ansys.dynamicreporting.core as adr
adr_service = adr.Service()
# Assumind you have a currently running ADR service on port 8000:
adr_service.connect(url="http://127.0.0.1:8000")
server = adr_service.serverobj
# Generate the SQL query template
template_2 = server.create_template(name="SQL_query", parent=None, report_type="Generator:sqlqueries")
template_2.params = '{"sqldb": "D:\\\\tmp\\\\link_db\\\\db.sqlite3", "generate_merge": "replace",
"sqlquery": "SELECT \\n name, \\n substr(guid, 1, 8) || \'-\' || \\n substr(guid, 9, 4) || \'-\' || \\n substr(guid, 13, 4) || \'-\' || \\n substr(guid, 17, 4) || \'-\' || \\n
substr(guid, 21, 12) AS formatted_guid\\nFROM data_item;",
"properties": {"labels_column": "[Filename,Download link]"},
"HTML": "<script>\\nconst a = document.querySelectorAll(\\"table\\");\\n\\nconst targetTable = a[0];\\n\\nfor (var i = 1; i < targetTable.rows.length; i++) { \\ntargetTable.rows[i].cells[1].innerHTML = \\"<a href=\'/item/payload/\\" + targetTable.rows[i].cells[1].innerHTML + \\"?formatted=1\'>\\" + targetTable.rows[i].cells[0].innerHTML + \\"</a>\\";\\n}\\n\\n</script>"}'
server.put_objects(template_2)
# Generate the User Defined template as a child of the previous one
template_3 = server.create_template(name="User Defined", parent=template_2, report_type="Layout:userdefined")
template_3.params = '{"HTML": "<script>\\nconst a = document.querySelectorAll(\\"table\\");\\n\\nconst targetTable = a[0];\\n\\nfor (var i = 1; i < targetTable.rows.length; i++) { \\ntargetTable.rows[i].cells[1].innerHTML = \\"<a href=\'/item/payload/\\" + targetTable.rows[i].cells[1].innerHTML + \\"?formatted=1\'>\\" + targetTable.rows[i].cells[0].innerHTML + \\"</a>\\";\\n}\\n\\n</script>"}'
server.put_objects(template_3)
server.put_objects(template_2)
Was this page helpful?