【发布时间】:2020-07-19 18:06:45
【问题描述】:
我在我的 Angular 项目中使用同步融合粗体报告,并使用 SQL Server 2017 创建 RDL 报告。我想要做的是按照 link 在 BoldReport 查看器上查看 SSRS 报告。但不幸的是,遇到了某种错误,并且无法在客户端查看报告。
这是错误:
详情
提供有效的报表服务器信息(ReportServerURL、ReportServerCredential、ReportPath)以从服务器检索报表流。无法连接报表服务器服务。在 Syncfusion.Report.Core.Intenal.Server.SqlReportingServer2017.GetReportDefinition(String& exception) 在 BoldReports.Intenal.Server.ServerReportProcessor.GetReportDefinition(String& exception) 在 BoldReports.RDL.Data.ReportModel.ProcessServerReport()
通过理解上述错误,我认为存在一些凭据、ServerURL 问题。但是在代码中更改这些参数似乎并不能解决这个错误。
代码
public void OnInitReportOptions(ReportViewerOptions reportOption)
{
//Add SSRS Report Server and data source credentials
reportOption.ReportModel.ReportServerCredential = new System.Net.NetworkCredential("sa", "123");
reportOption.ReportModel.DataSourceCredentials.Add(new BoldReports.Web.DataSourceCredentials("ReportServer", "sa", "123"));
}
报表服务器配置管理器:
app.component.ts
export class AppComponent {
public serviceUrl: string;
public serverUrl: string;
public reportPath: string;
constructor() {
this.serviceUrl = 'https://localhost:44304/api/ReportViewer';
this.serverUrl = 'https://desktop-dfe3e8t/ReportServer';
this.reportPath = '/PurchaseRequests';
}
}
app.component.html
<bold-reportviewer id="reportViewer_Control" [reportServiceUrl]="serviceUrl" [processingMode]="Remote" [reportServerUrl]="serverUrl" [reportPath]="reportPath">
</bold-reportviewer>
如果我使用 serverUrl 打开浏览器,它会显示我的 SSRS 报告
但是当我运行我的 Angular 应用程序并且我的查看器正在加载时,它会显示我上面的错误
请指导我在上面的代码或步骤中做错了什么,以角度查看我的粗体报告。
【问题讨论】:
-
您好 Ahsan,我也遇到了同样的问题,您找到解决方案了吗?如果是,请您分享解决方案。
标签: angular asp.net-core reporting-services ssrs-2008 syncfusion