/

CM Custom Reports (CMCR) - Advanced - Creating Your Own Report


Creating Own Report

Back to User Guides

PHP Experience Required

It's necessary to edit PHP files in order to create new reports. This requires some coding experience.

TIP: Code Sample

Link to the code sample (zip of the sample plugin) - click here.


Steps

  1. Download Sample File
    Follow this link
  2. Unzip file and locate the report
    Under the reports folder

    Sample Report

  3. Change the SampleReport filename to some distinctive and meaningful
    For example, PostsByCategoryReport
  4. Change the include_once dirname( _FILE_ ) . '/reports/SampleReport.php';  to use the correct filename
    For example,  include_once dirname( _FILE_ ) . '/reports/PostsByCategoryReport.php';
  5. Change the CMCR_Sample_Report to CMCR_New_File_Name (following the naming convention)
    For example, CMCR_Posts_By_Category_Report
  6. Modify the code of the report class 
    The parts which need to be changed are marked with the TODO: comment in the code 

    Highlighted Example

    TIP: getData Method

    The most important method to change is the "getData" - which actually is responsible for delivering the data for the graphs.

  7. Install and activate the addon

We Can Help You

If you need a custom report but you're not a developer you can hire our developers and we'll create a custom report for you.


More information about the  CM Custom Reports WordPress  Plugin

Other WordPress products can be found at  CreativeMinds WordPress Store

Let us know how we can  Improve this Product Documentation Page 

To open a  Support Ticket visit our support center