How do I automate the report generation to publish to HTML or Excel? (NETIQKB20709)

  • 7720709
  • 02-Feb-2007
  • 15-Apr-2008

Resolution

Goal

How do I automate the report generation to publish to Excel?

How do I automate the import of reports and export them to HTML?

Can the importing of reports be automated?

Fact

Directory and Resource Administrator 6.60
Directory and Resource Administrator 7.x
Directory and Resource Administrator 8.0

Fix

The command line interface allows reports to be sent to HTML or to the default printer. Since DRA is built on an Access back-end, it is possible to automate the generation of the data to Excel by creating a Macro.  You could then manually run this macro to generate this information.  

To set up the Macro perform the following:

  1. Opened DRA reporting tool.
  2. Select Enter Design Mode from the  File Menu.
  3. Select the Macro tab.
  4. Click New to create a new macro.
  5. Select OpenQuery for the Action
  6. Under the Query Name drop down select the query that you want generate an excel spreadsheet from (in other words the query on which a Report is based.  For example qryUserAccountDetails)
  7. On the next row under the OpenQuery Action created in step 5, select the action TransferSpreadsheet.
  8. Under the Transfer Type dropdown, select Export as the transfer type.
  9. In the Table Name text box enter the query entered for step 6.  (ie.  qryUserAccountDetails).
  10. In the File Name text box, input the full path to where the Excel file will be exported(Ie.  c:\test\output.xls)
  11. Under the Has Field Names dropdown select Yes.
  12. Select Save from the File menu
  13. Enter a name for the Macro and click OK
  14. Run the Macro.

If you wish to automatically run these Macros when one of the reports is run either manually or via the CLI, perform the following:

  1. Open the DRA Reporting tool.
  2. Select File | Enter Design Mode.
  3. Select the Reports tab.
  4. Right click the appropriate report and select Design View.
  5. From the View menu select Properties.
  6. Select the Event Tab
  7. Change the On Open event to be the Macro you created.

For more information on automating the Import process see the following Knowlege Base article:

NETIQKB15025 - "How do I automate the import for Directory and Resource Administrator reporting?"

Note

CLI syntax for the Reporting CLI:

/OUTPUT:{P|H=directory}

Specifies the type of output for the specified report:

P

Prints the report on the default printer.

H

Generates the report as HTML files in the specified directory.

Note

Example scripts that are provided on NetIQ's Knowledge Depot or referenced in Knowledge Base articles are offered on an "as is" basis, and are not part of the supported product set. Customers should be aware that issues that may arise from their use are not supported by NetIQ Technical Support.



 

Additional Information

Formerly known as NETIQKB20709