report-editor
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReport Editor
报表编辑器
Workflow for modifying existing RDLX-JSON reports on a Datex Studio branch using the CLI.
dxsKey principle: Understand before modifying. Download and inspect the current report before making any changes.
Authoring approach:
- Incremental CLI (/
set/move/remove/batch/table add-column) for all modificationsdataset add-field - Direct JSON only for structures the CLI cannot handle (PageHeader/PageFooter, complex Tablix grouping)
- Never recreate from scratch -- work with the existing file
使用 CLI修改Datex Studio分支上现有RDLX-JSON报表的工作流程。
dxs核心原则:先理解再修改。进行任何更改前,请先下载并检查当前报表。
创作方法:
- 所有修改均使用增量式CLI(/
set/move/remove/batch/table add-column)dataset add-field - 仅在CLI无法处理的结构(PageHeader/PageFooter、复杂Tablix分组)时使用直接编辑JSON
- 切勿从零重建——基于现有文件进行修改
References (shared)
参考文档(共享)
- ../shared/branch-setup.md -- Branch & connection selection
- ../shared/studio-management.md -- Studio lifecycle: check, start, cleanup
- ../shared/report-authoring/design-standards.md -- Datex design language: color palette, typography, table styling, field label-value pattern, grid alignment, report categories
- ../shared/report-authoring/design-patterns.md -- Coordinate system, layout patterns, element sizing
- ../shared/report-authoring/json-structure.md -- RDLX-JSON format: document template, element JSON formats, expression quick reference
- ../shared/report-authoring/cli-commands.md -- CLI syntax: batch ops, tablix, images, datasets, set/move/remove, validation
- ../shared/report-authoring/sample-data.md -- Sample data format for live preview
- ../shared/report-authoring/dataset-rules.md -- DataSet management: CommandText rules, collection handling, date annotations, sensitivity properties
- ../shared/report-authoring/deploy-patterns.md -- Upload, preview, and verification patterns
- ../shared/report-authoring/troubleshooting.md -- Common RDLX-JSON and CLI mistakes & fixes
- ../shared/branch-setup.md -- 分支与连接选择
- ../shared/studio-management.md -- Studio生命周期:检查、启动、清理
- ../shared/report-authoring/design-standards.md -- Datex设计规范:调色板、排版、表格样式、字段标签-值模式、网格对齐、报表分类
- ../shared/report-authoring/design-patterns.md -- 坐标系、布局模式、元素尺寸
- ../shared/report-authoring/json-structure.md -- RDLX-JSON格式:文档模板、元素JSON格式、表达式速查
- ../shared/report-authoring/cli-commands.md -- CLI语法:批量操作、Tablix、图片、数据集、set/move/remove、验证
- ../shared/report-authoring/sample-data.md -- 实时预览用示例数据格式
- ../shared/report-authoring/dataset-rules.md -- DataSet管理:CommandText规则、集合处理、日期注解、敏感属性
- ../shared/report-authoring/deploy-patterns.md -- 上传、预览与验证模式
- ../shared/report-authoring/troubleshooting.md -- 常见RDLX-JSON与CLI错误及修复方案
Dependencies
依赖项
datasource-creatorschema-explorer仅在需要时(第4-5类场景)调用和。仅修改布局的场景(第1-3类)无需依赖这两个工具。
datasource-creatorschema-explorerOrchestration Model
编排模型
report-editor (this skill)
|
+-- Phase 1: Download & Inspect
| +-- Select branch + find report (branch-setup.md)
| +-- Download report folder (RDLX-JSON + datasources + manifest)
| +-- Inspect layout + DataSets + datasource fields
| +-- Output: report folder + structural understanding
|
+-- Phase 2: Triage -- Determine Change Depth
| +-- Classify user's request into category 1-5
| +-- Check DataSet fields vs datasource fields
| +-- Output: modification plan with category + steps
|
+-- Phase 3: Modify (conditional paths by category)
| +-- Cat 1-2: Layout-only --> set/move/remove/batch on folder/report.rdlx-json
| +-- Cat 3: Add from existing DataSet field --> table add-column
| +-- Cat 4: Datasource gap --> datasource-creator --> datasource add --> DataSet --> layout
| +-- Cat 5: New section --> schema-explorer --> datasource-creator --> datasource add --> DataSet --> layout
|
+-- Phase 4: Deploy & Verify (deploy-patterns.md)
| +-- assemble folder --> wrapper JSON
| +-- upload wrapper JSONreport-editor(当前技能)
|
+-- 阶段1:下载与检查
| +-- 选择分支并查找报表(branch-setup.md)
| +-- 下载报表文件夹(RDLX-JSON + 数据源 + 清单)
| +-- 检查布局 + DataSet + 数据源字段
| +-- 输出:报表文件夹 + 结构理解
|
+-- 阶段2:分类——确定更改深度
| +-- 将用户请求归类为1-5类
| +-- 检查DataSet字段与数据源字段的匹配情况
| +-- 输出:包含分类与步骤的修改计划
|
+-- 阶段3:修改(按分类走不同流程)
| +-- 第1-2类:仅修改布局 --> 对文件夹/report.rdlx-json执行set/move/remove/batch操作
| +-- 第3类:添加现有DataSet中的字段 --> table add-column
| +-- 第4类:数据源缺失字段 --> datasource-creator --> 数据源添加 --> DataSet --> 布局
| +-- 第5类:新增数据区域 --> schema-explorer --> datasource-creator --> 数据源添加 --> DataSet --> 布局
|
+-- 阶段4:部署与验证(deploy-patterns.md)
| +-- 组装文件夹 --> 包装器JSON
| +-- 上传包装器JSONPhase 1: Download & Inspect
阶段1:下载与检查
Select branch and find report
选择分支并查找报表
Follow branch-setup.md for branch/connection selection.
Then list reports on the branch:
bash
dxs report list --branch <branch_id>Present reports to the user if the target is ambiguous. If the user named a specific report, match it against the list.
按照branch-setup.md进行分支/连接选择。
然后列出分支上的报表:
bash
dxs report list --branch <branch_id>如果目标报表不明确,将报表列表展示给用户。如果用户指定了具体报表名称,在列表中进行匹配。
Download the report folder
下载报表文件夹
bash
undefinedbash
undefinedAuto-names folder from reference name
根据引用名称自动命名文件夹
dxs report download --branch <branch_id> --reference-name <reference_name>
dxs report download --branch <branch_id> --reference-name <reference_name>
Or specify folder path explicitly
或显式指定文件夹路径
dxs report download <folder_path> --branch <branch_id> --reference-name <reference_name>
This creates a **report folder** containing:
- `report.rdlx-json` -- the RDLX-JSON layout (editing commands target this)
- `manifest.json` -- all binding metadata (datasources, params, datasource-params, access modifier)
- `ds_*.json` -- one file per owned datasource config (extracted from the wrapper)
The manifest preserves all datasource bindings, parameter mappings, and metadata. No manual extraction or flag reconstruction needed for re-upload.dxs report download <folder_path> --branch <branch_id> --reference-name <reference_name>
此操作会创建一个**报表文件夹**,包含:
- `report.rdlx-json` -- RDLX-JSON布局文件(编辑命令的目标文件)
- `manifest.json` -- 所有绑定元数据(数据源、参数、数据源参数、访问修饰符)
- `ds_*.json` -- 每个自有数据源的配置文件(从包装器中提取)
清单文件保留了所有数据源绑定、参数映射和元数据。重新上传时无需手动提取或重构参数。Inspect the report folder
检查报表文件夹
Check the manifest to understand datasource bindings:
bash
dxs report datasource list <folder>/Inspect the layout:
bash
dxs report inspect <folder>/report.rdlx-jsonAlso read the RDLX-JSON directly to understand DataSets, element hierarchy, and expressions.
查看清单文件以了解数据源绑定情况:
bash
dxs report datasource list <folder>/检查布局:
bash
dxs report inspect <folder>/report.rdlx-json同时直接查看RDLX-JSON文件,以了解DataSet、元素层级和表达式。
Visual layout inspection
可视化布局检查
Use to generate a preview with colored bounding boxes — helpful for understanding element positions before modifying:
--bboxbash
dxs report preview <file.rdlx-json> --bbox ElementName:red --bbox AnotherElement:blue -o /tmp/inspect.svg使用参数生成带彩色边界框的预览图——有助于在修改前理解元素位置:
--bboxbash
dxs report preview <file.rdlx-json> --bbox ElementName:red --bbox AnotherElement:blue -o /tmp/inspect.svgInspect current layout
检查当前布局
bash
dxs report inspect <file.rdlx-json>This shows every element with type, name, position, size, value/expression, and DataSet bindings. Also read the file directly to understand:
- DataSets (names, fields, CommandText patterns)
- Element hierarchy (rectangles containing children)
- Expressions used
- Page settings (size, margins, orientation)
bash
dxs report inspect <file.rdlx-json>此命令会展示每个元素的类型、名称、位置、尺寸、值/表达式以及DataSet绑定。同时直接查看文件以了解:
- DataSet(名称、字段、CommandText模式)
- 元素层级(包含子元素的矩形容器)
- 使用的表达式
- 页面设置(尺寸、边距、方向)
Identify available datasource fields
识别可用的数据源字段
For EACH datasource used by the report (check to see them):
dxs report datasource list <folder>/bash
undefined对于报表使用的每个数据源(通过查看):
dxs report datasource list <folder>/bash
undefinedFor standalone datasources
独立数据源
dxs report datasource-fields <datasource_ref> --branch <branch_id>
dxs report datasource-fields <datasource_ref> --branch <branch_id>
For owned datasources
自有数据源
dxs report datasource-fields <datasource_ref> --branch <branch_id> --report <report_ref>
This gives you the complete field list, `in_params`, result type, and collections. **This is the triage gate** -- in Phase 2, you will check whether requested fields are already available here.dxs report datasource-fields <datasource_ref> --branch <branch_id> --report <report_ref>
此命令会返回完整的字段列表、`in_params`、结果类型和集合信息。**这是分类的关键依据**——在阶段2中,你需要检查用户请求的字段是否已在此处可用。Report not found
报表未找到
If does not return the target report:
dxs report list- Inform the user: "That report was not found on branch X."
- Ask: "Would you like to create it from scratch?"
- If yes, invoke the skill.
report-creator
如果未返回目标报表:
dxs report list- 告知用户:“分支X上未找到该报表。”
- 询问:“是否需要从零创建该报表?”
- 如果用户同意,调用技能。
report-creator
Phase 2: Triage -- Determine Change Depth
阶段2:分类——确定更改深度
Classify each requested change into one of five categories. Different categories require different workflows.
将每个用户请求归类为以下五类之一。不同分类需要不同的工作流程。
Change Categories
更改分类
| Category | Examples | What's Needed | Dependency Skills |
|---|---|---|---|
| 1. Label/Style | "Change 'SHIPPER' to 'FROM'", "Make header blue", "Increase font size" | | None |
| 2. Rearrangement | "Swap columns 2 and 3", "Move address block down", "Remove the footer" | | None |
| 3. Add column (field in DataSet) | "Add the Status column" where Status IS in the DataSet | | None |
| 4a. Add field (in datasource, missing from DataSet) | "Add Material Description" where the field IS in the datasource output but NOT in the DataSet | | None |
| 4b. Add field (datasource gap) | "Add Material Description" where the field is NOT in the datasource | Datasource regeneration + | |
| 5. New data section | "Add a line items table" where no suitable datasource exists | Full: | |
| 分类 | 示例 | 所需操作 | 依赖技能 |
|---|---|---|---|
| 1. 标签/样式 | “将'SHIPPER'改为'FROM'”、“将标题设为蓝色”、“增大字号” | 仅使用 | 无 |
| 2. 重排 | “交换第2列和第3列”、“将地址块下移”、“删除页脚” | | 无 |
| 3. 添加列(DataSet中已存在的字段) | “添加Status列”(Status已在DataSet中) | | 无 |
| 4a. 添加字段(数据源中存在,但DataSet中缺失) | “添加Material Description”(该字段在数据源输出中存在,但未在DataSet中) | | 无 |
| 4b. 添加字段(数据源缺失) | “添加Material Description”(该字段不在数据源的 | 数据源重新生成 + | |
| 5. 新增数据区域 | “添加行项目表格”(无合适的数据源) | 完整流程: | |
Decision Tree
决策树
User request
|
+-- Does the change involve data fields?
| +-- NO --> Is it positional/structural (move, swap, remove)?
| | +-- YES --> Category 2 (rearrangement)
| | +-- NO --> Category 1 (label/style)
| | --> Proceed to Phase 3
| |
| +-- YES --> Does the needed field exist in a report DataSet?
| +-- YES --> Category 3 (add column/element from existing DataSet field)
| | --> Proceed to Phase 3
| |
| +-- NO --> Is the field in the datasource output? (from datasource-fields)
| +-- YES --> Category 4a (field in datasource, missing from DataSet)
| | --> Add to DataSet, then layout
| |
| +-- NO --> Is the field reachable from the datasource's entity?
| | (just missing from $select/$expand)
| |
| +-- YES --> Category 4b (datasource needs regeneration)
| | --> Modify datasource --> re-upsert --> DataSet --> layout
| |
| +-- NO --> Category 5 (entirely new data requirement)
| --> schema-explorer --> datasource-creator --> DataSet --> layout用户请求
|
+-- 是否涉及数据字段?
| +-- 否 --> 是否是位置/结构调整(移动、交换、删除)?
| | +-- 是 --> 第2类(重排)
| | +-- 否 --> 第1类(标签/样式)
| | --> 进入阶段3
| |
| +-- 是 --> 所需字段是否已在报表DataSet中?
| +-- 是 --> 第3类(从现有DataSet字段添加列/元素)
| | --> 进入阶段3
| |
| +-- 否 --> 字段是否在数据源输出中?(来自datasource-fields结果)
| +-- 是 --> 第4a类(数据源中存在,DataSet中缺失)
| | --> 添加到DataSet,然后调整布局
| |
| +-- 否 --> 字段是否可从数据源实体获取?
| | (仅未包含在$select/$expand中)
| |
| +-- 是 --> 第4b类(数据源需要重新生成)
| | --> 修改数据源 --> 重新上传 --> DataSet --> 布局
| |
| +-- 否 --> 第5类(全新数据需求)
| --> schema-explorer --> datasource-creator --> DataSet --> 布局Present the triage result
展示分类结果
<HARD-GATE>
Before proceeding to Phase 3, present the classification to the user and get approval. Do NOT start modifying the report without user confirmation of the plan.
</HARD-GATE>
undefined<HARD-GATE>
进入阶段3前,需将分类结果展示给用户并获得确认。未得到用户对修改计划的确认前,请勿开始修改报表。
</HARD-GATE>
undefinedModification Plan
修改计划
Requested change: [user's request]
Category: [1-5] -- [description]
Steps:
- [what will happen]
- [what will happen] ...
Impact: [layout-only / DataSet change / datasource modification / new datasource]
Proceed?
undefined请求的更改: [用户请求内容]
分类: [1-5] -- [分类描述]
步骤:
- [操作内容]
- [操作内容] ...
影响范围: [仅布局 / DataSet更改 / 数据源修改 / 新增数据源]
是否继续?
undefinedPhase 3: Modify
阶段3:修改
Open in Studio for live preview
在Studio中打开以进行实时预览
For ANY change that involves layout (Categories 1-3, or layout portions of Categories 4-5), ensure Studio is running and the report is open for live preview BEFORE making modifications.
Auto-manage Studio per ../shared/studio-management.md: check status, start in background if needed (with readiness verification), open the report, and clean up after Phase 4.
对于任何涉及布局的更改(第1-3类,或第4-5类中的布局部分),在进行修改前,请确保Studio已运行且报表已打开进行实时预览。
根据../shared/studio-management.md自动管理Studio:检查状态,必要时在后台启动(并验证就绪状态),打开报表,阶段4完成后进行清理。
Category 1-2: Layout-only changes
第1-2类:仅修改布局
Use CLI commands per cli-commands.md:
bash
undefined根据cli-commands.md使用CLI命令:
bash
undefinedChange a label
修改标签
dxs report set <file> ElementName --value "New Label Text"
dxs report set <file> ElementName --value "新标签文本"
Change styling
修改样式
dxs report set <file> ElementName --font-size 12pt --color Navy --font-weight Bold
dxs report set <file> ElementName --font-size 12pt --color Navy --font-weight Bold
Move an element
移动元素
dxs report move <file> ElementName --left 1in --top 2in
dxs report move <file> ElementName --left 1in --top 2in
Resize an element
调整元素尺寸
dxs report set <file> ElementName --width 3in --height 1in
dxs report set <file> ElementName --width 3in --height 1in
Remove an element
删除元素
dxs report remove <file> ElementName
dxs report remove <file> ElementName
Batch operations (for multiple changes)
批量操作(多组更改)
cat > /tmp/ops.json << 'OPEOF'
[
{"action": "set", "name": "Title", "value": "New Title", "font-size": "18pt"},
{"action": "set", "name": "SubTitle", "color": "DimGray"},
{"action": "move", "name": "AddressBlock", "left": "0in", "top": "1.5in"},
{"action": "remove", "name": "OldElement"}
]
OPEOF
dxs report batch <file> --ops-file /tmp/ops.json
**Batch limit: maximum 25 operations per call.** If you have more than 25 operations, split them into multiple batch calls. Group logically (e.g., first batch for repositioning, second for styling and new elements).
Apply [design-standards.md](../shared/report-authoring/design-standards.md) for any new or modified elements: Arial font family, official color palette, 0.25in grid alignment.
**Lines require special handling.** Lines use `StartPoint`/`EndPoint` with `start-x`/`start-y`/`end-x`/`end-y` -- NOT `left`/`top`/`width`/`height`. The `move` command does not work on lines. Edit line positions in JSON directly or use batch `set` with endpoint flags.cat > /tmp/ops.json << 'OPEOF'
[
{"action": "set", "name": "Title", "value": "新标题", "font-size": "18pt"},
{"action": "set", "name": "SubTitle", "color": "DimGray"},
{"action": "move", "name": "AddressBlock", "left": "0in", "top": "1.5in"},
{"action": "remove", "name": "OldElement"}
]
OPEOF
dxs report batch <file> --ops-file /tmp/ops.json
**批量操作限制:每次调用最多25个操作。** 如果操作超过25个,请拆分为多个批量调用。按逻辑分组(例如,第一组处理位置调整,第二组处理样式和新增元素)。
对于任何新增或修改的元素,需遵循[design-standards.md](../shared/report-authoring/design-standards.md):Arial字体、官方调色板、0.25英寸网格对齐。
**线条需要特殊处理**。线条使用`StartPoint`/`EndPoint`和`start-x`/`start-y`/`end-x`/`end-y`参数,而非`left`/`top`/`width`/`height`。`move`命令不适用于线条。需直接编辑JSON或使用批量`set`命令配合端点参数来调整线条位置。Category 3: Add column from existing DataSet field
第3类:从现有DataSet字段添加列
The field already exists in a DataSet -- just add the column to the table:
bash
dxs report table add-column <file> --table <TablixName> --shrink \
--header-cell "New Header" \
--detail-cell '=Fields!ExistingField.Value' \
--header-style 'font-family:Arial;font-size:10pt;font-weight:Bold;border-bottom-width:1.5pt;border-bottom-style:Solid;border-bottom-color:#5B08B2;padding:2pt;vertical-align:Bottom' \
--detail-style 'font-family:Arial;font-size:10pt;padding:2pt;vertical-align:Middle;border-bottom-width:0.25pt;border-bottom-style:Solid;border-bottom-color:LightGray'The flag proportionally reduces existing column widths to make room for the new column while keeping total table width unchanged.
--shrinkFor non-table elements (standalone textboxes), use with an action to place the new field in the layout.
dxs report batchaddApply Datex design standards for the new column -- match the styling of existing columns in the table.
字段已存在于DataSet中——只需将列添加到表格:
bash
dxs report table add-column <file> --table <TablixName> --shrink \
--header-cell "新表头" \
--detail-cell '=Fields!ExistingField.Value' \
--header-style 'font-family:Arial;font-size:10pt;font-weight:Bold;border-bottom-width:1.5pt;border-bottom-style:Solid;border-bottom-color:#5B08B2;padding:2pt;vertical-align:Bottom' \
--detail-style 'font-family:Arial;font-size:10pt;padding:2pt;vertical-align:Middle;border-bottom-width:0.25pt;border-bottom-style:Solid;border-bottom-color:LightGray'--shrink对于非表格元素(独立文本框),使用配合操作将新字段添加到布局中。
dxs report batchadd新列需遵循Datex设计规范——匹配表格中现有列的样式。
Category 4a: Field in datasource, missing from DataSet
第4a类:数据源中存在,但DataSet中缺失的字段
The field is available in the datasource output but was not included in the report's DataSet definition. Add it:
bash
dxs report dataset add-field <file> --dataset <DataSetName> --field "New.Field.Path"Follow dataset-rules.md for:
- Date annotations: append to date fields
[Date|YYYY-MM-DDTHH:mm:ss.fffffff] - Collection handling: collection fields cannot be added as flat DataSet fields on a single-result DataSet
- CommandText: verify the DataSet's CommandText pattern is correct for the result type
Then add the layout element (column or textbox) referencing the new field. If the report has a companion , update it with sample values for the new field.
.data.json字段在数据源输出中可用,但未包含在报表的DataSet定义中。添加该字段:
bash
dxs report dataset add-field <file> --dataset <DataSetName> --field "New.Field.Path"遵循dataset-rules.md的要求:
- 日期注解:在日期字段后追加
[Date|YYYY-MM-DDTHH:mm:ss.fffffff] - 集合处理:集合字段不能作为扁平DataSet字段添加到单结果DataSet中
- CommandText:验证DataSet的CommandText模式是否与结果类型匹配
然后添加引用新字段的布局元素(列或文本框)。如果报表有配套的文件,需更新该文件以添加新字段的示例值。
.data.jsonCategory 4b: Datasource needs regeneration
第4b类:数据源需要重新生成
The field exists on the OData entity but is not in the datasource's or . The datasource config must be updated.
$select$expandFor standalone OData datasources:
- Get the current datasource config:
dxs datasource get <ref> --branch <id> - Identify the missing field path (e.g., needs in
Material/Description)$expand - Invoke to regenerate with the updated query
datasource-creator - to update the branch
dxs datasource upsert - Add field to DataSet with
dxs report dataset add-field - Add the layout element
For owned OData datasources:
- The current config is already in the report folder (extracted during download as )
ds_*.json - Invoke to regenerate with the updated query
datasource-creator - Replace in folder: then
dxs report datasource remove <folder> <alias>dxs report datasource add <folder> --owned <new_ds.json>:<alias> - Add field to DataSet with
dxs report dataset add-field - Add the layout element
For flow datasources:
- Check if the needed field is in one of the flow's source OData datasources
- If yes: update the flow code to include the field in the return type, update the type definition YAML
- If no: may need to update the source OData datasource first, then the flow code
- Regenerate with
dxs datasource generate-flow - Re-upsert (standalone) or replace in folder: (owned)
dxs report datasource remove/add - Add field to DataSet + layout
字段在OData实体中存在,但未包含在数据源的或中。需更新数据源配置。
$select$expand独立OData数据源:
- 获取当前数据源配置:
dxs datasource get <ref> --branch <id> - 确定缺失的字段路径(例如,需要在中添加
$expand)Material/Description - 调用重新生成带更新查询的配置
datasource-creator - 使用更新分支上的数据源
dxs datasource upsert - 使用将字段添加到DataSet
dxs report dataset add-field - 添加布局元素
自有OData数据源:
- 当前配置已在报表文件夹中(下载时提取为)
ds_*.json - 调用重新生成带更新查询的配置
datasource-creator - 在文件夹中替换:然后
dxs report datasource remove <folder> <alias>dxs report datasource add <folder> --owned <new_ds.json>:<alias> - 使用将字段添加到DataSet
dxs report dataset add-field - 添加布局元素
Flow数据源:
- 检查所需字段是否在Flow的源OData数据源中
- 如果是:更新Flow代码以在返回类型中包含该字段,更新类型定义YAML
- 如果否:可能需要先更新源OData数据源,再更新Flow代码
- 使用重新生成
dxs datasource generate-flow - 重新上传(独立数据源)或在文件夹中替换:(自有数据源)
dxs report datasource remove/add - 添加字段到DataSet + 布局调整
Category 5: New data section
第5类:新增数据区域
A new section requires data from an entity or relationship not covered by any existing datasource.
- Gather requirements for the new section (what data, what layout). A brief conversation usually suffices -- only invoke if the section is complex.
requirements-gathering - Invoke to find the right OData entity and fields
schema-explorer - Invoke to create the datasource config, then
datasource-creator(owned preferred, standalone if shared)dxs report datasource add <folder> --owned <file>:<alias> - Add DataSet per dataset-rules.md -- use the field summary from datasource-creator as the primary source for field names, include ALL fields
- Build layout (rectangle container, textboxes, or tablix) using
dxs report batch - Create/update sample data per sample-data.md if needed for preview
For DataSet creation:
bash
dxs report dataset add <file> --name ds_new_section \
--field Id --field LookupCode --field Status \
--field "Account.Name" \
--field "OrderDate[Date|YYYY-MM-DDTHH:mm:ss.fffffff]"For building the layout section, use a rectangle container for grouping:
bash
cat > /tmp/new-section-ops.json << 'OPEOF'
[
{"action": "add", "type": "rectangle", "name": "NewSectionBox",
"left": "0in", "top": "4in", "width": "7.5in", "height": "2in"},
{"action": "add", "type": "textbox", "name": "NewSectionTitle",
"parent": "NewSectionBox", "left": "0in", "top": "0in",
"width": "7.5in", "height": "0.3in",
"value": "Section Title", "font-size": "14pt", "color": "DimGray"}
]
OPEOF
dxs report batch <file> --ops-file /tmp/new-section-ops.jsonFor tables, use -- see cli-commands.md for full syntax including grouping, footer rows, and sort expressions.
dxs report add tablix新增区域需要现有数据源未覆盖的实体或关系数据。
- 收集需求:了解新增区域的数据需求和布局要求。简短沟通即可——仅当区域复杂时才调用。
requirements-gathering - 调用:找到合适的OData实体和字段
schema-explorer - 调用:创建数据源配置,然后执行
datasource-creator(优先使用自有数据源,如需共享则使用独立数据源)dxs report datasource add <folder> --owned <file>:<alias> - 添加DataSet:遵循dataset-rules.md——使用datasource-creator返回的字段摘要作为字段名称的主要来源,包含所有字段
- 构建布局:使用创建矩形容器、文本框或Tablix
dxs report batch - 创建/更新示例数据:如需预览,遵循sample-data.md
创建DataSet的命令:
bash
dxs report dataset add <file> --name ds_new_section \
--field Id --field LookupCode --field Status \
--field "Account.Name" \
--field "OrderDate[Date|YYYY-MM-DDTHH:mm:ss.fffffff]"构建布局区域时,使用矩形容器进行分组:
bash
cat > /tmp/new-section-ops.json << 'OPEOF'
[
{"action": "add", "type": "rectangle", "name": "NewSectionBox",
"left": "0in", "top": "4in", "width": "7.5in", "height": "2in"},
{"action": "add", "type": "textbox", "name": "NewSectionTitle",
"parent": "NewSectionBox", "left": "0in", "top": "0in",
"width": "7.5in", "height": "0.3in",
"value": "区域标题", "font-size": "14pt", "color": "DimGray"}
]
OPEOF
dxs report batch <file> --ops-file /tmp/new-section-ops.json创建表格时,使用——完整语法(包括分组、页脚行和排序表达式)请参考cli-commands.md。
dxs report add tablixFeedback iteration
反馈迭代
After each modification, ask the user how it looks in Studio. Use // for adjustments. Repeat until approved.
<HARD-GATE>
Do NOT proceed to Phase 4 (assemble/upload) until the user has confirmed the layout looks good in Studio. Ask explicitly: "How does it look in Studio? Ready to upload, or any adjustments needed?"
</HARD-GATE>setmoveremove每次修改后,询问用户Studio中的预览效果。使用//进行调整,直到用户确认满意。
<HARD-GATE>
在进入阶段4(组装/上传)前,必须获得用户对Studio中布局效果的确认。需明确询问:“Studio中的预览效果如何?是否可以上传,还是需要调整?”
</HARD-GATE>setmoveremovePhase 4: Deploy & Verify
阶段4:部署与验证
Assemble and upload
组装与上传
The report folder already has everything needed — the manifest preserves all datasource bindings, parameters, and metadata from the download. No flag reconstruction needed.
bash
undefined报表文件夹已包含所有必要内容——下载时清单文件保留了所有数据源绑定、参数和元数据。无需重构参数。
bash
undefinedAssemble folder into wrapper JSON
将文件夹组装为包装器JSON
dxs report assemble <folder>/ -o <reference_name>.json
dxs report assemble <folder>/ -o <reference_name>.json
Upload wrapper to branch
将包装器上传到分支
dxs report upload <reference_name>.json --branch <branch_id>
If you added or removed datasources during Phase 3, those changes are already reflected in the manifest via `dxs report datasource add/remove`.
Follow [deploy-patterns.md](../shared/report-authoring/deploy-patterns.md) for additional upload patterns and verification.dxs report upload <reference_name>.json --branch <branch_id>
如果在阶段3中添加或删除了数据源,这些更改已通过`dxs report datasource add/remove`反映在清单文件中。
遵循[deploy-patterns.md](../shared/report-authoring/deploy-patterns.md)中的其他上传模式和验证步骤。Verify
验证
bash
dxs report get <reference_name> --branch <branch_id>Confirm the report is on the branch with the expected structure, datasource bindings, and parameters.
bash
dxs report get <reference_name> --branch <branch_id>确认报表已上传到分支,且结构、数据源绑定和参数符合预期。
Test parameter discovery
测试参数发现
If the datasource has , follow deploy-patterns.md to discover real test values and output them as JSON for the user to test in Studio.
in_params如果数据源包含,遵循deploy-patterns.md获取真实测试值,并以JSON格式输出给用户,以便在Studio中测试。
in_paramsTroubleshooting
故障排除
See troubleshooting.md for common RDLX-JSON expression issues and layout/CLI mistakes.
常见RDLX-JSON表达式问题和布局/CLI错误请参考troubleshooting.md。
Editor-Specific Issues
编辑器特定问题
| Mistake | Fix |
|---|---|
| Modifying report without downloading first | Always |
| Adding a field to DataSet but not updating sample data | Studio preview shows blank for the new field -- update |
| Assuming the datasource has the field without checking | Always run |
| Changing a field expression but not the DataSet field | If you rename a DataField path, the DataSet field must also be updated to match |
| Removing a datasource field that is still referenced | Check all expressions in the report for |
| Adding collection-path fields as flat DataSet fields | Collection navigation properties silently resolve to blank in single-result DataSets -- use a flow datasource to flatten, or create child datasets with |
| 错误 | 修复方案 |
|---|---|
| 未下载报表就进行修改 | 始终先执行 |
| 向DataSet添加字段但未更新示例数据 | Studio预览中该字段会显示为空——更新 |
| 未检查就假设数据源包含该字段 | 始终运行 |
| 修改字段表达式但未更新DataSet字段 | 如果重命名DataField路径,DataSet字段也必须同步更新 |
| 删除仍被引用的数据源字段 | 删除前检查报表中所有表达式是否包含 |
| 将集合路径字段作为扁平DataSet字段添加 | 集合导航属性在单结果DataSet中会静默解析为空——使用Flow数据源进行扁平化,或创建子DataSet并设置 |