1 Reply Latest reply on Apr 19, 2013 1:11 PM by Nic Meadows

    Help creating custom reports

    Randy Voss Newbie

      I am trying to create a custom report for Pharos reports with will show me all charging center charges by cost center and then further break it down by device that was used.  It would be similar to the predefied "Cost Center Charging Detail" except instead of listing out users it will show devices.  I have attached an example of the Cost Center Charging Detail report:

       

      Capture.jpg

        • Re: Help creating custom reports
          Nic Meadows Ranger

          Hi Randy,

           

          This is not a qucik and easy task as the data you require is not in the stored procedure that the CostCentreChargingDetail.rpt uses.

           

          You are going to have to write your own stored procedure to return the additional data you need. I had a quick look at the rpt_cc_charging_model sp and it doesn't look like you'd need to add much more in there. Create a new sp based upon the rpt_cc_charging_model_detail DO NOT edit the standard one as otherwise you'll break things!!

           

          In principal you need to either edit a Pharos report. (We use MS visual Studio with the Crystal Report add in (Free for vs2010)) or create one from scratch. Editing one is quicker. The only thing to consider is which version of Crystal reports you need. For Pharos v8.2 the VS2010 crystal report version is fine, for earlier Pharos versions you may need earlier version of VS with earlier versions of crystal reports.

           

          You need to ensure that you have Pharos reports installed on the dev machine or you need to correctly create the System DSN PHAROSReports which the reports use.

           

          Copy the existing report CostCentreChargingDetail.rpt and edit it in VS2010. Right click on the report, click preview report, it should now bring up a parameter dialog, enter the parameters of the report and connect to the Pharos DB using the PHAROSReports System DSN.

           

          Now remove the rpt_cc_charging_detail from the database fields in the Field Explorer. This will remove all the fields from the report. Its supposed to do that!

           

          Add a new database field, browse to your new stored procedure, supply the parameters and it should give you a list of fields you can drop onto the report.

           

          Create the report as you want it and save it.

           

          You now need to add the report to Pharos reports. Pharos prefer that you replace a standard report with a custom report, which you can do as long as the parameters you need in your report match another in Pharos (and you are not using the standard report.) In this instance you need to drop the report into C:\Program Files\Pharos\Reports\Custom for each computer you want to run it on. The report filename needs to match the report you are replacing.

           

          **** WARNING ****

           

          If you do the following, Pharos frown upon customers directly editing the DB. The modifications are not supported by Pharos and you may have issues when it comes to upgrade or if there are hotfixes to the reports. Before you start ensure you have a backup of the DB and you are confident you can restore if it all goes wrong. If your SQL skills are not upto this, DO NOT ATTEMPT!!!

           

          **** END OF WARNING ****

           

          The other option is to edit the SQL tables in the DB where the reports are held to add your new report. You'll need to disable the triggers on the tables. Add entries to the rpt_reports and rpt_reportparams, then enable the triggers again. Copy the parameter values based upon the report you edited for the rpt_reportparams table. You then just drop the report in the C:\Program Files\Pharos\Reports\standard folder for each computer running Pharos reports.

           

          Good Luck!

          1 of 1 people found this helpful