Solved

ASP Report Viewer Changing Grouping during runtime

Posted on 2011-03-01
5
499 Views
Last Modified: 2012-05-11
Using VS2008/c#/odp.net

1. Created a typed dataset as follows
    select last_name,first_name,location,dept,title from employee
2. Using Report Wizard created a group by Location Like
        Location
                    Last Name, First Name , Location, Dept, title

3. Assigned the rdlc to a report viewer control and it works fine.

My requirement to provide reports grouped  either by location, department or title.

I do not want to maintain 3 rdlc report for the above.
I wanted to use one  and change the grouping field at runtime  based on some condition like

Switch (groupby)
{
case: ‘LOCATION’
case:  ‘DEPT’
case: ‘TITLE’
default:  // By default it is grouped by location.
}

Any input is appreciated.

Suresh
0
Comment
Question by:arvee2003
  • 3
  • 2
5 Comments
 
LVL 13

Expert Comment

by:agarwalrahul
ID: 35014368
please refer link:

http://www.codeproject.com/KB/reporting-services/DataGrouping.aspx

it will help you to solve your problem
0
 

Author Comment

by:arvee2003
ID: 35014469
Thanks. I will take a look at it.

Hope it works in Local Processing Mode.

Suresh
0
 

Author Comment

by:arvee2003
ID: 35014552
I am using VS 2008 and does this work in webforms

Suresh
0
 
LVL 13

Accepted Solution

by:
agarwalrahul earned 500 total points
ID: 35014576
yes it will work on both Winforms as well as Webforms, but the syntax may be changed in webforms to pass parameters.

for your reference please go through the link:

http://www.codeguru.com/cpp/cpp/cpp_mfc/templates/article.php/c12721__2/Dynamic-Data-Grouping-Using-MS-Reporting-Services.htm
0
 

Author Closing Comment

by:arvee2003
ID: 35033501
THanks. I did work out for me
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now