![](/img/trans.png)
[英]Report and reportviewer control not in same project how can i access report
[英]Reportviewer and report are in different projects in the same solution. How do I attach the report to the viewer
我有一個表單應用程序,並且其中有一個reportviewer。 在相同的解決方案中,但是在不同的項目中,我有一個報告(rdl)。 我想在顯示給reportviewer的報告中使用其他項目中的報告。 這與使用部署到服務器的報告相反。
我最初將此報告部署到本地報告服務器。 我正在使用該部署顯示給報表查看器。 但是,我想使用本地數據庫,這樣我就可以將其與數據庫,報告和表格一起上傳到Mercurial存儲庫中。
將報告的“ Copy to Output Directory
屬性設置為Copy Always
然后將其路徑添加到ReportViewer
:
this.reportViewer1.LocalReport.ReportPath = "yourReportFileName.rdlc";
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.