Creating drill down reports is common in data reporting scenarios and is simple to define within QuickReportz.  Using the LinkID method for linking reports creates a common contract between reports and allows for linking between parent-child, and related reports not in a parent-child relationship.  The LinkID method also makes it possible for child reports to be linkable from the URL so a link to the report can be emailed to another user.


To create a child report simply scroll to the "Child Reports" section within the report editor and choose click the "Create Child" button.  Once 1 or more child reports are created they will also be show in this section for easy access.



NAVIGATION HINT:

Once you are on a child report is it easy to return to the parent by clickin the "Go to Parent" button in the lower right




A link parameter value is passed to the child report through the LinkId parameter that is part of every report (you don't need to create this):


;


When a parent report creates a report link column to a child report the LinkID parameter will be populated with a value you can use within your SQL statement to drill down.  In this example a parent report has a list of authors, when a selected author is clicked the child report is loaded and the authorId is passed in the LinkId parameter.


To learn more about linking to child reports click here.


The following example demonstrates how the linkID would be used within the child report SQL query:



NOTE:

If the data type of the link parameter is something other than an integer can change the data type editing the LinkID parameter in the child report by clicking the edit button,