UserDefinedLayout#
- class ansys.dynamicreporting.core.serverless.template.UserDefinedLayout(*args, **kwargs)#
Bases:
LayoutLayout whose behavior is delegated to user-defined logic.
Methods
UserDefinedLayout.add_filter([filter_str])Append
filter_strto the current item filter.UserDefinedLayout.add_params(new_params)Merge
new_paramsinto the existing params dictionary.UserDefinedLayout.add_properties(new_props)Alias for
add_property().UserDefinedLayout.add_property(new_props)Merge
new_propsinto the existingpropertiessub-dictionary.UserDefinedLayout.add_sort_fields(sort_field)Extend the existing sort field list with
sort_field.UserDefinedLayout.add_tag(tag[, value])Add or update a single tag.
UserDefinedLayout.as_dict([recursive])Serialize the model into a plain dictionary.
UserDefinedLayout.create(**kwargs)Factory-style creation that dispatches to the correct subclass.
Delete this object from the database.
UserDefinedLayout.filter(**kwargs)Return a collection of templates, scoped by subclass
report_type.UserDefinedLayout.find([query])Search for templates using an ADR query string.
UserDefinedLayout.get(**kwargs)Retrieve a single template, scoped by subclass
report_type.Return the number of columns in this layout.
Return the list of column width factors.
Return any user comments associated with this layout.
Return the raw item filter string.
Return the filter mode (
'items','root_replace', or'root_append').Return the raw HTML fragment stored on this layout.
Deserialize
paramsinto a Python dictionary.Return the
propertiessub-dictionary from params (if present).Return the 'skip empty' flag (0 or 1).
Return the configured sort fields list, if any.
Return the sort selection mode (
'all','first', or'last').Return the raw tag string stored on this object.
Return the table transpose flag (0 or 1).
Reset the in-memory ORM state for this object.
Remove a tag by key, if it exists.
Alias for
rem_tag()for backwards compatibility.UserDefinedLayout.render(*[, context, ...])Render the template to HTML.
UserDefinedLayout.render_pdf(*[, context, ...])Render the template to a PDF byte stream.
Move a child template to a new position in
children.Reorder the children list based on the children_order string.
UserDefinedLayout.save(**kwargs)Save the template, enforcing parent/child invariants.
Set the number of columns in this layout.
Set the list of column width factors.
UserDefinedLayout.set_comments([value])Set user comments for this layout.
UserDefinedLayout.set_filter(filter_str)Replace the current item filter with
filter_str.UserDefinedLayout.set_filter_mode([value])Set the filter mode.
UserDefinedLayout.set_html([value])Set the HTML fragment for this layout.
UserDefinedLayout.set_params(new_params)Replace the current params dictionary.
UserDefinedLayout.set_property(new_props)Replace the
propertiessub-dictionary withnew_props.UserDefinedLayout.set_skip([value])Set whether empty content should be skipped (0 or 1).
UserDefinedLayout.set_sort_fields(sort_field)Set the full list of sort fields.
UserDefinedLayout.set_sort_selection([value])Set the sort selection mode.
UserDefinedLayout.set_tags(tag_str)Replace all tags with the given tag string.
UserDefinedLayout.set_transpose([value])Set whether tabular data should be transposed (0 or 1).
Return a JSON-serializable dictionary for the full template tree.
UserDefinedLayout.to_json(filename)Dump the full template tree to a JSON file.
Update
children_orderfrom the currentchildrenlist.Attributes
Comma-separated list of child GUIDs in desired order.
Database alias in which this object is stored.
Default ADR query string used to select items for this template.
Whether this template is a root (no parent).
Human-readable name of the template.
JSON-encoded parameter dictionary backing this template configuration.
Parent template in the hierarchy, or
Nonefor a root template.Canonical type string used for subclass dispatch and filtering.
Whether this object has been successfully saved to the database.
Tag string used to group and filter objects.
Alias for
report_typefor parity with items.Template creation timestamp.
Ordered list of child templates that form this template's subtree.
Globally unique identifier for this object.
- before_children = None#
- interactive_only = None#
- report_type: str = 'Layout:userdefined'#
Canonical type string used for subclass dispatch and filtering.
- userdef_name = None#