背景:
这是我在渲染器中实现的Sort方法:
using (var rsExec = new ReportExecutionService())
{
// Configure the service instance, specifiying the credentials and the sessionId
rsExec.Url = BuildSsrsServiceInvocationUri(m_reportServerUrl);
rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials;
rsExec.UseDefaultCredentials = true;
// Reload the execution context of the previous session
rsExec.ExecutionHeaderValue = new ExecutionHeader();
rsExec.ExecutionHeaderValue.ExecutionID = sessionId;
// Sort
string reportItemResult; // don't know what to do with this
ExecutionInfo2 execInfoResult; // don't know what to do with this
rsExec.Sort2(sortItem,
SortDirectionEnum.Ascending, // TODO: get this from method arg
clearExistingSorts,
PageCountMode.Estimate,
out reportItemResult,
out execInfoResult);
}
从我的控制器中我调用上面的方法。 sessionId是先前呈现的报告的ExecutionId,id对应于用户点击的报告项目:
// Sort the report
m_ReportRenderer.Sort(sessionId, id, clear);
最后,我调用渲染器的RenderReport方法,期望获取按用户点击的列排序的报告输出:
// Render the report with the new sort order
var renderResult = m_ReportRenderer.RenderReport(sessionId, ImageRoot, actionScript);
问题:
答案 0 :(得分:0)