Blogs

DevExpress Reporting Blog

Silverlight Reporting - Accessing Subreports' Parameters

     

Here is a brief overview of a small new feature we'll introduce to help simplify use of subreport parameters in Silverlight. 

In previous versions, accessing client-side subreport parameters when using nested subreports was inconvenient. The ReportPreviewModel provided the Parameters property, access its subreport and then use the Parameters property of the subreport again.

the previous approach to access a subreport's parameters

 

This is why we have simplified access to a subreport's parameters. For example, the following code can change the default value for a subreport’s parameter. 

 

void PreviewModel_RequestDefaultParameterValues(object sender, EventArgs e) {
    PreviewModel.Parameters["subreport1.fromDateParameter"].Value = new DateTime(2002, 11, 30);
    PreviewModel.Parameters["subreport1.toDateParameter"].Value = new DateTime(2002, 12, 31);
}

The following image demonstrates the result.

passing parameter values to subreports with XtraReports for Silverlight

 

These changes will take effect with our next minor release (v2011 vol 1.6).

 

 

You can download a sample application that demonstrates this feature here: How to pass parameter values to subreports in Silverlight.

 

 

Please feel free to share your thoughts and comments. 

Published Jul 08 2011, 02:14 AM by George (DevExpress)
Bookmark and Share

Comments

No Comments

About George (DevExpress)

Joined Developer Express on April 4, 2008
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.