.NET 2.0 Microsoft.Reporting.Webforms.ReportViewer
I'm using the ReportViewer to create reports in a web page. I was able to get reports to show no problem, but one thing I would like to do is sort the data
without making another database call.
Is there a way to sort the data once its been put into the report?
I have a Typed Data Set linked to an SQL Datasource but don't know how to change the view, or access the DataSet (xsd) programmatically.
(The SQLDataSource I can access no problem, but I don't know how to access the dataset)
Re: .NET 2.0 Microsoft.Reporting.Webforms.ReportViewer
If you want to provide the user with interactive sorting then you can find the option in the column properties (can't guide you to the exact menu option as my home comp doesn't have SSRS installed). I will try to provide that by tomorrow morning.
Re: .NET 2.0 Microsoft.Reporting.Webforms.ReportViewer
Why don't you sort the data when you initially get it from the database prior to putting it into the report?
Re: .NET 2.0 Microsoft.Reporting.Webforms.ReportViewer
We're trying to avoid sorting on the database level - its a convoluted stored procedure that creates the data, and it already runs slow.
Re: .NET 2.0 Microsoft.Reporting.Webforms.ReportViewer
I know DataTable (within a normal DataSet object) has the 'DefaultView' method with a 'Sort' method, but I don't see how I can access the Typed Dataset that is being used by my ReportViewer control.
Re: .NET 2.0 Microsoft.Reporting.Webforms.ReportViewer
Have you tried to set the sort value of the report from the properties tab? If you're putting the layout in a table then right click on table, select properties and you'll find a Sorting tab. There in the Expression column you can set a specific column on which it is to be sorted or you can write an entire expression.