Silverlight Reporting - Accessing Subreports' Parameters

DevExpress Data Blog
08 July 2011

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. 

Showcase Your Apps on

Highlight your business app and share your development experiences with the DevExpress community. To include your app in our upcoming App Showcase, please forward an application screenshot to and tell us which DevExpress products you currently use within your organization.
No Comments

Please login or register to post comments.