ASP.Net中使用Report Service

來源:互聯網
上載者:User

標籤:style   blog   http   color   os   使用   strong   檔案   for   

昨天研究以下Report Service,發現SQL Service內建的報表伺服器也非常強大,

 

一,報表在不同的應用中表現形式

參考:http://www.cnitblog.com/yide/archive/2006/09/29/17485.html

二,在ASP.NET中使用的形式

 

1,  本地報表

a>     添加Microsoft.ReportViewer.WebForms引用

b>     建立一個xsd資料來源,並查詢好資料,如果不用xsd資料來源也行,這樣得後台綁定資料

c>      建立Report1.rdlc,綁上資料來源,並選取一定的樣式,我簡單製作的樣式如所示:

 

d>     在WebForm檔案中拖入ReportViewer控制項,並指定報表頁Report1.rdlc

e>     這時可能會有錯誤發生【基類包括欄位“ReportViewer1”,但其類型(Microsoft.Reporting.WebForms.ReportViewer)與控制項(Microsoft.Reporting.WebForms.ReportViewer)的類型不相容。】

前台引入ScriptManager控制項

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

f>       F5運行,結果如所示

 

2,  服務期報表

參考:http://msdn.microsoft.com/zh-cn/library/aa902634(v=SQL.80).aspx

a>     配置報表伺服器,將報表上傳到報表伺服器中

b>     一般有兩種方式

1, aspx頁面可以使用ReportViewer控制項,設定報表路徑等屬性即可

 

2,  在HTML頁面請使用Iframe頁面嵌入

c>      這時可能會有錯誤發生【基類包括欄位“ReportViewer1”,但其類型(Microsoft.Reporting.WebForms.ReportViewer)與控制項(Microsoft.Reporting.WebForms.ReportViewer)的類型不相容。】

前台引入ScriptManager控制項

<asp:ScriptManager ID="ScriptManager1" runat="server">

</asp:ScriptManager>

d>     運行成功,結果與上一種結果相似。

三,參考

報表rdl嵌入網頁(ASP.NET)

report service asp.net 中的使用

Asp.Net 中Report Service (RDLC)動態綁定資料-學習筆記

ASP.Net中使用Report Service

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.