I want to do the following:
The user sets 3 parameters in MVC3 view: worker name, from date, to date.
This parameters are passed to a stored procedure, which return a table.
I want to use this table as data source for SSRS report and view the report in .aspx page.
Can you tell me how to do that?
I’ve already created the view and the procedure, but I don’t know how to do the rest.
In your Report Builder/BIDS Environment create a new report.
Create a datasource which points to your database.
Create a new dataset which uses this datasource. In your dataset set the command type to a stored procedure and select your procedure from the drop down list. You can then add parameters to your stored procedure, i.e.: “@FromDate”, “@ToDate”.
You can also configure the report to prompt the user for these parameters by right clicking on the report and go to properties and adding parameters this way.
Then in ASP.NET you could direct the user to “http://yoursite.com/Reports/Report.aspx?FromDate=….&ToDate=….&WorkerName=Ivan”
I have included a few resources which may also help you achieve this.
Resources:
http://www.codeproject.com/Articles/20540/Using-StoredProcs-with-Parameters-in-SQL-Reporting
http://msdn.microsoft.com/en-us/magazine/cc188691.aspx