Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Customising the CMS /

SS_Report + getReportField




Community Member, 189 Posts

16 June 2010 at 2:50am

Edited: 16/06/2010 4:29am


I'm trying to use getReportField to display a ComplexTableField but i'm having a very hard time figuring out how to do it.


* An extension to {@link SSReport} that allows a user to view all, booked, and not booked reports

*Gets all Rental Requests
class AllRentalRequestReport extends SS_Report {
      function title() {
         return 'All Rental Requests';
      function description() {
         return 'All Rental Requests';
   function getReportField(){
      $CTF = new ComplexTableField(
            'All Rental Requests Report',
            $fieldList = array(
               'ID' => 'ID',         
               'FirstName' => 'First Name',
               'LastName' => 'Last Name'
      return $CTF;


BookingFormSubmission is a class that has several fields, nothing more

* Custom class used to process Booking request form

class BookingFormSubmission extends DataObject {
         static $db = array (
            'FirstName' => 'Text',
            'LastName' => 'Text',
            'Email' => 'Text',
            'PhoneNumber' => 'Text',
            'ArrivalDate' => 'Text',
            'DepartureDate' => 'Text',
            'Guests' => 'Text',
            'AdditionalQuestions' => 'Text',
            'Booked' => 'Boolean'


I can't get the ComplexTableField form to show up in the CMS. I believe I am doing something wrong with the ComplextableField constructor but just not sure how to make it work correctly. Any guidance would be nice.

I've already tried looking at
[url][/url] and [url][/url] but still confused.

Thank you