Solved

ASP Report Viewer Changing Grouping during runtime

Posted on 2011-03-01
5
509 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

770 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