Publish a report snapshot to the Web

Microsoft Office Access 2003

Show All Show All

Publish a report snapshot to the Web

  1. Create a macro.

    Show How?

    1. In the Database window, click Macros Button image under Objects.
    2. Click the New button on the Database window toolbar.
    3. Add an action to the macro.

      ShowHow?

      1. 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 Button image on the toolbar.
      2. In the Action column, click the arrow to display the action list.
      3. Click the action you want to use.
      4. 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.
      5. Type a comment for the action. Comments are optional.
    4. 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.
  2. 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
  3. Run the macro each time you want to export the report snapshot.

    ShowHow?

    To run a macro directly, do one of the following:

    • To run a macro from the Macro window, click Run Button image on the toolbar.
    • To run a macro from the Database window, click Macros Button image 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.
  4. 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>
    				
    Embed the Snapshot Viewer control in an HTML Object tag by using the Microsoft ActiveX Control Pad application, and set the control parameters using the Control Pad Object Editor (you can only use this method with Microsoft Internet Explorer version 3.0 or later). For example:
    <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.