General advice on creating a report on Configuration Items

Version 2

    Environment: Crystal Reports against a Service Desk database


    Some general advice about how to go about creating a report on Configuration Items.


    Tables that you may need in the report


    • All CI items should exist in the cf_config_item table. Any attributes that apply to all CI types will be stored in this table.
    • In Object Designer you will see that you have child objects below the main Configuration Management.Configuration Item object. Each of these is a Configuration Item Type.  If you have created attributes on that are specific to just that CI type then these will be stored in a table prefixed with usr_<config type>. For example, if your CI type object is called monitor then your table would be called usr_monitor.
    • If you want to link information between the cf_config_item table and your individual CI type tables then you would do this by linking cf_config_item.cf_guid to usr_<config type>.cf_guid. So for example cf_config_item.cf_guid to usr_monitor.cf_guid. Unless you only want to see just the CIs that are for this one CI type you may want to make this a left-outer table join (right click on the join and select properties in order to do this).
    • The CI types themselves are all stored in a table called md_class_type. You would need to link cf_config_item.cf_class_type_guid to md_class_type.md_guid.
    • In one instance, a customer had a drop-down on the CI which was called "primary user" where they could select the main user of the item:  Users are all stored in a table called tps_user.  On the md_class_type table there should be a reference to this primary user (perhaps called usr_primaryuser) and this will need to be linked to tps_user.tps_guid then drop the tps_name or tps_title from the tps_user table onto your report.
    • If you want to show items on the report despite there not being data in all the fields then you need to change to left-outer joins. I wrote a document about this a while ago: Writing a crystal report and it doesn't bring back expected records (Service Desk)


    Getting the report to run from the Print button

    When you are in an IPC you may have setup a hyperlink into a CI on the CI label.  If you click on this hyperlink to load the CI the Print button will then available.  Here are some steps in order to configure a report to run when clicking the Print button here:


    • Firstly, try clicking the Print button to see what report name it is looking for, where it is looking for it and create your report with the same name and location.  The report name will be based on your CI type.  For example if your CI type is called laptop you will need to create _Laptop.rpt
    • In your Crystal report, create a new string parameter field. Call it Guid for example.
    • Go into Report - Select Expert then select cf_config_item.cf_guid.
    • Then select "Is Equal To" and then in the drop-down select the parameter you created at step 1. NOTE: If this parameter doesn't show in the drop-down you didn't create it as a string.
    • Save your report and you will be prompted for a Guid but cancel this.
    • Your report should now run from the print icon on a CI.