Creating a Crystal Report by Mapping a CSV File


Overview

Tasks

Included with

Tivoli Asset Management


Overview

About Mapping a CSV file for Crystal Reports

Use this method when the report you want to create includes data from one or more of the hierarchy managers.

Before you use this method for the first time, you must add the CSV file as a data source name through the ODBC Administrator.

To run a report in Tivoli Asset Management and use the output to create a report in Crystal Reports:

  1. Create the CSV source file.
  2. Map the CSV file to an ODBC table.
    Note: ODBC acts as an interface between Tivoli Asset Management and Crystal Reports.
  3. Access the ODBC table from Crystal Reports.

Each of these steps is described in the following sections.


Tasks

Creating the CSV source file To create a Tivoli Asset Management report source file:
  1. From the Asset Management Reports dialog box, select a report.
  2. Choose Run.
    Result: The Run Report dialog box appears.
  3. Under Destination, select File.
  4. Choose File.
    Result: The Save As dialog box appears.
  5. In the File name box, type a path and name for the CSV file.
  6. Choose Save.
    Result: The file path and name you specified appear in the File Name box in the Run Report dialog box.
  7. Choose Run.
    Result: A Successful message appears.
  8. Choose OK.
    Result: The Successful message closes.
Mapping the CSV file to an ODBC table To map a CSV file to an ODBC table:
  1. Choose ODBC from the Run Report dialog box.
    Result: The ODBC Data Source Administrator dialog box appears.
  2. Choose the System DSN tab.
    Result: The System DSN tab appears.
  3. From the System Data Sources table, select TSD_REPORTS.
  4. Choose Configure.
    Result: The ODBC Text Setup dialog box appears.
  5. Clear the Use Current Directory check box.
  6. Choose Select Directory.
    Result: The Select Directory dialog box appears.
  7. Select the directory where your CSV file resides.
  8. Choose OK.
    Result: The ODBC Text Setup dialog box appears.
  9. Choose Options>>.
    Result: The Files section of the dialog box appears.
  10. Under Extensions List, select *.csv.
  11. Choose Define Format.
    Result: The Define Text Format dialog box appears.
  12. Select a CSV file.
  13. Select the Column Name Header check box.
  14. Choose Guess.
    Result: The header fields from the CSV file appear in the Columns list.
  15. Choose OK.
    Result: The ODBC Text Setup dialog box appears. The fields in the CSV file are automatically mapped to the ODBC driver.
  16. Choose OK.
    Result: The ODBC Data Source Administrator dialog box appears.
  17. Choose OK.
    Result: The Run dialog box appears.
  18. Choose Close.
    Result: The Inventory Reports dialog box appears.
Accessing the ODBC table from Crystal Reports To access the ODBC table from Crystal Reports:
  1. From the Reports menu, choose Start Crystal Reports.
    Result:The Crystal Reports window appears.
  2. From the Crystal Reports toolbar, choose the Create New Report button.
    Result: The Create New Report dialog box appears.
  3. Choose Custom.
  4. Choose SQL/ODBC Data Type.
  5. Result: The Log on Server dialog box appears.
  6. Select the TSD_REPORTS server to log on to the server.
  7. Choose OK.
    Result: The Choose SQL Table dialog box appears.
  8. From the SQL Tables list, select the CSV file you created.
  9. Choose OK.
    Result: The Insert Database Field dialog box containing the list of fields for the file you selected appears.

Refer to the Crystal Reports User's Guide or Crystal Reports Help for instructions on placing the fields in the report.