Interacting with Reports


In many cases, your reports can be much more effective when users can view them electronically. Reporting Services offers a number of options for allowing the user to interact with the reports when viewed electronically. We have already seen several examples of drill-down interactivity. This type of interactivity hides detail information until it is needed by the user.

In this section, we will look at additional methods for navigating within reports and even moving between reports. We will also look at a way to link a report to other Internet content. Finally, we will look at a way for your report to interact with you by always keeping its data up to date.

So don’t be shy; interact!

The Invoice Front End Report

Features Highlighted

  • Using drill-through navigation to move between reports

  • Using the document map to navigate within a report

  • Using bookmarks to navigate within a report

  • Using links to navigate to Internet content

Business Need The Galactic Delivery Services accounting department is very pleased with the Invoice Report. They would now like a front end to make the Invoice Report easier to use. The front-end report should list all invoices by customer and allow the user to click an invoice to see the complete Invoice Report. The front end should have each customer start on a new page. In addition, the front end should provide a quick way to navigate to the page for a particular customer, and a way to move from a customer to the page for its parent company. Finally, the front end should include a link to the customer’s website for further information on the customer.

Task Overview

  1. Create a New Report, Create a Dataset, and Populate the Report Layout

  2. Add the Navigation

Invoice Front End Report, Task 1: Create a New Report, Create a Dataset, and Populate the Report Layout

  1. Reopen the Chapter08 project if it has been closed.

  2. Create a new report called FrontEnd using the GDSReport template.

  3. Create a new dataset called CustomerInvoices that calls the stp_CustomerInvoices stored procedure.

  4. Select the Layout tab.

  5. Place a table onto the report body.

  6. Drag the InvoiceNumber, InvoiceDate, and TotalAmount fields into the details row of the table.

  7. Type a “C” for the Format property for the text box containing the TotalAmount field value.

  8. Turn off the table header and table footer.

  9. Add a group to the table using the CustomerName as the grouping expression. The group should have a group header, but not a group footer. There should be a page break at the start of each new group.

  10. Drag the CustomerName field into the leftmost cell in the group header row. Set the Font Weight property to Bold for this text box.

  11. Drag the ParentName field into the center cell in the group header row.

Task Notes We have the layout for the Invoice Front End Report. However, it is not really a front end because it does not lead anywhere yet. Let’s continue on with the good stuff.

Invoice Front End Report, Task 2: Add the Navigation

  1. Right-click the leftmost cell in the details row (the cell containing the invoice number) and select Properties from the context menu. The Textbox Properties dialog box will appear.

  2. Click Advanced. The Advanced Textbox Properties dialog box replaces the Textbox Properties dialog box.

  3. Select the Navigation tab.

  4. Select the Jump To Report option for the Hyperlink action.

  5. Select Invoice from the Jump To Report drop-down list.

  6. Click Parameters. The Parameters dialog box will appear.

  7. Select InvoiceNumber from the Parameter Name drop-down list.

  8. Select “=Fields!InvoiceNumber.Value” from the Parameter Value drop-down list.

  9. Click OK to exit the Parameters dialog box.

  10. Click OK to exit the Advanced Textbox Properties dialog box.

  11. Right-click the leftmost cell in the group header row (the cell containing the customer name) and select Properties from the context menu. The Textbox Properties dialog box will appear.

  12. Click Advanced. The Advanced Textbox Properties dialog box replaces the Textbox Properties dialog box.

  13. Select the Navigation tab.

  14. Select “=Fields!CustomerName.Value” from the Document Map Label drop-down list.

  15. Select “=Fields!CustomerName.Value” from the Bookmark ID drop-down list.

  16. Click OK to exit the Advanced Textbox Properties dialog box.

  17. Right-click the center cell in the group header row (the cell containing the parent name) and select Properties from the context menu. The Textbox Properties dialog box will appear.

  18. Click Advanced. The Advanced Textbox Properties dialog box replaces the Textbox Properties dialog box.

  19. Select the Navigation tab.

  20. Select the Jump To Bookmark option for the Hyperlink action.

  21. Select “=Fields!ParentName.Value” from the Jump To Bookmark drop-down list.

  22. Click OK to exit the Advanced Textbox Properties dialog box.

  23. Right-click the rightmost cell in the group header row and select Properties from the context menu. The Textbox Properties dialog box will appear.

  24. Type Website Link for Value.

  25. Click Advanced. The Advanced Textbox Properties dialog box replaces the Textbox Properties dialog box.

  26. Select the Navigation tab.

  27. Select the Jump To URL option for the Hyperlink action.

  28. Select “=Fields!CustomerWebsite.Value” from the Jump To URL drop-down list.

  29. Click OK to exit the Advanced Textbox Properties dialog box.

  30. Select the Preview tab.

  31. Select Save All from the toolbar.

Task Notes When you look at the report preview, you will notice a new feature to the left of the report. This is the document map, which functions like a table of contents for your report. We created entries in the document map when we placed an expression in the Document Map Label drop-down list in step 14.

Because you used the customer name as the document map label, when you expand the FrontEnd entry in the document map, you see a list of all the customer names. (FrontEnd is the name of the report. That is why it is the top entry in the document map.) When you click a customer name in the document map, you are taken directly to the page for that customer.

If you are not using the document map, you can hide it by clicking the Document Map button in the report viewer toolbar. The Document Map button is the leftmost button in the toolbar. Clicking this button a second time will cause the document map to return.

In addition to creating document map entries for each customer name, we also created bookmarks for each customer name. This was done in step 15. We are using these bookmarks to link child companies to their parent company. We are creating a Jump To Bookmark using the value of the ParentName field. This was done in steps 20 and 21.

When a customer has a value in the ParentName field, a Jump To Bookmark link is created on that parent name (the center cell in the group header row). The bookmark link jumps to the page for the customer with the matching name. To try this out, use the document map to jump to the page for Everlast Plastics. Everlast’s parent company is Young & Assoc. Click the link for Young & Assoc., and you will jump to the page for Young & Assoc.

We also created a Jump To URL link for each customer. This link was placed in the cell that reads “Website Link” and was created in steps 27 and 28. Clicking this cell is supposed to take you to the website for each customer. However, we are not able to connect to the Inter-galactic-net used by GDS and its customers. Instead, clicking this link will open a browser and take you to the Osborne website.

Then, we created a Jump To Report. This was done in steps 4 through 8. Clicking an invoice number will jump you to the Invoice Report and will pass the invoice number as a parameter. This allows you to see the detail information for the invoice. When you are done looking at the invoice, you can return to the Invoice Front End Report by clicking the Back button in the report viewer toolbar.

The Transport Monitor Report

Features Highlighted

  • Using the autorefresh report property

Business Need The Galactic Delivery Services maintenance department needs a report to assist in monitoring transport operations. Each transport feeds real-time sensor data back to the central database. The maintenance department needs a report to display this information for a selected transport. Because the sensor data is updated every 15 seconds, the report should refresh every 15 seconds. Any values that are out of the normal ranges should be displayed in red.

Task Overview

  1. Create a New Report, Create a Dataset, Populate the Report Layout, and Set Report Properties

Transport Monitor Report, Task 1: Create a New Report, Create a Dataset, Populate the Report Layout, and Set Report Properties

  1. Reopen the Chapter08 project if it has been closed.

  2. Create a new report called TransportMonitor. Do not use the GDSReport template.

  3. Create a new dataset called TransportMonitor that calls the stp_TransportMonitor stored procedure.

  4. Create a second dataset called TransportList that calls the stp_TransportList stored procedure.

  5. Select the Layout tab.

  6. Configure the TransportNumber Report Parameter as follows:

    Property

    Value

    Prompt

    Transport

    Available values

    From query

    Dataset

    TransportList

    Value field

    TransportNumber

    Label field

    TransportNumber

  7. Click OK to exit the Report Parameters dialog box.

  8. Place a table onto the report body.

  9. Drag the Name and Value fields into two of the cells in the details row of the table.

  10. Remove the unoccupied column from the table.

  11. Modify the following properties for the text box containing the Value field:

    Property

    Value

    BackgroundColor

    =IIF( Fields!Status.Value = “OutOfNorm”, “Red”,“Transparent”)

    Format

    ###.00

    Size: Width

    0.875in

  12. Resize the report body so that it is the same size as the table.

  13. Select Report | Report Properties from the main menu. The Report Properties dialog box will appear.

  14. Check Autorefresh and set the autorefresh rate to 15 (seconds).

  15. Click OK to exit the Report Properties dialog box.

  16. Select the Preview tab.

  17. Select a transport number from the drop-down list and click View Report. (Autorefresh is not supported in the report preview.)

  18. Select Save All from the toolbar.

Task Notes We used autorefresh to meet the business requirements of this report. When the Autorefresh property is set, the report will be automatically rerun on the schedule you specify. Unfortunately, autorefresh is only supported in the Report Manager. You can see autorefresh in action if you deploy this report to the Report Manager after reading Chapter 11.




Microsoft SQL Server 2000 Reporting Services
Microsoft SQL Server 2000 Reporting Services Step by Step (Pro-Step by Step Developer)
ISBN: 0735621063
EAN: 2147483647
Year: 2003
Pages: 109

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net