Filter an Embedded Report with a URL Parameter
You can embed reports in other web applications using the iframe URL. These embedded reports can be filtered by URL parameters inserted into the iframe reference.
If you are looking for information about how to filter an embeded dashboard, see Filter an Embedded Dashboard with a URL Parameter.
For example, your workspace contains a simple report that shows loan amounts sliced by loan status. You may want to filter this report by the Loan Status attribute.
In GoodData, terms workspace and project denote the same entity. For example, project ID is exactly the same as workspace ID. See Find the Workspace ID.
Steps:
On the top of the page, click Reports. The Reports page opens.
Click the report that you want to embed. The report opens in the Report Editor.
Click the Embed button at the bottom of the page. The embed report dialog opens.
On the Web tab, copy the URL from the iframe’s
In the picture above, the URL to the report is the following:src
attribute.https://secure.gooddata.com/reportWidget.html#project=/gdc/projects/sqmudrnl6hb7snsbqmyh31l9842xh0ve&report=/gdc/md/sqmudrnl6hb7snsbqmyh31l9842xh0ve/obj/2760&title=yes
Open a new browser tab, insert the iframe URL into the address bar, and press Enter. The report appears.
Go back to the embed report dialog, and click Set URL Parameter Filters.
Select the attribute label to use, and enter the attribute value that you want to display. When the attribute name/value pair has been populated, the code snippet is automatically updated.
Copy the new URL from the code snippet above, paste it into a new tab in your browser, and press Enter. The report is now filtered by the specified parameters.
The URL to the report is now the following:
https://secure.gooddata.com/reportWidget.html?label.loan.loanstatus=Closed#project=/gdc/projects/sqmudrnl6hb7snsbqmyh31l9842xh0ve&report=/gdc/md/sqmudrnl6hb7snsbqmyh31l9842xh0ve/obj/2760&title=yes
Note the parameter and value in the URL:
label.loan.loanstatus=Closed
You can now use the final iframe URL to embed the filtered report in other web applications.
- To use multiple attribute values, add the
vals
statement to the URL, and separate the values with commas and no spaces. For example:label.loan.country=vals=US,CZ
Multiple attribute values within the same filter are joined using theOR
logical operator. - Multiple filters based on different attribute labels are combined using the
AND
logical operator.