Blogs

DevExpress Reporting Blog

WinForms–End-User Report Designer Custom Report Storage (Coming in v2010 vol 2)

     

Coming in version 2010 volume 2 we’ve made it easier to save and load reports to any data source in the end-user report designer. In the following diagram I have created a new Open Dialog which loads the report definition from a dataset saved to an xml file:

Open

This kind of extension will allow you and your users to save reports to virtually any medium! A special class needs to be created that extends the CustomReportStorage class that has the following methods:

  1. bool CanSetData(string url) – Whether or not a particular url (or report) can be saved
  2. byte[] GetData(string url) – Get report data by url (or name)
  3. string GetNewUrl() – Load or open a report
  4. string[] GetStandardUrls(ITypeDescriptorContext context) – Whether or not we can specify a url (name) for sub reports
  5. bool GetStandardUrlsSupported(ITypeDescriptorContext context) – Available report url (name) for sub reports
  6. bool IsValidUrl(string url) – Whether or not a report url (name) is valid)
  7. void SetData(XtraReport report, string url) – Save a report by url (name)
  8. string SetNewData(XtraReport report, string defaultUrl) – Save a new report by url (name)

Here is the Save dialog box:

Save

The form I created is simply our grid and the populated dataset!

SaveDialog

I made a video walking through this example located here.

As always, if there are any comments and/or questions, feel free to get a hold of me!

Seth Juarez
Email: sethj@devexpress.com
Twitter: @SethJuarez

Published Nov 29 2010, 06:31 PM by Seth Juarez (DevExpress)
Bookmark and Share

Comments

 

Manel Mateu said:

Hi,

Good news.

Where is the demo in 10.2.3 ?

Thanks

December 14, 2010 5:23 AM
 

Alan (DevExpress) said:

Hi Manel,

This example is available in our Code Central at www.devexpress.com/example=E2704.

December 14, 2010 7:01 AM
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.