2012-01-04 11 views
1

レポートサービスファイルをVS2008からVS2010に変換しようとしています。 ReportViewerを使用せずに入力され、保存されます。VS2008からVS2010へのReporting Servicesレポートのアップグレード

以下の手順でエラーが発生します。

  1. VS2010でプロジェクトを開きます。すべて正常に動作します。
  2. .rdlcファイルを開きます。アップグレードされます。
  3. アプリケーションを再度実行します。それは失敗する。

http://www.gotreportviewer.com/objectdatasources/index.htmlからサンプルをダウンロードし、http://knol.google.com/k/microsoft-sql-server-reporting-services-ssrs#Data_Sourcesの方法を使用して情報を保存しています。

このエラーを回避する方法はありますか? VS2010を使用してレポートを更新できるようにする必要があります。

[エラー]

{ "レポート定義が有効ではありません詳細:レポート定義が無効なターゲット名前空間「を有しているhttp://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition 「これはアップグレードすることはできません。 "}

[コード]

//Test Code 
try 
{ 
    ReportViewer viewer = new ReportViewer(); 
    viewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); 
    viewer.ProcessingMode = ProcessingMode.Local; 

    //Either get this via the embedded resource, or directly via the path. -> better to use embedded resource! 
    viewer.LocalReport.ReportEmbeddedResource = "AuthorBooks.AuthorBooks.rdlc";  //Namespace.ReportName.rdlc   
    //viewer.LocalReport.ReportPath = @"C:\Test Projects\ReportingServicesWorking\AuthorBooks.rdlc"; 

      viewer.LocalReport.DataSources.Add(
       new ReportDataSource 
       (
       "AuthorBooks_Author", 
       m_authors 
       ) 
       ); 

      string mime, encoding, extension; 
      string[] streams; 
      Warning[] warnings; 

      byte[] report = viewer.LocalReport.Render("PDF", null, 
       out mime, 
       out encoding, 
       out extension, 
       out streams, 
       out warnings); 

      string outputPath = @"C:\Test Projects\ReportingServicesWorking\TestSave.pdf"; 
      File.WriteAllBytes(outputPath, report); 
      Process.Start(outputPath); 
     } 
     catch (Exception ex) 
     { 
      //Do stuff here. 
     } 

答えて

1

ReportViewer 2010 redistributableがインストールされていることを確認し、ReportViewerコントロールのこのバージョンは、アプリケーションで使用されています。

+0

ありがとうございました。私はそれを行って、それが働くかどうかを知らせます。 – HockeyJ

関連する問題