Filtering Report Data using LightSwitch Query Parameters

In the next minor release (v2011 vol 1.6), XtraReports will provide the capability to filter your report's data on the server-side by utilizing LightSwitch queries. This blog demonstrates this functionality.

After adding a query to your application…

Adding LightSwitch Query

…you can define a parameter to be used in its filtering criterion, …

LightSwitch queries in XtraReports

Now all you need to do is bind to the query in the report

Binding XtraReport to LightSwitch Query

... and the rest is taken care of automatically.

Passing parameters to LightSwitch reports

Once the application is run, the Parameters panel of the report's Print Preview will be enabled so that you can pass values to the query parameter which then re-creates the report document.

Passing parameters to XtraReports in LightSwitch

Please feel free to leave your comments below.

 

Interesting.

Any suggestions how the parameter could be set up as a drop down for example to provide a list of countries?

17 July, 2011

Hi Richard. Thank you for your interest in our product! As for your question, we addressed this functionality in our new LightSwitch demos that will be shipped with our next minor version (v2011 vol 1.6), which we expect to release later this week.

18 July, 2011

In this blog post I will explain another small feature of XtraReports for LightSwitch: the ability to

20 July, 2011

DevExpress has added LightSwitch support to their award winning reporting solution, XtraReports. This

20 July, 2011

Thanks guys a really good improvement.

One thing though ,after installing the update I am now getting a reportpreview does not exist error :(

21 July, 2011

Hello Martin. This error may appear because we have changed the approach of showing report preview in LightSwitch. The new approach is explained at community.devexpress.com/.../lightswitch-reporting-showing-your-reports-in-a-separate-screen.aspx. Please let me know whether or not this is helpful.

21 July, 2011

I like the seperate screen approach.Now how do i call and pass the parameter from another screen programmatically instead of data entry on the report screen.

25 July, 2011

Hello Colman. The following thread demonstrates an idea of how you can solve this task: community.devexpress.com/.../351109.aspx. Please try this solution and let me know whether or not it is helpful.

8 August, 2011

Hi George, I want t offer a drop down for parameters as Richard suggested. Where can I find the demo/source code/example you referred to in your July 18, 2011 10:05 AM post? Thanks!

14 October, 2011

hi !

how can i use a guid to filter the data^

thank you

5 April, 2012

This is great!  Is there a way I can multilple parameters?

thank you!

28 November, 2012

Please login or register to post comments.