**Please note: Subreports feature has been disabled because the implementation was dependant on vaadin addon requiring widgetset recompilation.** ## Embeded reports ## **1. Add links to sub reports.** In this example we will create a link list of user names that lead to detailed report created in previous example. Query returning users and their report counts: ``` select username, count(username) from vries_report_order group by username ``` Add _Table_ component. Insert _Text field_ containing reference to user name in a table detail cell. ![http://wiki.aperte-reports.googlecode.com/git/img/tableDetailRow.png](http://wiki.aperte-reports.googlecode.com/git/img/tableDetailRow.png) Now right click on the _Text field_ and choose _Hyperlink_. Set up _Hyperlink type_ to _Rererence_ and input following expression into _Hyperlink references_: ``` "drilldown?reportName=user_detail_activity" + "&allowRefresh=true" + "&allowedFormats=XLS" + "&username=" + $F{username} ``` `drilldown` is a special command for Aperte Reports to handle subreports. After the question mark you should give the `reportName` and parameters separated by ampersands. Dynamic values ??can be passed beyond the quote as in the example. ![http://wiki.aperte-reports.googlecode.com/git/img/hyperlinkConfiguration.png](http://wiki.aperte-reports.googlecode.com/git/img/hyperlinkConfiguration.png) **2. Publish report and invoke subreports.** Add this report to _Dashboard_ portlet. Now when you click user name link, portlet content will be replaced by a new report. It is possible to return from subreport when you clicking _Back_ button. ![http://wiki.aperte-reports.googlecode.com/git/img/usersActivityReport.png](http://wiki.aperte-reports.googlecode.com/git/img/usersActivityReport.png) * **[Next chapter](BackgroundReporting.md)**