我有這樣的:ReportViewer不顯示報告 - URL問題?
<Window>
<ContentPresenter Content="{Binding Viewer}" />
</Window>
internal class MainViewModel : ObservableObject{
private WindowsFormsHost _viewer;
public WindowsFormsHost Viewer
{
get { return _viewer; }
set { Set(() => Viewer, ref _viewer, value); }
}
public MainViewModel()
{
_viewer = new WindowsFormsHost();
var reportViewer = new ReportViewer();
reportViewer.ProcessingMode = ProcessingMode.Remote;
reportViewer.ServerReport.ReportServerUrl = new Uri("http://someservername/Reports/Pages/Folder.aspx");
reportViewer.ServerReport.ReportPath = "ItemPath=/somefolder1/somefolder2/ReportX";
Viewer.Child = reportViewer;
}
}
,我可以看到對面的窗戶,但沒有報告的頂部被禁用的報告服務工具欄。我已經玩過分配各種字符串到ReportPath和ReportServerUrl,但沒有。這是一個URL的問題?當然,如果我把它放到瀏覽器中,網址就可以工作。謝謝。