Report viewer from SQL reporting services in VS 2008 report control If I create a new report in VS 2008 they have a .rdlc extension and work correctly.
I have some reports that I was using in SQL reporting services. Extensions are .rdl and want to get them to work with VS 2008.
I copied the rdl files and the .rdl.data files over to VS 2008 (SP1) project but when I go to select the report in the control it does not see the file (I assume it is looking for a .rdlc file)
I tried rename the file to .rdlc and loaded the file up and got
The report definition has an invalid target namespace ' http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition ' which cannot be upgraded.
I see here http://www.gotreportviewer.com/ It says "RDL files are fully compatible with the ReportViewer control runtime. However, RDL files do not contain some information that the design-time of the ReportViewer control depends on for automatically generating data-binding code. By manually binding data, RDL files can be used in the ReportViewer control."
But the link for how to manual bind the data is broken.
Any ideas on how to manually rebind the data? Or a better way to get these reports to work with the 2008 control?
The server version *.rdl in SSRS 2008 is unfortunately not compatible with its local counterpart, the *.rdlc files.
Basically, all you can do is
either use the .RDL directly on the server (using "remote rendering" report in your ReportViewer control)
basically re-create the whole report as a local report from scratch
It's unbelievable - but unfortunately, it's the truth..... let's hope with .NET 4, Visual Studio 2010 it'll be better.
If you don't need advanced features like drill-down, and can't use VS2010, you can do this hack (that I do):
The above list may look scary but it took me only 2 days to hack the complete solution in ASP.NET MVC, and it's only ~300 lines of code, including my own CSV generation.
The code to bind data is very simple once you get DataTable/DataSet (from XML queries):
var reportDataSource = new ReportDataSource();
reportDataSource.Name = name;
reportDataSource.Value = ds.Tables[0];
localreport.DataSources.Add(reportDataSource);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.