We would like to have the ability to export a report to a PowerPoint slide.
Since this is not built-in right now, we are looking for a way to make it happen.
One option maybe is to programmaticaly export to TIFF image and insert the image into PowerPoint with the Microsoft object model.
There are two questions in this scenario though:
How do we add a custom option for PowerPoint into the export dropdown?
In the export event, how do we get the tiff file in the code behind so we can load it into a bitmap object and load it into a PowerPoint object?
Thanks in advance for any help!
4 Answers, 1 is accepted
One of the goals for Q1 2011 elaborated in Telerik Reporting Roadmap is New Office Open XML Export Formats. That includes the PowerPoint export option.
If you can't wait for the Q1 release you can implement your own rendering extension. Although there is almost no information on the matter, it is possible to create your own rendering extensions and plug it into the reporting engine. The reason to "keep this in secret" is that there is some work left to be done in order to provide a really powerful plug-in engine (although the current implementation works since day 1).
Attached you may find a sample WinDemo project that contains a sample implementation of custom rendering extension that renders the report in XML as by your request.
As far as the implementation is concerned the most interesting parts are:
- The XmlRenderingExtension is the actual rendering extension that does the work on transforming the processing report into a XML. Please note how the createStreamCallback is used for the extension to ask the reporting engine for a storage for the generated document;
- Once you have the XmlTextWriter, the only thing left is to traverse the processing report items' and create the appropriate XML nodes;
- The app.config contains the registration of our custom rendering extension so the reporting engine can use it. For more information please see Configuring Telerik Reporting.
Another approach would be to hide the viewer's export option and add a simple custom UI with a dropdown or a button that will export PowerPoint. To hide the export options set the Report Viewer ShowExportButton to false. Check out the Exporting Report Programmatically help article.
Greetings,
Peter
the Telerik team
Just two more questions:
When is Q1 2011 expected?
Could we have some more detail on exactly what functionality it would provide on New Office Open XML Export Formats including PowerPoint?
Q1 2011 is expected in mid March. More information on our plans for that Q is available in the Telerik Reporting Roadmap.
All the best,
Steve
the Telerik team
This is a quick follow up to let you know that in Q1 2011 we've added new export formats based on Office Open XML standards available in Microsoft Office 2007 and above:
- Excel Worksheet (.xlsx)
- Word Document (.docx)
- PowerPoint Presentation (.pptx)
Kind regards,
Steve
the Telerik team