Run user reports

This topic describes the process of running a user report and provides an example of how to set up and run a user report.

User report process

The process of running a user-defined report consists of these stages:

Stage Description
1 The user runs the RUR command from the command-line interface, or uses the Run User Report wizard from the desktop client or web client. You can run the wizard when you select a request.

2

As part of the RUR command, the user specifies:

  • The report definition name

  • The product ID or range of products

  • Any parameter values for the report

  • The name of the output file for the report

3 Dimensions CM verifies the product ID and the user's role on the product(s).
4 Dimensions CM gets the report files specified for the report definition from the database.

5

Dimensions CM executes the default user report file with the statement:

UNIX /bin/sh <command script file> \
<product-range> <other parameters>
Windows <command script file> - <product-range><other parameters>
6 Dimensions CM outputs the report to the specified file.

For details about the RUR command, see the Command-Line Reference.

Back to top

Example: Set up and run a user report

This example demonstrates how to set up a user report in the Administration Console and run it in the desktop client or web client.

Step 1. Set up a user report and assign a report file in the Administration Console:

  1. Create a file in the c:\temp folder: chdoc_report.bat

  2. Copy the following content into the file:

    Copy code
    set SQLFILE=c:\temp\rur.sql
    set RESFILE=c:\temp\res.txt

    echo set pages 0 > %SQLFILE%
    echo select ch_doc_id from pcms_chdoc_data; >> %SQLFILE%
    echo exit >> %SQLFILE%
     
    sqlplus intermediate/intermediate@pc8 @%SQLFILE%
     
    del /f %SQLFILE%
  3. In the Administration Console, go to Database Management > User reports administration > User reports definitions.

  4. In the User Reports Definitions toolbar, click New.

  5. In the New User Report Definition dialog box, create a report with the following parameters:

    Field Description
    Name CHDOC_TEST
    Op System WIN
    Scope Change Management
    Description (Optional)
  6. Click OK.

  7. To assign a new report file, select the user report in the navigation pane.

  8. In the Report Files section of the content pane, click the Assign Report File button and select New Report File.

  9. In the New Report File dialog box, define the following file:

    Field Description
    ID CHDOC_TEST
    Revision 1
    File location to add from c:\temp\chdoc_report.bat
    Filename when running report chdoc_report.bat
    Runs Report? Select this option.

    Note: The file name when running the report must have the .bat extension.

  10. Click OK.

Step 2. Test the report:

To test the report, log in to the Dimensions CM command-line interface (dmcli) and run the following command:

Copy code
rur /PRODUCT=PAYROLL CHDOC_TEST /FILENAME=test.txt

After the command has completed, check the current folder for this file: test.txt

Step 3. Run the report in the web client:

  1. In the web client's Items view, on the toolbar, click the More button and select Run User Report.

  2. In the Run User Report dialog box, define the report to run:

    Field Description
    Scope Change Management
    Report CHDOC_TEST
    Product Qlarius
    Output Filename c:\temp\user_report.out
  3. To run the report, click Next and then Finish.

Step 3 (alternative). Run the report in the desktop client:

  1. In the desktop client, go to Report > User Reports.

  2. In the Run User Reports dialog box, define the report to run:

    Field Description
    Scope Change Management
    Report CHDOC_TEST
    Product Qlarius
    Output Filename c:\temp\user_report.out
  3. To run the report, click OK.

To verify that the report has run correctly, check that the output file was created.

Back to top

See also: