我有一個我正在報告的數據集。然而,某些數據被複制並有的不是:如何在Crystal中顯示多個不相關的1:N記錄
ID Project Org Type Facility AssessorManager Assessor
123 Proj1 Org1 Ty1 Facil1 Smith Jones
123 Proj1 Org2 Ty1 Facil2 Smith Black
123 Proj1 Org2 Ty1 Facil3 Smith Black
234 Proj1 Org3 Ty2 Facil3 Harris Jones
234 Proj1 Org1 Ty2 Facil3 Harris Jones
393 Proj2 Org2 Ty3 Facil1 Smith Black
因此,對於一個ID,存在1:1個的與項目,類型和AssessorManager關係;以及與組織,設施和評估師的1:N關係。
我想要一個報告,不要重複超過必要的報告,並報告1:1數據,然後存儲每個1:N數據集的過程。我得到如下結果,但它是狗SLOW。
ID Project Org Type Facility AssessorManager Assessor
123 Proj1 Org1 Ty1 Facil1 Smith Jones
Org2 Facil2 Black
Facil3
234 Proj1 Org3 Ty2 Facil3 Harris Jones
Org1
393 Proj2 Org2 Ty3 Facil1 Smith Black
我可以爲1:N字段命令數據並顯示不同的數據嗎?如果字段的重複選項可以使用抑制,但我需要自行對ID中的每個字段進行排序。我不能使用group by和set groups,因爲有4個1:N字段,並且它們都是相互獨立的。
(由過去從事羣體造成了一份報告,如下所示:
ID Project Org Type Facility AssessorManager Assessor
123 Proj1 Org1 Ty1 Facil1 Smith Jones
Black
Facil2 Jones
Black
Facil3 Jones
Black
Org2 Facil1 Jones
Black
Facil2 Jones
Black
Facil3 Jones
Black
...等)
編輯... 答案... 我接受了PowerUser的答案,主要是使用他的第二個建議。我在我的查詢中添加了字段。它仍然有重複,因爲一些1:N字段是查詢和排序字段。這裏可能有更多的重複,但這是主意。此外,我不使用逗號來分隔備註字段中的值,而是使用返回字符。
ID Project Org Orgs Type Facility Facilities AssessorManager Assessors
123 Proj1 Org1 Org1,Org2 Ty1 Facil1 Facil1,Facil2,Facil3 Smith Jones,Black
123 Proj1 Org2 Org1,Org2 Ty1 Facil2 Facil1,Facil2,Facil3 Smith Jones,Black
123 Proj1 Org2 Org1,Org2 Ty1 Facil3 Facil1,Facil2,Facil3 Smith Jones,Black
我的2和3。其實我添加備註字段到我的查詢組合去,並把在合併組的數據。有很多重複,但只發生一次,並且不需要子報表。但是,我不認爲我可以在評論中顯示圖片。 – thursdaysgeek 2010-12-14 21:30:49