Example 1: Passing column values in a drill
Set your Style Studio repository directory to the server SREE home (WEB-INF/classes). See Configuring a Repository in Getting Started for more information.
In this example you will add an auto-drill to the “Order Model” to provide drilldown hyperlinks from the 'Customer' > 'Company' attribute to the 'OrderList' report (in classes/inetsoft/demos). The 'OrderList' report is designed to accept five parameters, one of those being 'customer,' which represents the company name of the customer.
Walkthrough
You will configure an auto-drill on the 'Customer' > 'Company' attribute of 'Order Model' to pass the actual company name (column value) into the 'OrderList' report's 'customer' parameter. (For an illustration of how to target a web page rather than a report, see Example 2: Passing query-based values in drill.)
1. Open the Asset panel. Expand the 'Data Source' node and the 'Orders' data source.
2. Double-click on the 'Order Model' to open the model for editing.
3. Click on the cell in the 'Auto Drill' column corresponding to the 'Customer' > 'Company' attribute. This opens the 'Auto Drill' window for the 'Company' attribute.


4. In the 'Auto Drill' window, click the 'New Drill' button to create a new auto-drill scheme. The new drill is named 'drill0' by default. (If you add more than one drill to a given attribute, the end-user will be presented with a menu of hyperlink choices corresponding to the different drills you have specified.)

5. Rename the new drill by entering a name in the 'Name' field. (We use “DrillToOrderList” as the name of the drill.)
6. Enter a tooltip in the 'Tool Tip' field. (In the example we use “List orders for company” as the tooltip.) The tooltip is displayed when the end-user hovers the mouse over a hyperlink. If there are multiple drills for a given attribute, the tooltip of each drill is displayed when the end-user hovers the mouse over the name of the drill in the menu of hyperlink options.
7. Click the 'Asset Link' button. From the 'Link' popup menu, select the 'OrderList' report.

This 'Link' menu is populated from the repository.xml (reports) and asset.dat (Viewsheets) repository files, which contain the lists of deployed assets. You can also manually enter the name of a deployed asset in the 'Link' field.
If a target report is configured to display parameter sheets when launched, you can bypass these screens by selecting 'Disable parameter sheets' on the 'Auto Drill' screen.
8. (Optional) If you want the target report to be displayed in a particular browser window, enter the name of the desired window in the 'Target Frame' field. (The specified name becomes the DOM 'name' attribute.) To specify that the target report should open in the User Portal frame, select the 'Self' checkbox.
9. Press the 'Add Parameter' (+) button to open the 'Parameter' dialog box.
10. From the 'Parameter Name' menu, select the 'customer' report parameter. This is the report parameter that will receive the passed value.
The parameter name that you specify in the 'Parameter Name' field must match the parameter name specified in the target report. (By selecting a name from the 'Parameter Name' menu, you ensure that the parameter name matches. You can also manually type a parameter name into the 'Parameter Name' field if the parameter has not yet been defined in the report.) See Parameterization in Report Design for more information about configuring report parameters.
11. From the 'Value for Parameter' menu, select 'this.column'. The variable 'this.column' represents the actual data values in the column.

12. Press 'OK' to close the 'Parameter' dialog box.
Report parameters are parameters defined within the report containing the hyperlinks.
13. Check the 'Send Report Parameters' option to send report parameters together with the hyperlink (in addition to the auto-drill parameters).
14. Click the 'OK' button to complete the auto-drill configuration.
15. Save the changes to the data model by clicking the 'Save' button. The final configuration of the 'Auto Drill' window for this example is shown below.

To test the auto-drill you have added to the 'Order Model', you will now create a new report that uses the Customer.Company attribute.
16. Create a new 'Blank Tabular' report. (See Creating a Report in Getting Started for a walkthrough of creating a report.)
17. Click the 'Table' component in the Toolbox panel to start the 'Data Binding' wizard.
18. Under the Data tab of the 'Data Binding dialog box, bind the table to the 'Order Model' data source.
19. In the Columns tab of the 'Data Binding dialog box, select the following columns from 'Order Model': Customer.Company, Customer.City, Customer.State, and Customer.Zip. (Customer.Company is the attribute that you configured for auto-drill.)
20. Click 'Finish' to exit the 'Data Binding' dialog box, and deploy the report to the server. (See Saving a Report to the Working Repository in Getting Started for a walkthrough of creating a report.)
When the user views this report in the User Portal, they will see automatic hyperlinks on all the values in the 'Company' column. (The 'State' column also shows hyperlinks because this attribute was pre-configured for auto-drill.) When the user clicks on one of the 'Company' hyperlinks, this launches the 'OrderList' report in a new browser window, and the 'OrderList' report displays only the orders for the specific company that the user clicked.

All other reports and Viewsheets that use the Customer.Company attribute of the Order Model will now also automatically provide these same drilldown hyperlinks to the 'OrderList' report.
This example illustrated how to pass parameters in an auto-drill hyperlink to a report. You can also pass query-based parameters to a report. The procedure is the same as passing query-based parameters to a web page, which is described in Example 2: Passing query-based values in drill. To auto-drill to a report, select the 'Asset Link' option, and be sure to match the drill parameter names to the report parameter names.
| << Adding Auto-Drilldown to a Logical Model | © 1996-2013 InetSoft Technology Corporation (v11.5) | Example 2: Passing query-based values in drill >> |