RDL to RDLC Conversion for ASP.NET

I wanted to share a tip that I found with using Business Intelligence Studio templates in Visual Studio 2005. We are currently working on a scaled down version of a dashboard to report on current enrollment numbers, target enrollment numbers and some other data relating to credit hours for each semester. This data is coming from Datatel via a nightly extract, and is stored in SQL where we manipulate it so we can break apart the multi-valued fields.

I was originally creating reports for the web application using Visual Studio 2005 and creating RDLC files. I am using RDLC files because we do not have SQL 2005 with Reporting Services installed anywhere, so we are currently unable to host the new reports on a Report Server. I found that after I installed SQL Server Express 2005 with Advance Features, and selected install client templates (or something like that) I had a new project type in Visual Studio for a Business Intelligence project. After some messing around I found that you can use the advanced features of the Business Intelligence studio to create your reports, but that you can easily convert them to the RDLC files that the report viewer control for ASP.NET looks for.

To do this all you have to do is create a new Business Intelligence Project in VS and either use the wizard to create the reports or create them manually. I’ve been using the wizard, as it cuts development time from a couple hours to a couple minutes. Once you have your report created you can save the file, locate the file on disk and rename it with the RDLC extension.

Next add existing item to your web application. Once you have the new RDLC file in your web application, create a dataset in your App_Code folder using the EXACT same SQL statement(s) that you used in the Business Intelligence Project. Open the RDLC file and rebind both the report data source as well as the datasource for any tables in the report to your new dataset.

Add a .aspx page to the application and drop a report viewer control on the page. Point the control at your RDLC and rebind the data sources. Once complete you will have your report which was originally designed for Report Server, available as a client report that ASP.NET pages will happily display.


Not sure if anyone else has found this out, but I wanted to bring it forward as it can help dramatically reduce development time when creating reports for web applications. Business Intelligence Studio is great as it provides a quick and easy wizard for creating fairly complex reports, and the best part is that the report viewer for asp.net has built in methods to export to Excel and PDF.


I’d be interested to hear if anyone else has other experiences working with RDL and RDLC files for asp.net.

Tags: , ,

1 comments:

Unknown said...

I'm working on a similar project now, however all of our reports have various parameters, which aren't supported in the .rdlc local reports. Also, reports returning large recordsets time out.

It would be nice, as the .rdl files contain all of the query and parameter information, if that information was readable from the .rdlc files. Then you could parse the .rdlc's and dynamically build the datasets and parameter entry controls.

Oh Well.