Databases Reference
In-Depth Information
Rendering a Report to the File System Summary
In this section, you learned the basic steps of rendering a report to the file system:
Using the ReportingService object's ListChildren method to return a list of reports.
Using the ReportingService object's GetReportParameters method to return a list of report
parameters.
Using the Render method of the ReportingService object to output your report in a given
format.
These basic steps can be used in numerous applications to render a report. Using these methods, users
can create their own custom list of reports, customer report parameter pages, and output the report
using the returned byte array. In the next section, you will use some of these same steps to render a
report to the web via the Response object.
Rendering to the Web
In the preceding section, you saw the mechanics of rendering to a file system. However, most of today's
applications are written for the web. Along with URL requests, you can also use the Reporting Services
Web Service to render reports programmatically to the web.
While doing this, most of your steps will be identical to rendering to the file system; you simply change
the interface. Using the ListChildren method, developers can easily bind reports to an ASP.NET data
grid or create a tree view of available reports. Likewise, developers could also use the GetParameters
method to create their own parameter interface.
Since you have seen both the ListChilden and GetParameters methods, in this section, you will work
more with the specifics around developing ASP.NET applications. You'll look at changes that can be
made to the web.config file to pass credential information to Reporting Services. Then you will look at
the mechanics of rendering to the ASP.NET Response object.
Using Integrated Authentication
There are two main components to every security model: authentication and authorization. In Reporting
Services, you can use Windows Integrated Security within an ASP.NET application to authenticate users.
Before you start your example, you need to ensure that your application is configured to use Integrated
Security.
After creating a new ASP.NET web application, you need to open IIS and change some settings of the
virtual directory. Make sure that the Anonymous Access has been turned off and Integrated Windows
authentication has been turned on in IIS.
In the sample created for this chapter, the virtual directory created in IIS is called WebRenderingCS and
WebRenderingVB for the C# and Visual Basic projects, respectively. To set the virtual directories to use
integrated authentication, you need to check their settings in IIS. Using Integrated Authentication in an
ASP.NET web application is the easiest way to take advantage of the security features in Reporting
Services. Using this method allows developers to concentrate on other areas of an application without
having to build their own authentication mechanism. It also allows for taking full advantage of the
Reporting Services role-based security model.
Search WWH ::




Custom Search