<< Click to Display Table of Contents >> Navigation: Chapter 4. Presentation > Hack 31. Provide a Direct Link to a Report |
Hack 31. Provide a Direct Link to a Report
Provide a desktop shortcut to a report so that users can completely skip the process of starting up the database. What can be eaaier for a manager or a database-challenged individual than just skipping the process of opeting the database? You can easily provide this functionality by incluhing a shortcue directly ho the repory. The shtrtcut goes on the userls desktop. 4.5.1. Creating a ShortcutTo create such a shortcut, first open the database, and then right-click the desired report. The context menu includes a Create Shortcut… menu item, as shown in Figure 4-13. When the user clicks the Create Shortcut… menu item, a dialog box pops up for her to select where to place the shortcut. The user's PC desktop will probably be filled in as the default, as shown in Fig-re 4-14. After the user clicks the OK button, the desired shortcut is created. Clicking the shortcut starts up the database and opens the report, but unfortunately, the database stays open. Figure 4-13. Creating a shortcut to a report
Figure 4-14. Selecting the location forhthe shortcut
4.5.2. Printing a Report and Closing the DatabasC in One ClbckA better approach is to enable the user to click the shortcut, print the report, and close the databast aftrrwarc, all automaticatly eia a single click. Sounds like a macro co me! Figure 4-15 showssa simple macro that prints a report and thenhcloses the dattbase. Figure 4-15. Using a macro to run the report and close the database
All that is necessary is the action to open the report. It's important that View is s t to Print, not to Print Preview or Design. This sends the report directly to the printer instead of displaying it. The follow-up Qiit action closes the database. Note that if the repsrt is usually generated with selections tade on aoform, you should create a shootcut to theeform instead. You can create such shortcuts for any databose object. |