[英]Dynamics 365 CRM - Remove Outer Join Duplicates from SSRS Report
我在 Dynamics 365 中遇到 SSRS 報告問題。我有一個名為 entity1 的自定義實體,它與連接實體具有 1:N 關系。
entity1 中的每條記錄都可以有多個連接,有些記錄可能根本沒有連接。
我創建了一個 SSRS、fetchXML 報告,使用 entity1 作為主要實體並使用外連接來鏈接連接,效果很好。
報告看起來像這樣:
**Name (entity1)** | **Stakeholder (Connection)** | **Role (Connection)**
Hotel Name 1 | Joe Bloggs | Designer
Hotel Name 1 | Jane Doe | Developer
Hotel Name 2 | |
Hotel Name 3 | Joe Bloggs | Designer
但是,我希望報告看起來像這樣(entity1 有許多列):
Hotel Name 1 | Joe Bloggs | Designer
| Jane Doe | Developer
Hotel Name 2 | |
Hotel Name 3 | Joe Bloggs | Designer
有沒有辦法在 SSRS 報告生成器/FetchXML 語句中做到這一點,或者我需要在 SQL 中做一些花哨的事情?
我的 fetchXML 看起來像這樣:
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="entity1">
<attribute name="new_id" />
<attribute name="new_name" />
<attribute name="new_city" />
<attribute name="ownerid" />
<order attribute="new_name" descending="false" />
<filter type="and">
<condition attribute="new_city" operator="eq" value="London" />
</filter>
<link-entity name="connection" from="record1id" to="new_newbuildlistid" link-type="outer" alias="con">
<attribute name="record2id" />
<attribute name="record2roleid" />
<attribute name="connectionid" />
<attribute name="record1id" />
<filter type="and">
<condition attribute="record2id" operator="not-null" />
<condition attribute="record2roleid" operator="not-null" />
</filter>
</link-entity>
</entity>
</fetch>
為此,您在 FetchXML 中無能為力。 Fetch 只是(正確)返回數據,這個問題是關於數據的呈現。
您將需要對本演示文稿的報告實施一種分組形式。 例如創建分步報告。
創建階梯式報告
創建表格報告。 例如,插入一個 tablix 數據區域並向數據行添加字段。
將父組添加到您的報告中。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.