1

バックグラウンド:

  • ReportExecutionServiceSoap インターフェイスを使用して、C# で記述された ASP.NET アプリケーションを介して SSRS レポートをレンダリングします。
  • トグル アイテムとページング機能を既に実装しているレンダリング サービスが動作しているので、コードにはかなり自信があります。
  • 「インタラクティブソート」機能を提供しようとしています。(非常に限定された)ドキュメントを見ると、実装はトグル機能に非常に似ているはずです。

私のレンダラーでの 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);

質問:

  1. API に関する私の理解は正しいですか?
  2. そうでない場合、私は何を間違っていますか?
  3. もしそうなら、私は何を間違っていますか?
4

1 に答える 1