Blogs

DevExpress Data Blog

This blog features all things having to do with data shaping, layout, and presentation!

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.

 

Published Jul 15 2011, 09:21 AM by
Bookmark and Share

Comments

Richard Choroszewski

Interesting.

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

July 17, 2011 2:49 AM

George (DevExpress)

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.

July 18, 2011 5:05 AM

DevExpress Reporting Blog

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

July 20, 2011 12:22 PM

Visual Studio LightSwitch Team Blog

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

July 20, 2011 4:03 PM

Martin Cotter

Thanks guys a really good improvement.

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

July 21, 2011 5:01 AM

George (DevExpress)

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.

July 21, 2011 5:50 AM

colman wells

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.

July 25, 2011 7:22 PM

George (DevExpress)

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.

August 8, 2011 7:24 AM

Ben Lam

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!

October 14, 2011 6:24 PM

nico nico

hi !

how can i use a guid to filter the data^

thank you

April 5, 2012 10:42 AM

Heather Mounts

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

thank you!

November 28, 2012 3:13 PM

About George (DevExpress)

Joined Developer Express on April 4, 2008
LIVE CHAT

Chat is one of the many ways you can contact members of the DevExpress Team.
We are available Monday-Friday between 7:30am and 4:30pm Pacific Time.

If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

FOLLOW US

DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

Copyright © 1998-2014 Developer Express Inc.
All trademarks or registered trademarks are property of their respective owners