When you run the application, the local report appears in a ReportViewer window, as Figure 4 shows.This report is added to the project as a Report Definition Language Client (.rdlc) file because it's a client-side report. The .rdlc file is almost identical to the standard Report Definition Language (.rdl) file that you can create and deploy to an SSRS report server. The only difference is the rd:DataSetInfo section in the .rdlc file. Figure 5 shows this section, which Visual Studio 2005 uses to add objects and generate code inside the form hosting Report Viewer. The rd:DataSetInfo section provides the information needed to create and fill the DataSet, BindingSource, and TableAdapter objects and link them to the local report.

By default, local reports are compiled right into the application's .exe or .dll files. This feature makes the reports self-contained and easy to distribute. However, there are two possible drawbacks. First, you need to create a ReportViewer control for each local report that you want to make available to end users. Second, revising an existing report or adding a new report to an application requires that you recompile and redistribute that application. Thus, if you need to create numerous reports or if you have a dynamic reporting environment, using the local processing mode might not be desirable.

Coming Attractions
The ReportViewer control is a powerful tool for integrating reports into Windows and Web form applications. This control lets you easily display reports from an SSRS report server. It also provides an easy, wizard-driven method for creating local reports that are compiled and distributed with your application. You can do even more if you're willing to write a few lines of Visual Basic .NET or Visual C# code. As you'll see in Part 2, you can, for example, store local report definitions outside the application so that you can add new reports or update existing reports without having to recompile and redistribute the application. You can also support report parameters and subreports.

End of Article

Prev. page     1 [2]     next page -->



You must log on before posting a comment.

If you don't have a username & password, please register now.

 
 

ADS BY GOOGLE