Table of Contents
Reporting
Creating a Live Report Template
To create a live report:
- Navigate to "Configuration" > "Application" > "Templates" > "Reports"
- Click on "+ New Report Template Configuration" in the top right hand corner
- For "Editor Type" Select "Visual Editor" and make sure you have "Live Report" checked. You cannot enable "Live Report" after the Report Config has been created. Click "Save" once you have all your options selected
Creating a Live Report
Once you have created you Live Report Template and you have configured your template, you can use that template to create a live report on an Order, Sample or Test, depending on what report level your configuration is. For this example, we will assume that the report config is an Order level report.
- Navigate to an Order, then click on the "Reporting" tab. Since no Report or Live Report exists yet, your page will look something like this:
- Next, select "Generate Report" > "Choose Report Type" and search for the report template you created:
- Click through all the options until you get to the final step. This process should be familiar if you have generated a report in QBench before.
- Once you get to the final step, you will have the option to Generate a Report or Create a Live Report. Select "Create a Live Report", then select your Signature below.
- Once the Live Report is finished being created, there will be an entry in the "Live Reports" table on the Reporting tab.
Editing a Live Report
After a Live Report has been created on an Order, Sample or Test there will be an entry in the "Live Reports" table that can be edited to make edits to before your final Report has been generated.
- Navigate to an Order/Sample/Test detail page, then click on the Reporting Tab.
- Click on the Edit Pencil on the live report you would like to edit.
- From here, you can edit Dynamic Template fields, move elements using the "Movable Mode", and resize images.
- Click the "Preview" button to get a PDF view of what your final report will look like with the changes you've made
- You can always save your current progress by clicking on "Save Report Progress" and come back to your edits later on.
Generating a Report from a Live Report
Once you have made all the edits you need to your Live Report and you are ready to generate your final Report, simply open the Live Report editor by clicking the Pencil icon for the desired Live Report. Then click the "Generate Report" button
Your final report will be generated and appear in the Reports table in the Reporting Tab
Dynamic Template Fields
Fields
Admins can configure specific fields to be editable in when editing a Live Template. These edits will be saved back to original entity's field ensuring there is no data loss.
Creating a Dynamic Template Field
- In the Visual Editor, click on the "Insert Variable" button.
- Select the field you would like to display in the report, and check the "Dynamic Template Field" checkbox
- The field will be inserted with an orange border around it, denoting that it is a Dynamic Template Field and can be edited in the Live Editor before final generation.
Note: Only the following field types are currently available:
- Text Fields
- Text Box Fields
- Numeric Fields
- Rich Text Fields
- Hyperlink Fields
Editing a Dynamic Template Field
After a Live Report has been created, users can make changes to dynamic template fields by clicking on the field in the Live Editor.
Make some changes to the field and click "Update Value and Report" to update your Live Report and save the value back to the field. In this case, we will be updating an Additional Rich Text field on a Sample.
We can navigate to the Sample to see that the value was saved to the field and captured in the Sample History:
Attachments
Creating a Dynamic Template Attachment
Once you have an Attachment inside your Visual Report, select "Asset" > "Insert as Image" and then make sure you check the "Dynamic Template Field" checkbox before inserting the image
This will insert the image into your template with an orange background, denoting that it is a Dynamic Template Field
Editing a Dynamic Template Attachment
After a Live Report has been created, users can make changes to dynamic template attachments by clicking and dragging on the attachments in the Live Editor.
Note: Holding down "Shift" and then dragging will allow you resize the image without keeping the aspect ratio.
Clicking on the Preview button will show the changes to the image in a PDF format.
Once you've made your changes you can save your progress.
Special Classes
Movable Container
Admins can add the class qbench-live-editor-movable-container
and qbench-live-template-non-editable
to an HTML element using the "Tools" > "Source Code" editor when setting up your report config in the Visual Editor.
To move the containers when editing a Live Template:
- Click on the "Enable Movable Mode" button.
- This will highlight all available movable containers with a yellow border.
- Click on the first container you would like to move.
- This will highlight your selected container with a green border.
- Click on the container you would like to swap the selected container with.
- Finally, click "Disable Movable Mode" and save your changes by clicking the "Save" button.
Demo:
Increment Value
Admins can add the class qbench-live-editor-increment-value
to an HTML element to have it's content increment (1, 2, 3, ...) whenever its position is moved in the Live Editor.
You can optionally use data-live-editor-increment-name
as an attribute on the span to have different number groups that increment separately.
Exmaple:
<span class="qbench-live-editor-increment-value
"data-live-editor-increment-name="sample_count"
>1</span>
Re-syncable Template Macros
Admins can specify in a Template Macro that it is "re-syncable" when rendered inside of a live report. All that is needed is to include a wrapper div around your template macro content with the class qbench-live-editor-resync-template-macro
and the data attribute data-template-macro-id="<INSERT_TEMPLATE_MACRO_ID>"
.
Demo:
Here is the code used in the video above. Make sure you change the template macro ID in the container div!
<div class="qbench-live-editor-resync-template-macro
" data-template-macro-id="<TEMPLATE_MACRO_ID>">
{% for attachment in order.get_included_report_attachments() %}
<div>
Order ID: {{order.get_display_id()}}<br/>
<img class="qbench-dynamic-template-variable qbench-live-template-allow-object-resizing" style="width: 100px; height: 100px;" contenteditable="true" src="{{ attachment.asset.id | download_file_and_base64_encode }}" alt="" data-asset-id="{{ attachment.asset.id }}">
</div>
{% endfor %}
</div>
Comments
0 comments
Please sign in to leave a comment.