How can I generate reports from the command line interface (CLI)? (NETIQKB331)

  • 7700331
  • 02-Feb-2007
  • 19-Jun-2007

Resolution

goal
How can I generate reports from the command line interface (CLI)?

goal
What commands and switches can I use to generate reports?

goal
What is command syntax to generate reports?

fact
Directory and Resource Administrator 6.x

fact
Directory and Resource Administrator 7.x

fix

To generate reports from the command line requires the following:

  • Assistant Admin must be associated with the Built-in Reporting role
  • the data must be imported into the reporting database

Use the following command to generate reports from the imported data:

OAREPT /PRINTBATCH report [/DOMAIN:domain | /LINKDB:dbname] [/OUTPUT:{P|H=directory}] [/DATERANGE:dates] [/DAYS:n] [/GROUPS:groups] [/RESOURCES:systems] [/ACTIVEVIEWS:names]

/PRINTBATCH

Directs Reporting to generate the report.

report

Specifies the name of the report to generate.

/DOMAIN:domain | /LINKDB:dbname

Specifies the database Reporting uses to generate the specified report. If you specify the /DOMAIN option, Reporting uses the EAREPT-domain.MDB file. If you specify the /LINKDB option, Reporting uses the database file specified by the dbname variable.

The dbname variable can be a full path or just the MDB file name. If you specify just the MDB file name, Reporting looks for the specified file in the directory last specified on the Select Import Database window. By default, Reporting looks for the specified file in the REPORTING subdirectory, where the DRA server stores the default MDB files.

/OUTPUT:{P|H=directory}

Specifies the type of output for the report:

P Prints the report on the default printer.

H Generates the report as HTML files in the specified directory.

/DATERANGE:dates

Specifies the report period. The dates variable can be set to one of the following values: S=yyyy-mm-dd specifies the start date and E=yyyy-mm-dd specifies the end date. THISWEEK reports data from Sunday through Saturday of the current week. LASTWEEK reports data from Sunday through Saturday of the previous week. YESTERDAY includes data from the previous day. TODAY reports data from the current day. THISMONTH reports data from the first through last day of this month. LASTMONTH reports data from the first through the last day of the previous month.

/DAYS:n

Specifies the number of days of data to include in the report. This option is evaluated along with the start or end date specified with the option. For example, this value specifies the number of days included in the report after the specified start date, or before the specified end date. If both a start and end date are specified, the number of days is ignored. If neither start nor end date is specified, the report period will be for the previous n  days, where n is a value from 1 to 999.

/GROUPS:groups

Specifies the names of the groups to include in the report. Separate multiple group names with a comma and enclose group names in single-quotes. If a group name includes a single quote, place two single quotes in the group name, such as 'Development's Testers'.

/RESOURCES:systems

Specifies the names of the systems to include in the report. Separate multiple system names with a comma and enclose system names in single-quotes.

/ACTIVEVIEWS:names

Specifies the names of the ActiveViews to include in the report. Separate multiple Ac.
tiveView names with a comma and enclose ActiveView names in single-quotes.

Example 1
To print the complete User Account and Password Updates report of all changes, enter:

OAREPT /PRINTBATCH User Account and Password Updates /OUTPUT:P

Example 2
To save the complete User Account and Password Updates report in HTML format in the default directory for HTML reports, enter:

OAREPT /PRINTBATCH User Account and Password Updates /OUTPUT:H

Example 3
To print the User Account and Password Updates report for all changes in 1999, enter:

OAREPT /PRINTBATCH User Account and Password Updates /OUTPUT:P/DATERANGE:S=1999-01-01 00:00 E=2000-01-01 00:00

Example 4 To print the User Account and Password Updates report for all changes in February, 1999, enter:

OAREPT /PRINTBATCH User Account and Password Updates /OUTPUT:P /DATERANGE:S=1999-02-01 00:00 /DAYS:28

Example 5
To print the User Account and Password Updates report for all changes during the 60 days before and including March 1, 1999, enter:

OAREPT /PRINTBATCH User Account and Password Updates /OUTPUT:P /DATERANGE:E=1999-03-02 00:00 /DAYS:60

.


Additional Information

Formerly known as NETIQKB331