如何使用Microsoft報告查看器創建參數化的報告?使用Microsoft查看器的報告
0
A
回答
0
在你的問題中提供更多的細節,但據我所知,MSDN ReportViewer Controls將是非常好的,你自己學習更多。
0
0
一兩件事,我會避免在Microsoft報表查看器控件。只需使用瀏覽器控件,瀏覽報告,像使用瀏覽器時那樣傳遞URL中的參數。
這是好多種原因。
- MS報告查看器控件有很多錯誤,你會被困住。
- 瀏覽器和報表查看器以略微不同的方式呈現報表,例如邊距等。因此,如果您切換到Web應用程序並需要使用瀏覽器訪問報表,則必須調整大部分報表。這讓我想到下一個問題。 。 。
- 如果你需要去一個web應用程序,你將需要重新實現你如何調用報告,傳遞參數等,而不是僅僅使用你已經創建的瀏覽器功能(你使用控件vs不同的方式訪問報告。使用瀏覽器)
否則,如果你真的想使用報表查看器控件,這裏是(使用.NET 2.0)樣本:
ReportViewer rvReportViewerControl = new ReportViewer();
rvReportViewerControl.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
rvReportViewerControl.ServerReport.ReportServerUrl = new Uri("http://<SERVERNAME>/ReportServer");
rvReportViewerControl.ServerReport.ReportPath = "<FOLDER PATH TO REPORTS>");
rvReportViewerControl.ShowParameterPrompts = false;
Microsoft.Reporting.WinForms.ReportParameterInfoCollection rpInfoCollection = rvReportViewerControl.ServerReport.GetParameters();
if (rpInfoCollection.Count > 0)
{
List<ReportParameter> paramList = new List<ReportParameter>();
foreach (ReportParameterInfo reportParameter in rpInfoCollection)
{
string parameterName = reportParameter.Name.ToString();
string parameterValue = "";
bool isParameterVisible = reportParameter.Visible;
paramList.Add(new ReportParameter(parameterName, parameterValue, isParameterVisible));
}
rvReportViewerControl.ServerReport.SetParameters(paramList);
}
rvReportViewerControl.RefreshReport();
This site有很多有用的信息。
相關問題
- 1. 使用Microsoft報告查看器打印圖像
- 2. 使用報告查看器顯示Asp.Net中的RDLC報告
- 3. 2使用報告查看器報告中的數據集?
- 4. 使用多個報告的報告查看器
- 5. 報告查看器的iPad
- 6. vb.net報告查看器多個報告
- 7. 使用報告查看器時報告水印消失
- 8. 在asp.net中使用報告查看器生成報告
- 9. 報告查看器與httpOnlyCookies
- 10. 報告查看器在php
- 11. 幫助報告查看器
- 12. 報告查看器打印?
- 13. 報告查看器問題
- 14. 報告查看器X Dapper
- 15. RDLC報表查看器鑽取報告
- 16. C#asp.net報告和報表查看器(或的ReportViewer)子報告
- 17. RDLC報告查看器不在報告查看器中顯示數據?
- 18. ASP.Net SSRS報告查看器9.0和報告查看器10.0並排
- 19. VS報告 - 報告查看器不適用於ASP:面板
- 20. 使用報表查看器在MVC 4中顯示RDLC報告
- 21. 報告查看器不顯示使用Sql Server Reporting Services創建的報告
- 22. 是否可以使用單個報告查看器顯示不同的報告?
- 23. 如何爲不同的RDLC /報告使用一個報告查看器
- 24. 使用主報告查看器來顯示RDLC中的所有報告
- 25. 報告查看器與服務器2008
- 26. HTML5的SSRS報告查看器
- 27. 報告查看器IO的工具?
- 28. 在asp.net中的報告查看器
- 29. MVC SyncFusion的報告查看器?
- 30. 報告查看器的點擊事件?
做了一些編輯,我的第一個代碼不會很正確。儘管現在應該是好的。 – richard