Best Known Method: Creating default Crystal Reports

Version 10

    landesk_logo_3color_138x72.gif

     

    This Best Known Method will show you how to create a report that can be used when you click on the print icon and automatically fill the report with details that were recorded in that window. The report can be used when new objects are created or when an example report has not been provided. A set of example reports for the main objects can be selected as part of an installation.

     

    The report would usually contain additional formatting to match the business requirement which is not covered in this guide. This guide assumes the reader has an understanding of Crystal Reports and the Service Desk database schema. The scope of the LANDesk Support services do not include the provision of assistance with regards to customer’s unique reporting requirements.’ Should assistance be required to produce reports aligned with specific business needs we recommend to contact LANDesk Professional Services or your preferred LANDesk partner

     

    Create a default Report for an Object

     

    In this example, the note object is used.

     

    1. Creating a new Report

    Start creating the new report by opening the Crystal Reports application. Then select file and then click on new and ‘Standard Report’ to create a new Crystal Report.

     

    2. Create a new data connection

     

    The standard report data connection wizard is then displayed. Then dropdown the Create new Connection folder in the available data sources dialog, next dropdown the OLEDB option. A new OLEDB connection dialog box will then be displayed.

     

    1.jpg

     

    3. Select a Data Provider

     

    Select OLE DB provider for SQL Server if a SQL server database is being connected to. If you are connecting to an Oracle database then the connector needs to be set for an OLEDB provider for Oracle. Then select next.

     

    2.jpg

     

    4. Enter database connection details

     

    In the dialog displayed enter the server which contains the database you wish to run the report against. Then enter the username and password and the database name information into the fields provided to connect to the database. Then select finish.

     

    A dedicated account is usually setup for the purpose of connecting to the database. Details can be found in the following community article:

     

    http://community.landesk.com/support/docs/DOC-3565.

     

    3.jpg

     

    5. Add the required tables to the report.

     

    Once the details are completed the main report wizard window will be displayed.

     

    4.jpg

     

    On the dropdown for the new connection select the database then the schema being used for the Service Desk tables. Then dropdown tables and select the tables you wish to add to the report.

     

    5.jpg

     

    The tables that you select will depend on the information you wish to show in the report.

     

    For example, if you wish to create a default report for the note object, the im_incident_note table would need to added to the selected  tables. Any related tables would also need to be added to the report.  If you want to show the note category, the im_incident_note_cat table will also need to be added to the report.

     

    For details of the schema for the Service Desk database, please see the following article:

    http://community.landesk.com/support/docs/DOC-3603

     

    6. Create the table links

     

    If more than one table is selected, the next screen that will be displayed is the Linking options.

     

    6.jpg


    If you have the smart linking feature enabled, the link will be created for you. Please be aware that if the links are generated incorrectly then this may cause the report not to display the data correctly.

     

    Details of the links can be found in schema guide in step five. It is important to use the correct type of link when joining the tables. The following guide looks at troubleshooting any problem with table linking:

    http://community.landesk.com/support/docs/DOC-6983
    Then click next when the links have been created in the report.

    7. Adding attributes to the report

     

    The next screen allows the fields to be added which you wish to show in the report. In this example the note title and the body of the note have been added to the report. However any fields can be selected which need to be displayed in the report.  The available fields displayed are dependent on the tables that were previously selected.  Additional fields can be added after the report has been created using the field explorer.

     

    7.jpg

     

    Then click next on the grouping screen. On the next screen for record selection no fields need to be added for the record selection. The record selection will be covered later in step nine so there is no need to add any values at this stage. Click next to the template screen, then click on finish.

    8. Create a GUID parameter

     

    Once the report has been created, if the field explorer is not already displayed, select view from the menu options and select the field explorer. A parameter field will then need to be created for the GUID (unique identifier for the object). This value is passed from Service Desk to the report so the correct object record can be displayed. The parameter can be created by right clicking the parameter fields and clicking new. In the box enter the name ‘Guid’ and leave all the other fields with their default settings. Click on the Ok button to close the dialog.

     

    8.jpg

     

    9. Add the GUID parameter to the report selection in select expert

     

    To add the selection, click on the select expert button on the tools bar or select report and click select expert in the menu. Then click on the guid value which is used to identify the object in the dialog. In this example this it is the im_guid field. This will need to match the parameter created previously.


    9.jpg

     

    On the dropdown select ‘is equal to’ when the next dropdown box is displayed, select the prompt field that was created in the previous step {?Guid} and click ok.

     

    10. Adding the report to Service Desk

    Once saved, the report is ready to be used by Service Desk. The report needs be saved with the name of the object it is being used for. In this example it is note.rpt. When no report is present the name of the required report is displayed when selecting print. A guide to adding a new report into Service Desk is found in the Administrator's manual on page 146.