Publish a report snapshot to the Web
- Create a macro.
- In the Database window, click Macros under Objects.
- Click the New button on the Database window toolbar.
- Add an action to the macro.
- In the Macro window, click the first empty row in the Action column. If you want to insert an action between two action rows, click the selector for the action row just below the row where you want to insert the new action, and then click Insert Row on the toolbar.
- In the Action column, click the arrow to display the action list.
- Click the action you want to use.
- In the lower part of the window, specify arguments for the action, if any are required. For action arguments whose settings are a database object name, you can set the argument by dragging the object from the Database window to the action's Object Name argument box.
- Type a comment for the action. Comments are optional.
- To add more actions to the macro, move to another action row and repeat step 3. Microsoft Access carries out the actions in the order you list them.
- Add the OutputTo action to the macro. Make sure you output directly to the folder on the Web server. For example:
Argument Value Object Type Report Object Name Catalog Output Format Snapshot Format Output File \\Website\Inetpub\wwwroot\Webreports\Catalog.snp - Run the macro each time you want to export the report snapshot.
To run a macro directly, do one of the following:
- To run a macro from the Macro window, click Run on the toolbar.
- To run a macro from the Database window, click Macros and then double-click a macro name.
- On the Tools menu, point to Macro, click Run Macro, and then select the macro from the Macro Name list. Then click a macro in the Macro Name box.
- Run a macro from a Microsoft Visual Basic procedure by using the RunMacro method of the DoCmd object.
- On the home page of the Web site, do one of the following:
Create a link to the report snapshot using an HTML anchor tag. For example:
<A HREF="http://Website/WebReports/catalog.snp">Catalog report</A>
<OBJECT ID="SnapshotViewer" WIDTH=640 HEIGHT=480 CLASSID="CLSID:F0E42D60-368C-11D0-AD81-00A0C90DC8D9"> <PARAM NAME="_ExtentX" VALUE="16722"> <PARAM NAME="_ExtentY" VALUE="11774"> <PARAM NAME="_Version" VALUE="65536"> <PARAM NAME="SnapshotPath" VALUE="http://Website/WebReports/catalog.snp"> <PARAM NAME="Zoom" VALUE="0"> <PARAM NAME="AllowContextMenu" VALUE="-1"> <PARAM NAME="ShowNavigationButtons" VALUE="-1"> </OBJECT>
When you click the link or the Snapshot Viewer control, Internet Explorer displays the report snapshot.
Note If the report is based on a parameter query, modify the macro to run it in a batch file. You can use the SendKeys action to pass the parameter information, or you can modify the report by removing the parameter query and using specific criteria.
Security Avoid using the SendKeys statement or an AutoKeys macro with sensitive or confidential information. A malicious user could intercept the keystrokes and compromise the security of your computer and data.