Jump to:

3372 Posts in 998 Topics by 712 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Showing custom data in a SS_Report

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

Page: 1
Go to End
Author Topic: 1073 Views
  • mco
    Avatar
    Community Member
    14 Posts

    Showing custom data in a SS_Report Link to this post

    Hi,

    I try to list up custom information in a Report which does not exist as DataObjects in the database.

    In generall I'm using the newq DataObjectSet function and push the objects using new ArrayData into it. That doesn't seem to work in a Report...

    Here is my code:

    function sourceRecords($params = null) {
       $ret = new DataObjectSet();
       $record = array(
          'title' => 'Some Value',
          'value' => '23'
       );
       
       // Commenting the following line works, but of course, there are no results in the report
       $ret->push(new ArrayData($record));

       return $ret;
    }

    function columns() {
       return array(
          "Title" => array(
             "title" => "Title",
             "link" => false,
          ),
          "Value" => array(
             "value" => "Value",
             "link" => false,
          ),
       );
    }

    Calling the report, ends in a "Error loading page" message. There is nothing in the PHP Error logs...
    Any ideas?

    Thanks,
    mcoco

  • mco
    Avatar
    Community Member
    14 Posts

    Re: Showing custom data in a SS_Report Link to this post

    hm... no ideas out there? I don't get it running...

    1073 Views
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.