1
我正在尋找使用報表生成器生成SSRS 2008 R2報表,例如,如果單擊報表的一行中的單元格,則會導致至今隱藏的子報表變得可見,使用從單擊單元格的行中使用參數值的查詢檢索到的數據填充。如何在SSRS中使用嵌套子報表生成報表
爲了進一步解釋,該報告應該是這樣的點擊前:
| Column 1 | Column 2 | Column 3 | Column 4 |
|Row 1 Col 1 |Row 1 Col 2 |Row 1 Col 3 |Row 1 Col 4 |
|Row 2 Col 1 |Row 2 Col 2 |Row 2 Col 3 |Row 2 Col 4 |
|Row 3 Col 1 |Row 3 Col 2 |Row 3 Col 3 |Row 3 Col 4 |
|Row 4 Col 1 |Row 4 Col 2 |Row 4 Col 3 |Row 4 Col 4 |
然後單擊Row 1 Col 1
後,從Row A Col A
到Row D Col D
數據報表應該會出現,如下圖所示:
| Column 1 | Column 2 | Column 3 | Column 4 |
|Row 1 Col 1 |Row 1 Col 2 |Row 1 Col 3 |Row 1 Col 4 |
| Column A | Column B | Column C | Column D |
|Row A Col A |Row A Col B |Row A Col C |Row A Col D |
|Row B Col A |Row B Col B |Row B Col C |Row B Col D |
|Row C Col A |Row C Col B |Row C Col C |Row C Col D |
|Row D Col A |Row D Col B |Row D Col C |Row D Col D |
|Row 2 Col 1 |Row 2 Col 2 |Row 2 Col 3 |Row 2 Col 4 |
|Row 3 Col 1 |Row 3 Col 2 |Row 3 Col 3 |Row 3 Col 4 |
|Row 4 Col 1 |Row 4 Col 2 |Row 4 Col 3 |Row 4 Col 4 |
子報表中的數據將根據Row 1
中的值從查詢中填充。
任何人都可以指出我在哪裏可以找到如何做到這一點,或建議我怎麼做? SSRS甚至有可能嗎?
我可以按照頁面上的說明將子報表添加到主報表的頁面。然而,問題在於報告帶回報告的所有數據,包括子報表數據(或者至少是這種感覺,因爲報告現在需要更長的時間才能加載)。有沒有辦法根據需要加載子報表數據,而不是在加載主報表數據時加載子報表數據? –
當我設置了子報告或深度報告時,從主報告中獲取一個參數。將該參數傳遞給用於構建子報表的數據源,例如存儲的過程。所以子報告中的數據只是需要的。請參閱_(A)在CodeProject示例中的SSRS_中創建SubReport以獲取更多詳細信息。 關於按需加載。尋找[這裏](http://social.msdn.microsoft.com/Forums/is/sqlreportingservices/thread/386a3868-514c-423c-907d-77b63f1b9ac4)如果你有SSRS 2008是的,這是可能的。但我之前使用過這種方法,但不是這樣。 – BobF