| Crystal Reports Integration |
Create flexible custom reports using Crystal Reports to suit your business based on the ServiceDesk Plus data.
ServiceDesk Plus Database and Drivers:
ServiceDesk Plus 5 (Build 5003) uses MySQL 4.1.12 in the backend, to connect to this database from Crystal Reports you need a MySQL ODBC Driver. Download the latest version MySQL Connector / ODBC 3.51 from the URL
http://dev.mysql.com/downloads/connector/odbc/3.51.html
Pick a mirror to download. Don’t bother to fill up the huge form, scroll down; you will see the download URLs.
You can create a Data Source Name to easily connect from Crystal Reports.
Before we get further into the topic. I am assuming that you have a basic understanding of Crystal Reports. If you are looking for information on getting started refer: www.crystalreports.com
You can access ServiceDesk Plus database from Crystal Reports 11. In the Getting Started Page, choose the Standard Report Wizard under New Reports section.

When you double-click on Make a New Connections, all the Data Source Name (servicedeskplus) configured are listed




After selecting the required tables and fields based on which you have to generate reports. Select the fields that need to shown in the reports and you can link the tables based on names or key.
To get the Create time for a request from the workorder table
NumberVar TimeChange := -1;
NumberVar SecPerDay := 86400;
NumberVar SecPerHr := 3600;
TimeValue (Remainder((({workorder.CREATEDTIME}/1000)-(TimeChange * SecPerHr)),SecPerDay)/SecPerDay) ;
To get the Create date for a request from the workorder table
NumberVar TimeChange := -1;
NumberVar SecPerDay := 86400;
NumberVar SecPerHr := 3600;
Truncate((({workorder.CREATEDTIME}/1000)-(TimeChange * SecPerHr))/SecPerDay) + Date(1970,01,01);
As you might notice the Variable Time Change is the offset to GMT.
More Details on Date functions in Crystal Reports
Here is a sample report (.rpt file)

Download the a sample report file(.rpt)
Finally you can choose a template and create your reports. You can use the Crystal Reports Field Explorer to add more fields and enrich your
report. The Design view helps you to customize and format the reporting fields. Click Finish to create your report.

This evolving article is not complete without your contribution and feedback. Please share your sample reports, tips, and tricks. Shoot them to support@servicedeskplus.com or directly to alexdpaul@adventnet.com.
Contributing Authors