2011-07-16 46 views
0

我已經像一個C#對象:綁定C#對象作爲數據源給一個SSRS報告

public class PersonDetails 
{ 
    public string Name1{get; set;} 
    ... ... ... 
    public string Name2{get; set;} 
    ... ... ... 
    public string Name2{get; set;} 
    ... ... ... 
} 

我想這個類的集合綁定到SSRS報告:
SSRS_Report http://i52.tinypic.com/35n3upg.jpg

那些都是文本框。但報告最終顯示了該集合中的第一個項目。 我結合這樣的報告:

this.PersonDetailsPostBindingSource.DataSource = _personDetailsPostCollection.PersonDetailsPostList; 

    this.reportViewerPersonDetailsPost.RefreshReport(); 

哪裏PersonDetailsPostList是類對象的列表。

請幫忙。提前致謝。

回答

1

我在想你的BC你在RDL中使用=First(...)First總是給你列表中的第一項。

+0

謝謝。您的幫助。你能說有沒有辦法將報告導出爲word。在我的只顯示PDF和Excel。 –

+0

你應該看看[這個SO問題](http://stackoverflow.com/questions/963594/can-i-export-word-document-doc-from-reporting-service-by-using-free-component「」 ) –

+0

[測試](http:// test/com) –