2014-03-02 64 views
0

我正在使用ssrs 2005來創建報告。目前,我的報告是使用由分組列表,其中顯示了數據,ssrs中的水平列表

testsuiteid1   testcase1 status1 
        testcase2 ststus2 
        testcase3 ststus3 


testsuiteid2   testcase1 status1 
        testcase2 status2 

我想水平像顯示列表,

testsuiteid1       testsuiteid2 
testcase1 status1      testcase1 status1      
testcase2 ststus2      testcase2 status2 
testcase3 ststus3 

的數據集提供的測試案例及其相應的地位測試套件ID。我可以水平顯示列表嗎?

回答

1

這是完全可行的。你只需要使用列組。

這是我使用的數據集。

SELECT 'testsuite2' AS testsuite, 'testcase1' AS testcase, 'status1' AS status 
UNION 
SELECT 'testsuite2' AS testsuite, 'testcase2' AS testcase, 'status2' AS status 
UNION 
SELECT 'testsuite1' AS testsuite, 'testcase1' AS testcase, 'status1' AS status 
UNION 
SELECT 'testsuite1' AS testsuite, 'testcase2' AS testcase, 'status2' AS status 
UNION 
SELECT 'testsuite1' AS testsuite, 'testcase3' AS testcase, 'status3' AS status 
  1. 插入連接到相應的數據的空白表設定
  2. 變化的細節行組到組上測試用例。
  3. 使用testcase字段填充組中的第一個字段。
  4. 添加一個列組 - 父組 - 將其設置爲在測試套件上進行分組。
  5. 刪除包含testsuite的行和包含testcase的行之間的空表標題行。
  6. 使用狀態字段填充測試用例旁邊的單元格。
  7. 刪除列組外的2列。
  8. 根據需要設置文本和表格的格式。

你的最終結果應該是這樣的設計模式:
enter image description here

它看起來像這樣的報告: enter image description here

注:我與SSRS 2012,但我做了這個檢查,我認爲這些說明將適用於SSRS 2005.

+0

非常感謝!這對我幫助很大。 – DRB