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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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   1751 Views

Avatar
ImacSS

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.

Avatar
ImacSS

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.