In 2010 v1, ComponentOne added preliminary support for the Microsoft Reporting Services (RDL) to the C1PrintDocument component. Now it's so easy to display your RDL reports in your WinForms applications and get all of the extra features that come with ComponentOne Reports for WinForms, as well as other development platforms which support ComponentOne reports such as ASP.NET, WPF and soon Silverlight!

Now, this "reporting" functionality is actually separate from the C1Report component, as its part of C1PrintDocument which is included with the Reports for WinForms product. You can create your reports any way you want (Crystal, Access, C1Reports, and now RDL 2008) and display them in your applications using ComponentOne reporting controls. Once you have the report rendered and showing in your app you are instantly given a crate full of features right out of the box:

  • Scrolling, Paging, Zooming (like Microsoft Word)
  • Find and Select Text from the Report
  • Page Thumbnail Views
  • Outline Bookmarks (like in PDFs)
  • Printing
  • Page Layout Settings (margins, landscape, etc)
  • Exporting (PDF, Excel, Open XML Word, HTML, RTF, and many image formats)

If your reports are from Access, Crystal or C1Reports then you would be using the C1Report component to generate and view your reports. However, if your reports are from Microsoft or SQL Server Reports (RDL) then you would use the C1PrintDocument component.

You simply call these two lines of code:

c1PrintDocument1.ImportRDL("local path to RDL file");  
c1PrintDocument1.Generate();

And then to display a C1PrintDocument in a viewer, such as C1PrintPreviewControl, you simply set:

c1PrintPreviewControl1.Document = c1PrintDocument1.

It's that easy. The databinding is specified in the .rdl file.

In addition, C1PrintDocument supports the latest 2008 version of RDL and one of the major benefits is you can use data sources other than SQL Server such as Access mdb files (virtually, any data source you would normally use in your .NET application). And with C1PrintDocument you can generate reports without any viewer at all! For example, you can deliver reports in PDF format directly without requiring any intermediate step of viewing the report (which can take up time and screen real estate).

Attached to this post is a sample RDL file that links to the AdventureWorks database (SQL Server). You must first modify the connection string within the file to get this to run.

Now, for this first release there are some features of RDL reports that are not supported (yet). These include gauges, charts, and subreport objects. See the installed readme for full details.

Download Studio for WinForms