Share via


Managing Resources

A resource is a managed item that is stored on a report server, but is not processed by a report server. Typically, a resource provides external content to report users. Examples include an image in a .jpg file or an HTML file that describes the business rules used in a report. The JPG or HTML file is stored on the report server, but the report server passes the file directly to the browser rather than processing it first.

Adding and Viewing a Resource

To add a resource to a report server, you upload or publish a file:

Operation

File type

Upload

All files are uploaded as resources except report definition (.rdl) and report model (.smdl) files.

To upload a resource, you must use Report Manager if the report server runs in native mode or an application page on a SharePoint site if the server runs in SharePoint integrated mode. For more information, see How to: Upload a File or Report (Report Manager) or How to: Upload Documents to a SharePoint Library (Reporting Services in SharePoint Integrated Mode).

Publish

All files in a project are uploaded as resources except for .rdl, .smdl, and .rds data source files. To publish a resource, add an existing item to a project in Report Designer and then publish the project to a report server.

All resources originate as files on a file system, which are subsequently uploaded to a report server. Except for the 4 megabyte default file size limitations imposed by ASP.NET, there are no restrictions on the kinds of files you can upload. However, when published to a report server as a resource, file types that have equivalent MIME types are more optimal than others. For example, resources that are based on HTML and JPG files will open in a browser window when the user clicks the resource, rendering the HTML as a Web page and the JPG as an image that the user can see. In contrast, resources that do not have equivalent MIME types, such as desktop application files, for example, may not be rendered in the browser window.

Whether a resource can be viewed by report users depends on the viewing capabilities of the browser. Because resources are not processed by the report server, the browser must provide the viewing capability to render a specific MIME type. If the browser cannot render the content, users who view the resource see only the general properties of the resource.

Securing and Managing a Resource

Resources exist alongside reports, shared data sources, shared schedules, and folders as named items in the report server folder hierarchy. You can search for, view, secure, and set properties on resources just as you would any item stored on a report server. To view or manage a resource, you must have the View resources or Manage resources tasks in your role assignment.

Referencing an Image Resource from a Report

Resources can contain an image that you reference in a report. If report requirements include the use of external images, consider the following advantages to storing the image as a resource:

  • Centralized storage in the report server database. If you move the report server database and its contents to another computer, the external image stays with the report. You do not have to keep track of image files that are stored on disk on different computers.

  • Secured through role assignments rather than file system security. The same permissions used to view a report can be applied to the resource. In contrast, if you store the image on disk, you must ensure that either the Anonymous user account or the unattended execution account have permission to access the file.

To use an image resource in a report, add the image file to the project and publish it along with the report. Once the image is published, you can update the image reference in the report so that it points to the resource on the report server, and then republish just the report to save your changes. You can now subsequently update the image independently of the report by republishing the resource. The report uses the most current version of the image available on the report server.

For more information, see Adding Images to a Report and How to: Update a Resource (Report Manager).