arvee2003
asked on
ASP Report Viewer Changing Grouping during runtime
Using VS2008/c#/odp.net
1. Created a typed dataset as follows
select last_name,first_name,locat ion,dept,t itle 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
1. Created a typed dataset as follows
select last_name,first_name,locat
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
ASKER
Thanks. I will take a look at it.
Hope it works in Local Processing Mode.
Suresh
Hope it works in Local Processing Mode.
Suresh
ASKER
I am using VS 2008 and does this work in webforms
Suresh
Suresh
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
THanks. I did work out for me
http://www.codeproject.com/KB/reporting-services/DataGrouping.aspx
it will help you to solve your problem