0

我使用以下代码有问题地呈现报告:

rsExecService.ReportExecutionService rsExec = this.CreateReportExecutionService();
rsExecService.ExecutionInfo ei = rsExec.LoadReport(path, historyID);

Byte[] results;
string mimeType = String.Empty;
rsExecService.Warning[] warnings = null;
string[] streamIDs = null;

results = rsExec.Render(format, deviceInfo, out extension, out encoding, out mimeType, out warnings, out streamIDs);

(缺少一些变量定义,因为它们作为参数传递给方法)。

问题是我需要在渲染报告之前对报告进行一些关于本地化的预处理。
我查看了 ExecutionInfo 'ei',似乎没有成员可以让我访问原始 xml 报告内容。

是否有另一种方法来呈现允许我首先更改 xml 的报告?

ETA:请参阅下面的答案。

4

1 回答 1

3

我已经解决了:

  • 首先使用 ReportingService2010 使用 GetItemDefinition(path) 下载报告。
  • 对原始数据执行所需的任何预处理。
  • 不要使用 ReportExecutionService.LoadReport(),而是使用 LoadReportDefinition()
于 2012-11-14T10:22:00.433 回答