ER 使用水平擴展範圍在 Excel 報表中動態新增列 (第 1 節 - 設計格式)
以下步驟說明指派給系統管理員或電子報表開發人員角色的使用者如何設定電子報表 (ER) 格式以將報表產生為 OPENXML 工作表 (Excel) 檔案,其中可以將所需資料欄動態建立為水平擴展範圍。 這些步驟可以在任何公司進行。
若要完成這些步驟,您必須先完成這三個工作指南:
「ER 建立設定提供者並將其標記為作用中」
「ER 使用財務維度作為資料來源 (第 1 節:設計資料模型)」
「ER 使用財務維度作為資料來源 (第 2 節:模型對應)」
您還必須下載並儲存範本的本地副本以及此處的範例報表,樣本財務維度 Web 服務報表。
此程序是 Dynamics 365 for Operations 版本 1611 中增加的函數。
建立新的報表設定
- 進入組織管理 > 電子報表 > 設定。
- 在樹狀結構中,選取
Financial dimensions sample model
。 - 點選建立設定即可打開下拉式對話方塊。
- 在新建欄位中,輸入
Format based on data model Financial dimensions sample model
。- 使用預先建立的模型作為新報表的資料來源。
- 在名稱欄位,輸入
Sample report with horizontally expandable ranges
。- 具有水平可擴展範圍的樣本報表
- 在描述資料欄中,輸入
To make Excel output with dynamically adding columns
。- 使用動態新增資料欄進行 Excel 輸出
- 在資料模型定義欄位,選取輸入資料。
- 點選建立設定。
設計報表格式
- 點選設計工具。
- 打開
Show details
切換按鈕。 - 在動作窗格上,點選匯入。
- 點選從 Excel 匯入。
- 點選附件。
- 匯入報表的範本。 使用您為此下載的 Excel 檔案。
- 點選「新增」。
- 點選檔案。
- 關閉頁面。
- 在範本欄位中,輸入或選取一個值。
- 選取下載的範本。
- 點選確定。
- 新增新範圍以動態建立 Excel 輸出,其中包含您為財務維度選取的資料欄 (在使用者對話方塊表單中)。 每資料欄的每個儲存格將代表一個財務維度的名稱。
- 點選新增以開啟下拉式對話方塊。
- 在樹狀結構中,選取
Excel\Range
。 - 在 Excel 範圍欄位中,輸入
DimNames
。- DimNames
- 在複寫方向欄位中,選取
Horizontal
。 - 點選確定。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<DimNames>: Horizontal
。 - 點選上移。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Cell<DimNames>
。 - 點選剪下。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<DimNames>: Horizontal
。 - 點選貼上。
- 在樹狀結構中,展開
Excel = "SampleFinDimWsReport"\Range<DimNames>: Horizontal
。 - 在樹狀結構中,展開
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical
。 - 在樹狀結構中,展開
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Range<TransactionLine>: Vertical
。 - 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Range<TransactionLine>: Vertical
。- 新增新範圍以動態建立 Excel 輸出,其中包含您為財務維度選取的資料欄 (在使用者對話方塊表單中)。 每資料欄的每個儲存格將代表每個報表交易的單個財務維度的值。
- 點選新增範圍。
- 在 Excel 範圍欄位中,輸入
DimValues
。- DimValues
- 在複寫方向欄位中,選取
Horizontal
。 - 點選確定。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Range<TransactionLine>: Vertical\Cell<DimValues>
。 - 點選剪下。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Range<TransactionLine>: Vertical\Range<DimValues>: Horizontal
。 - 點選貼上。
- 在樹狀結構中,展開
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Range<TransactionLine>: Vertical\Range<DimValues>: Horizontal
。
將格式元素對應到資料來源
- 點選對應索引標籤。
- 在樹狀結構中,展開
model: Data model Financial dimensions sample model
。 - 在樹狀結構中,展開
model: Data model Financial dimensions sample model\Journal: Record list
。 - 在樹狀結構中,展開
model: Data model Financial dimensions sample model\Journal: Record list\Transaction: Record list
。 - 在樹狀結構中,展開
model: Data model Financial dimensions sample model\Journal: Record list\Transaction: Record list\Dimensions data: Record list
。 - 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Range<TransactionLine>: Vertical\Range<DimValues>: Horizontal\Cell<DimValues>
。 - 在樹狀結構中,選取
model: Data model Financial dimensions sample model\Journal: Record list\Transaction: Record list\Dimensions data: Record list\Code: String
。 - 點選繫結。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Range<TransactionLine>: Vertical\Range<DimValues>: Horizontal
。 - 在樹狀結構中,選取
model: Data model Financial dimensions sample model\Journal: Record list\Transaction: Record list\Dimensions data: Record list
。 - 點選繫結。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Range<TransactionLine>: Vertical\Cell<Credit>
。 - 在樹狀結構中,選取
model: Data model Financial dimensions sample model\Journal: Record list\Transaction: Record list\Credit: Real
。 - 點選繫結。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Range<TransactionLine>: Vertical\Cell<Debit>
。 - 在樹狀結構中,選取
model: Data model Financial dimensions sample model\Journal: Record list\Transaction: Record list\Debit: Real
。 - 點選繫結。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Range<TransactionLine>: Vertical\Cell<Currency>
。 - 在樹狀結構中,選取
model: Data model Financial dimensions sample model\Journal: Record list\Transaction: Record list\Currency: String
。 - 點選繫結。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Range<TransactionLine>: Vertical\Cell<TransDate>
。 - 在樹狀結構中,選取
model: Data model Financial dimensions sample model\Journal: Record list\Transaction: Record list\Date: Date
。 - 點選繫結。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Range<TransactionLine>: Vertical\Cell<TransVoucher>
。 - 在樹狀結構中,選取
model: Data model Financial dimensions sample model\Journal: Record list\Transaction: Record list\Voucher: String
。 - 點選繫結。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Range<TransactionLine>: Vertical\Cell<TransBatch>
。 - 在樹狀結構中,選取
model: Data model Financial dimensions sample model\Journal: Record list\Batch: String
。 - 點選繫結。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Range<TransactionLine>: Vertical
。 - 在樹狀結構中,選取
model: Data model Financial dimensions sample model\Journal: Record list\Transaction: Record list
。 - 點選繫結。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical\Cell<Batch>
。 - 在樹狀結構中,選取
model: Data model Financial dimensions sample model\Journal: Record list\Batch: String
。 - 點選繫結。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<JournalLine>: Vertical
。 - 在樹狀結構中,選取
model: Data model Financial dimensions sample model\Journal: Record list
。 - 點選繫結。
- 在樹狀結構中,展開
model: Data model Financial dimensions sample model\Dimensions setting: Record list
。 - 在樹狀結構中,選取
model: Data model Financial dimensions sample model\Dimensions setting: Record list\Code: String
。 - 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<DimNames>: Horizontal\Cell<DimNames>
。 - 點選繫結。
- 在樹狀結構中,選取
model: Data model Financial dimensions sample model\Dimensions setting: Record list
。 - 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Range<DimNames>: Horizontal
。 - 點選繫結。
- 在樹狀結構中,選取
Excel = "SampleFinDimWsReport"\Cell<CompanyName>
。 - 在樹狀結構中,選取
model: Data model Financial dimensions sample model\Company: String
。 - 點選繫結。
- 點選儲存。
- 關閉頁面。