添加背景图像(报表生成器和 SSRS)Add a Background Image (Report Builder and SSRS)

您可以向报表项(如矩形、文本框、列表、矩阵、表和某些图表部件)或报表区域(如页眉、页脚或表体)添加背景图像。You can add a background image to a report item such as a rectangle, text box, list, matrix, table, and some parts of a chart, or a report section such as the page header, page footer, or report body. 在“属性”窗格中,可以为报表设计图面上显示 BackgroundImage 的任何所选项定义背景图像。You can define a background image for any selected item on the report design surface that displays BackgroundImage in the Properties pane. 与其他图像相似,背景图像可以是指向报表服务器上的图像的 URL、数据集字段的图像,也可以是报表定义中嵌入的图像。Like other images, the background image can be a URL to an image on the report server, an image from a dataset field, or an image embedded in the report definition. 若要使用在报表中嵌入的图像,您必须首先向报表定义中添加该嵌入图像,然后才能向设计图面中添加该图像。To use an image embedded in the report, you must first add the image to the report definition before you can add the image to the design surface.

备注

在 SQL Server Data Tools 中,你可以在报表生成器和报表设计器中创建和修改分页报表定义 (.rdl) 文件。You can create and modify paginated report definition (.rdl) files in Report Builder and in Report Designer in SQL Server Data Tools. 每个创作环境提供了不同的方式来创建、打开和保存报表和相关项。Each authoring environment provides different ways to create, open, and save reports and related items.

在报表定义中嵌入图像To embed an image in the report definition

  1. 在“报表数据”窗格中,右键单击“图像”节点,然后单击“添加图像” 。In the Report Data pane, right-click the Images node, and then click Add Image.

    备注

    如果“报表数据”窗格不可见,请单击“视图”选项卡上的“报表数据” 。If the Report Data pane is not visible, on the View tab, click Report Data.

  2. 导航到您要在报表定义中嵌入的图像,然后单击 “确定”Navigate to the image you want to embed in your report definition, and then click OK.

添加背景图像To add a background image

  1. 在报表设计视图中,选择要向其添加背景图像的报表项。In report design view, select the report item to which you want to add a background image.

  2. 如果“属性”窗格不可见,请在 “视图” 选项卡上选择 “属性”If the Properties pane is not visible, on the View tab, select Properties.

  3. 在“属性”窗口中,展开 BackgroundImage,然后执行以下操作:In the Properties pane, expand BackgroundImage, and then do the following:

    • 对于嵌入的图像:For an embedded image:

      “源” 设置为 “嵌入”Set Source to Embedded.

      “值” 设置为在报表中嵌入的图像的名称。Set Value to the name of an image that is embedded in the report.

    • 对于外部图像:For an external image:

      “源” 设置为 “外部”Set Source to External.

      “值” 设置为指向图像的有效路径。Set Value to a valid path to an image. 此图像可在本机模式或 SharePoint 集成模式下处于报表服务器上,或者可处于任何其他网站上。This can be on a report server in native mode or SharePoint integrated mode, or it can be on any other Web site. 有关详细信息,请参阅添加外部图像(报表生成器和 SSRS)For more information, see Add an External Image (Report Builder and SSRS).

    • 对于包含在报表项所连接的数据库的某个字段中的图像:For an image is that is contained in a field in the database to which the report item is connected:

      “源” 设置为 “数据库”Set Source to Database.

      “值” 设置为报表数据集中某个字段的名称。Set Value to the name of a field in the report dataset. 有关详细信息,请参阅添加数据绑定图像(报表生成器和 SSRS)For more information, see Add a Data-Bound Image (Report Builder and SSRS).

      对于 MIMEType 或文件格式,为图像选择适当的 MIME 类型,如 .bmp。For MIMEType, or file format, select the appropriate MIME type for the image-for example, .bmp.

      备注

      仅当 Source 属性设置为 Database时,MIMEType 才适用。MIMEType applies only if the Source property is set to Database. 如果将 Source 属性设置为 ExternalEmbedded,则忽略 MIMEType 的值。If the Source property is set to External or Embedded, the value of MIMEType is ignored.

    • 对于 BackgroundRepeat,选择一个表达式,再选择 DefaultRepeatRepeatXRepeatYClipFor BackgroundRepeat, select an expression, Default, Repeat, RepeatX, or RepeatY, or Clip.

      对于图表中的背景图像, BackgroundRepeat 可设置为 DefaultRepeatFitClip,但不可设置为 RepeatXRepeatYFor background images in a chart, BackgroundRepeat can be set to Default, Repeat, Fit, and Clip, but not RepeatX or RepeatY.

另请参阅See Also

图像(报表生成器和 SSRS) Images (Report Builder and SSRS)
“图像属性”对话框 ->“常规”(报表生成器和 SSRS)Image Properties Dialog Box, General (Report Builder and SSRS)