The Customer Portal comes with the ability to host your reports for the world to view. All you need is the link to your report (generated by QBench) and to toggle the report public. All reports are private by default, meaning nobody can see your report until you say so. Here's a step-by-step guide to help you get started:
First, let's enable this feature and edit the style of your page
1. Navigate to Configuration > Application > Customer Portal
2. Under the "Reporting" tab, make sure the "Enable public reports" checkbox is checked to enable this feature.
3. You can upload a logo and change the colors of the button and header background to match your style.
Now we are ready to see the Public Report feature in action!
1. After generating a report, head over to the "Reporting" tab
2. Observe that none of these reports are marked public. Click the "Make Public" icon to enable that specific report to be viewable by the public. This will generate a link that you can share with others.
3. Clicking the link will bring you to the page that everybody will see. Copy this URL and send it to those who you want to share it with!
4. If you no longer wish to have this report public, clicking the red "x" icon will revoke public access. You can freely toggle on/off public access of reports.
Adding a QR Code to your report
You can add a QR code to your report that will link to the Public Report Download page. All you need to do is add this line:
{% if report %}
<img style="width: 100px; height: 100px;" src="{{ report.public_link()|qr_code_base64 }}" />
{% endif %}
You can play around with the width and height to find the perfect fit in your report! If you need more documentation on how to create report templates, check out this article. Refer to the following code for a simple working example template:
<style></style>
<body>
<div>Test ID {{test.get_display_id()}} generated on {{date_generated|local_time}}</div>
<div>This is the QR Code:</div>
<div>
{% set ns = namespace(public_link="https://google.com") %}
{% if report %}
{% set ns.public_link = report.public_link() %}
{% endif %}
{% set qrcode = ns.public_link | qr_code_base64 %}
<img src="{{qrcode}}" />
</div>
</body>
Comments
0 comments
Please sign in to leave a comment.