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

29 November 2010

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

4 comment(s)
Manel Mateu

Hi,

Good news.

Where is the demo in 10.2.3 ?

Thanks

14 December, 2010
Alan (DevExpress)

Hi Manel,

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

14 December, 2010
alijoe

Hi,

Can you tell me where I can find the sample app to this example?

It just what I'm looking for.

Thanks

27 June, 2013
LeeTaylor

I can see this is no longer being maintained.

24 August, 2018

Please login or register to post comments.