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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Customising the CMS /

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

Need to generate class instance reports, with CSV output, for custom Page class.

Go to End

2 Posts   1222 Views


Community Member, 35 Posts

19 October 2010 at 4:15am

Edited: 19/10/2010 4:15am

Working with SS 2.3.2. Built a custom class to display contests.

Each contest needs to have a special reporting function which does the following:
> Displays users who submitted entries
> Ability to output results as CSV.
> Report is ONLY for this specific contest (i.e.; an individual instance of the contest class).

What is the best way to accomplish this?

A) Override SSReport to include a dropdown allowing selection of the contest to report on, and include a button to export to CSV.

If this is the best way, can anyone point me to existing code which overrides SSReport and provides custom controls for filtering and/or button actions?

B) Provide a new button on the CMS contest admin page which generates the CSV report.

If this is the best way, can you point me toward code which creates a custom button on a CMS form to perform an action?

Having trouble locating either code solution on any of the usual SS resource sites.

Appreciate any assistance - thanks in advance.


Community Member, 35 Posts

19 October 2010 at 4:31am

Actually, never mind.

Realized that I can just create a report to list each of the class instances, with submission counts, and provide a link to download the CSV as a standard SideReport.