Solved

ASP Report Viewer Changing Grouping during runtime

Posted on 2011-03-01
5
490 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
Comment Utility
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
Comment Utility
Thanks. I will take a look at it.

Hope it works in Local Processing Mode.

Suresh
0
 

Author Comment

by:arvee2003
Comment Utility
I am using VS 2008 and does this work in webforms

Suresh
0
 
LVL 13

Accepted Solution

by:
agarwalrahul earned 500 total points
Comment Utility
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
Comment Utility
THanks. I did work out for me
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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

11 Experts available now in Live!

Get 1:1 Help Now