將參數加入行動報表中

注意

SQL Server 行動報表發行工具已針對 SQL Server Reporting Services 2019 之後的所有 SQL Server Reporting Services 版本已退場。 從 SQL Server Reporting Services 2022 和 Power BI 報表伺服器開始,其已停用。

您可以使用參數建立 Reporting Services 行動報表,以便您和您報表的讀者可以篩選報表。 使用參數的報表也可以是從來源報表鑽研的目標。

若要使用參數建立行動報表,請從至少包含一個參數的共用資料集開始。 請參閱 在共用資料集中建立參數。 行動報表不支援為預設參數使用 Null 值,因此請務必確認您的參數有 Null 值 以外的預設值。

將參數加入行動報表之後,您可以建立 URL 以 使用查詢字串參數開啟報表

  1. 在 Reporting Services 入口網站的頂端列中,選取 [新增]>[行動報表]。

    Screenshot of the New menu and the Mobile Report option.

  2. 選取資料索引標籤。

  3. 選取 [新增資料]

  4. 選取 [報表伺服器] ,然後選取伺服器。

  5. 瀏覽至伺服器上的共用資料集,然後選取具有參數的伺服器。

    在方格中,您會看到資料集中的資料。 具有中括弧 { } 的綠色圓形標記具有參數的資料集。

    Screenshot of the TimeChartLoD with the brackets highlighted.

  6. 選取索引標籤上的齒輪,然後選取 Param {}

    Screenshot of the cog with the Param {} option highlighted.

  7. 選取會將值傳遞給參數的報表元素。

    Screenshot of the Set dataset parameters screen.

  8. 選取 [預覽] 查看報表的外觀。 在此報表中,選擇清單使用類別目錄參數。

    Screenshot of the preview of the report with the Selection list 1 called out.

  9. 當您在選擇清單中選取值時,會將報表篩選為只顯示該值。在此案例中為「附屬應用程式」。

    Screenshot of the preview of the report with the Selection list 1 called out and the Accessories option selected.