Jump to:

23483 Posts in 18976 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Reports in SS3

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 131 Views
  • lozhowlett
    Community Member
    146 Posts

    Reports in SS3 Link to this post


    The documentation is very lacking on reports... I have created a sample report just to test the water, but it doesnt seem to be showing up in the admin system. I have also tried

    SS_Report::register("ReportAdmin", "BookingReport_BookingSummary");

    but get a error that SS_Report is undefined?

    * This report lists all the pages in the CMS
    * of type Page. Sorted by title.
    class BookingReport_BookingSummary extends SideReport {
    public function title() {
    // this is the title of the report
    return "Booking Summary Report";

    // public function records() {
    // // the data the report returns all the dataobjects of type Page and sorted by title. See datamodel for more info
    // return Bookings::get()->sort("Created ASC");
    // }

    function records($params, $sort, $limit){
    $Bookings = DataObject::get("Bookings", "BookingStatusID = '" . $params['BookingStatusID'] ."'", "Created DESC", Null, $params['ResultsLimit']);
    return $Bookings;

    public function fieldsToShow() {
    // fields you want to display. This will display a list of titles which link to the page in the cms. Handy!
    return array(


    function parameterFields() {
    $params = new FieldSet();
    //Colour filter
    $params->push(new DropdownField(
    "Booking Status",
    '1' => 'Not Paid',
    '2' => 'Cancelled',
    '3'=> 'Paid',
    'NULL' => 'All'

    //Result Limit
    $ResultLimitOptions = array(
    50 => '50 Bookings',
    100 => '100 Bookings',
    200 => '200 Bookings',
    500 => '500 Bookings',
    Null => 'All Bookings'

    $params->push(new DropdownField(
    "Limit results to",

    return $params;


  • Bonner
    Community Member
    19 Posts

    Re: Reports in SS3 Link to this post

    You don't need to register reports in SS3, they are registered automatically. Comment out the following:

    SS_Report::register("ReportAdmin", "BookingReport_BookingSummary");

  • Bonner
    Community Member
    19 Posts

    Re: Reports in SS3 Link to this post

    Also, you need to do a dev build for it to show.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.