Sometimes it is necessary to set the level of access to the selected item for a particular group of people. You can do this using the Share command.
This chapter will cover the following:
Embedding the access code to an item in the HTML page;
To open the Share menu, you should:
Select the report or dashboard element in the list of server items;
Click the Share button on the server toolbar.
You can specify share settings of the report or dashboard in this menu.
The first mode sets the access only to users of the workspace. In other words, only users of the workspace will have access to this item.
In this mode, access to the item will have all the registered users on the server, regardless of whether they belong to a particular workspace.
Information |
Regardless of the access to the item (No Access Share or Authorized Access), it is necessary to take into account the rights of the user roles. For example, if the user does not have the right to view the report item (not allowed in the settings of the role), when setting the level of access No Access Share or Authorized Access, the user will still be able to view the item.
|
With this mode, there are no restrictions on the access level. The item will be public for any non-authorized user. In other words, everyone who has the link to this item can view it.
This parameter sets the time and date after which access will be closed. If this option is disabled, then there is no period of access, access is always enabled.
The link to access an item can be provided in the following ways:
Link to Share. Get only a link to this item.
Embed Code. Get the code for the HTML page with the link to this item.
QR Code. Display the QR code. When reading this code, you will automatically get a link to access the item.
Embedding the access code to an item in the HTML page
The item to which it is possible to adjust the level of access can also be embedded into the HTML page. This requires the following conditions:
The report server must be deployed on any web server.
Access level of the item must Public Access.
The algorithm for embedding code to access an item in the HTML page looks like this:
Step 1: Select the necessary item in the navigator tree.
Step 2: Select the Share item on the toolbar.
Step 3: Set the public access, view mode, go to the tab Embed Code and copy the access code.
Step 4: Open the HTML page in the editor and paste the copied code.
Step 5: Save changes.
Open the HTML page in a web browser.
As can be seen in the picture above, the viewer with the loaded report will be displayed on your HTML page. The same way you can access to viewing report snapshots, text files, images, PDF documents. For the remaining items, only the Download mode will be available.
Users can view reports depending on the access level. For example, a report can view any or only authorized users. However, the report parameters can be used. In this case, the transfer of parameters goes via the URL. To do this, you must specify the special character "?" at the end of the URL. After this character, the name of the parameter and its value is specified. If you want to specify several options, they should be written with a separator "&". Consider an example of passing parameters to the report through a URL. Below is a report template.
In the first and the last text component, you can find references to a variable - Name and CategoryID. The default values for these variables are Chai and 1, respectively. In the text component in the middle of the page, you can see the expression with the keyword this and the parameter UnitPrice. Below is the rendered report.
As can be seen from the picture above, the default values were passed to the report. At the same time, UnitPrice did not keep any value and, therefore, it is not present in the rendered report. Let's pass parameters via URL.
The access link to an item - http://localhost:40010/s/5fc3c.
For the parameter Name the value will be Coffee;
For parameter UnitPrice - 15;
For the parameter CategoryID - 3.
Then the URL with parameters will look like this http://localhost:40010/s/5fc3c?Name=Coffee&UnitPrice=15&CategoryID=3. Below is a report with the passed parameters.