フッターコンテンツにスキップ
ビデオ

ASPNETでビューをPDFに変換する方法

SAP Crystal ReportsからIronPDFへの移行は、レポーティングワークフローをCOM時代の依存関係を持つランタイムMSI再配布可能から、現代のNuGetパッケージに変えます。 このガイドでは、ランタイムインストーラー要件を削除し、SAPエコシステムのロックインを解除し、Crystal Reports for Visual Studio(CR4VS)がサポートしていない.NET 6/8/9およびLinux/Dockerターゲットを解放するステップバイステップの移行パスを提供します。

なぜSAP Crystal ReportsからIronPDFへ移行するのか

SAPクリスタルレポートを理解する

SAP Crystal Reportsは、"ピクセルパーフェクト"レポートを生成するために広く使用されている企業レポーティングプラットフォームで、広範なデータソース接続性と長年のデザイーナーエコシステムを備えています。 Crystal Reports Designerは、SAPスタック内で複雑なレポートレイアウトを構築するための生産的なツールのままです。

しかし、ランタイムのCOM時代アーキテクチャとWindows/.NET Framework専用のフットプリントにより、.NET 6/8/9、Linux、またはコンテナー優先デプロイメントをターゲットとするチームに摩擦を生じさせます。

移行する主な理由

  1. ランタイムMSI再配布可能: Crystal ReportsランタイムはMSIインストーラー(通常、32/64ビットおよびロケールによって数十から数百MB)として出荷され、NuGetパッケージではありません。
  2. SAPエコシステムのロックイン: SAPのリリースサイクルおよび製品ロードマップに結びつく;SAPは、CR4VSの主流メンテナンスの終了を2027年末に確約しています。
  3. ライセンス: CR4VS自身はダウンロード無料で、ランタイムは再配布無料ですが、Crystal Reportsデザイナー家族(CR 2020/CR 2025)およびBIプラットフォームは商業SAP SKUです。
  4. レガシーアーキテクチャ: COM依存のランタイムDLLは.NET Framework 4.xをターゲットとしており、.NET Core / .NET 5+ではロードできません。
  5. .NET Core / .NET 5+のサポートなし: 現代 for .NETを対象とするCrystal Reportsランタイムのロードマップはありません; プロジェクトは.NET Framework 4.xに固定されています。
  6. 32ビットランタイムの廃止: SAPは、32ビットCR .NETランタイムがSP 39(2025年12月)以降に廃止されることを確認しました; 今後のサービスパックは64ビットのみです。
  7. レポートデザイナーの依存関係: CR4VS Visual Studio拡張機能またはスタンドアローンのCrystal Reportsデザイナーが必要です .rpt ファイルを作成するため

SAP Crystal Reportsの隠れたコスト

コスト要因 SAP Crystal Reports IronPDF
ランタイム配布 MSI再配布インストーラー NuGetパッケージ
インストール ランタイムインストーラ + VS拡張 dotnet add package IronPdf
デプロイメント ターゲットマシンでMSIを実行する xcopy / 公開
64ビット対応 はい (32ビットランタイムはSP 39、2025年12月後に終了) ネイティブ
.NET Core / .NET 5 以上 サポートされていない (Framework 4.xのみ) 完全サポート (.NET 6/8/9, Framework 4.6.2+)
クラウドデプロイメント Windows VM専用 単純
Linux / Docker サポートされていない (Windowsのみ) サポート対象

SAP Crystal ReportsとIronPDFの比較

フィーチャー SAP Crystal Reports IronPDF
主な機能 エンタープライズレポートプラットフォーム HTMLからPDFへの変換エンジンとPDF操作
統合 SAPエコシステム内で最適 最新 for .NET統合、軽量NuGetパッケージ
使いやすさ 複雑なセットアップとデプロイメント 統合を簡素化し、.NET開発者をサポート
レポートデザイナー 必須 オプション(HTML/CSS)
テンプレート形式 .rpt (バイナリ) HTML/CSS
HTMLからPDFへ なし 完全なChromium
URLからPDFへ なし はい
CSSサポート なし 完全なCSS3
JavaScript(JavaScript なし フルES2024
PDF操作 なし フル(マージ、分割、編集)
デジタル署名 なし はい
PDF/Aコンプライアンス なし はい
現代的妥当性 衰退し、最新の代替言語に取って代わられる 現代的で、現代の技術にうまく統合されていること。

現代 for .NET(6、8、9)とクロスプラットフォームデプロイメントをターゲットにするチームにとって、IronPDFは.NET Framework 4.xに固定されているCrystal Reportsランタイムが提供できないネイティブサポートを提供します。


始める前に

前提条件

  1. .NET環境: .NET Framework 4.6.2+ または .NET 6 / 8 / 9
  2. NuGetアクセス: NuGetパッケージをインストールする機能
  3. IronPDFライセンス: IronPDFからライセンスキーを取得します。

NuGetパッケージの変更

# Crystal Reports for Visual Studio is not distributed by SAP on NuGet.
# Projects typically reference the GAC-installed CrystalDecisions.*.dll
# assemblies delivered by the CR4VS / CR runtime MSI. Community-maintained
#NuGetwrappers such as CrystalReports.Engine exist for build automation
# but are not official SAP packages.

# 1. Remove direct assembly references (CrystalDecisions.*.dll) from your .csproj
# 2. If using a communityNuGetwrapper, remove it:
dotnet remove package CrystalReports.Engine

# 3. Uninstall the Crystal Reports runtime MSI from build/deploy targets

# 4. Install IronPDF
dotnet add package IronPdf
# Crystal Reports for Visual Studio is not distributed by SAP on NuGet.
# Projects typically reference the GAC-installed CrystalDecisions.*.dll
# assemblies delivered by the CR4VS / CR runtime MSI. Community-maintained
#NuGetwrappers such as CrystalReports.Engine exist for build automation
# but are not official SAP packages.

# 1. Remove direct assembly references (CrystalDecisions.*.dll) from your .csproj
# 2. If using a communityNuGetwrapper, remove it:
dotnet remove package CrystalReports.Engine

# 3. Uninstall the Crystal Reports runtime MSI from build/deploy targets

# 4. Install IronPDF
dotnet add package IronPdf
SHELL

ライセンス構成

// Add at application startup
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
// Add at application startup
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY";
' Add at application startup
IronPdf.License.LicenseKey = "YOUR-LICENSE-KEY"
$vbLabelText   $csharpLabel

完全な API リファレンス

名前空間の変更

// Before: SAP Crystal Reports
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using CrystalDecisions.ReportAppServer;

// After: IronPDF
using IronPdf;
// Before: SAP Crystal Reports
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using CrystalDecisions.ReportAppServer;

// After: IronPDF
using IronPdf;
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports CrystalDecisions.ReportAppServer

Imports IronPdf
$vbLabelText   $csharpLabel

コア API マッピング

SAP Crystal Reports IronPDF ノート
ReportDocument ChromePdfRenderer コアレンダリング
ReportDocument.Load() RenderHtmlAsPdf() コンテンツを読み込む
.rpt ファイル HTML/CSSテンプレート テンプレート形式
SetDataSource() データ付きHTML データバインディング
SetParameterValue() 文字列の補間 パラメータ
ExportToDisk() pdf.SaveAs() ファイルを保存
ExportToStream() pdf.BinaryData バイト
PrintToPrinter() pdf.Print() 印刷
Database.Tables C#データアクセス データソース
FormulaFieldDefinitions C#ロジック 計算
SummaryInfo pdf.MetaData PDFメタデータ
ExportFormatType.PortableDocFormat デフォルト出力 PDFネイティブ

コード移行の例

例1: HTMLからPDFへの変換

翻訳前(SAP Crystal Reports):

// NuGet: Install-Package CrystalReports.Engine
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System;

class Program
{
    static void Main()
    {
        // Crystal Reports requires a .rpt file template
        ReportDocument reportDocument = new ReportDocument();
        reportDocument.Load("Report.rpt");

        // Crystal Reports doesn't directly support HTML
        // You need to bind data to the report template
        // reportDocument.SetDataSource(dataSet);

        ExportOptions exportOptions = reportDocument.ExportOptions;
        exportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
        exportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;

        DiskFileDestinationOptions diskOptions = new DiskFileDestinationOptions();
        diskOptions.DiskFileName = "output.pdf";
        exportOptions.DestinationOptions = diskOptions;

        reportDocument.Export();
        reportDocument.Close();
        reportDocument.Dispose();
    }
}
// NuGet: Install-Package CrystalReports.Engine
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System;

class Program
{
    static void Main()
    {
        // Crystal Reports requires a .rpt file template
        ReportDocument reportDocument = new ReportDocument();
        reportDocument.Load("Report.rpt");

        // Crystal Reports doesn't directly support HTML
        // You need to bind data to the report template
        // reportDocument.SetDataSource(dataSet);

        ExportOptions exportOptions = reportDocument.ExportOptions;
        exportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
        exportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;

        DiskFileDestinationOptions diskOptions = new DiskFileDestinationOptions();
        diskOptions.DiskFileName = "output.pdf";
        exportOptions.DestinationOptions = diskOptions;

        reportDocument.Export();
        reportDocument.Close();
        reportDocument.Dispose();
    }
}
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports System

Class Program
    Shared Sub Main()
        ' Crystal Reports requires a .rpt file template
        Dim reportDocument As New ReportDocument()
        reportDocument.Load("Report.rpt")

        ' Crystal Reports doesn't directly support HTML
        ' You need to bind data to the report template
        ' reportDocument.SetDataSource(dataSet)

        Dim exportOptions As ExportOptions = reportDocument.ExportOptions
        exportOptions.ExportDestinationType = ExportDestinationType.DiskFile
        exportOptions.ExportFormatType = ExportFormatType.PortableDocFormat

        Dim diskOptions As New DiskFileDestinationOptions()
        diskOptions.DiskFileName = "output.pdf"
        exportOptions.DestinationOptions = diskOptions

        reportDocument.Export()
        reportDocument.Close()
        reportDocument.Dispose()
    End Sub
End Class
$vbLabelText   $csharpLabel

翻訳後(IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        // Create a PDF from HTML string
        var renderer = new ChromePdfRenderer();

        string htmlContent = "<h1>Hello World</h1><p>This is a PDF generated from HTML.</p>";

        var pdf = renderer.RenderHtmlAsPdf(htmlContent);
        pdf.SaveAs("output.pdf");

        Console.WriteLine("PDF created successfully!");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        // Create a PDF from HTML string
        var renderer = new ChromePdfRenderer();

        string htmlContent = "<h1>Hello World</h1><p>This is a PDF generated from HTML.</p>";

        var pdf = renderer.RenderHtmlAsPdf(htmlContent);
        pdf.SaveAs("output.pdf");

        Console.WriteLine("PDF created successfully!");
    }
}
Imports IronPdf
Imports System

Class Program
    Shared Sub Main()
        ' Create a PDF from HTML string
        Dim renderer As New ChromePdfRenderer()

        Dim htmlContent As String = "<h1>Hello World</h1><p>This is a PDF generated from HTML.</p>"

        Dim pdf = renderer.RenderHtmlAsPdf(htmlContent)
        pdf.SaveAs("output.pdf")

        Console.WriteLine("PDF created successfully!")
    End Sub
End Class
$vbLabelText   $csharpLabel

この例は、基本的なパラダイムの違いを示しています。 SAP Crystal Reportsは、Crystal Reportsデザイナーで作成された予め設計されたDiskFileDestinationOptionsを構成する必要があります。 ライブラリはHTMLコンテンツを直接サポートしていません。

IronPDFはHTML文字列を直接受け入れます: SaveAs()します。 デザイナー不要、バイナリテンプレート不要、複雑なエクスポート設定不要。 包括的な例については、HTML to PDF documentationを参照してください。

例2: URLからPDFへの変換

翻訳前(SAP Crystal Reports):

// NuGet: Install-Package CrystalReports.Engine
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System;
using System.Net;

class Program
{
    static void Main()
    {
        // Crystal Reports cannot directly convert URLs to PDF
        // You need to create a report template first

        // Download HTML content
        WebClient client = new WebClient();
        string htmlContent = client.DownloadString("https://example.com");

        // Crystal Reports requires .rpt template and data binding
        // This approach is not straightforward for URL conversion
        ReportDocument reportDocument = new ReportDocument();
        reportDocument.Load("WebReport.rpt");

        // Manual data extraction and binding required
        // reportDocument.SetDataSource(extractedData);

        reportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, "output.pdf");
        reportDocument.Close();
        reportDocument.Dispose();
    }
}
// NuGet: Install-Package CrystalReports.Engine
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System;
using System.Net;

class Program
{
    static void Main()
    {
        // Crystal Reports cannot directly convert URLs to PDF
        // You need to create a report template first

        // Download HTML content
        WebClient client = new WebClient();
        string htmlContent = client.DownloadString("https://example.com");

        // Crystal Reports requires .rpt template and data binding
        // This approach is not straightforward for URL conversion
        ReportDocument reportDocument = new ReportDocument();
        reportDocument.Load("WebReport.rpt");

        // Manual data extraction and binding required
        // reportDocument.SetDataSource(extractedData);

        reportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, "output.pdf");
        reportDocument.Close();
        reportDocument.Dispose();
    }
}
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports System
Imports System.Net

Module Program
    Sub Main()
        ' Crystal Reports cannot directly convert URLs to PDF
        ' You need to create a report template first

        ' Download HTML content
        Dim client As New WebClient()
        Dim htmlContent As String = client.DownloadString("https://example.com")

        ' Crystal Reports requires .rpt template and data binding
        ' This approach is not straightforward for URL conversion
        Dim reportDocument As New ReportDocument()
        reportDocument.Load("WebReport.rpt")

        ' Manual data extraction and binding required
        ' reportDocument.SetDataSource(extractedData)

        reportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, "output.pdf")
        reportDocument.Close()
        reportDocument.Dispose()
    End Sub
End Module
$vbLabelText   $csharpLabel

翻訳後(IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        // Create a PDF from a URL
        var renderer = new ChromePdfRenderer();

        var pdf = renderer.RenderUrlAsPdf("https://example.com");
        pdf.SaveAs("output.pdf");

        Console.WriteLine("PDF created from URL successfully!");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        // Create a PDF from a URL
        var renderer = new ChromePdfRenderer();

        var pdf = renderer.RenderUrlAsPdf("https://example.com");
        pdf.SaveAs("output.pdf");

        Console.WriteLine("PDF created from URL successfully!");
    }
}
Imports IronPdf
Imports System

Class Program
    Shared Sub Main()
        ' Create a PDF from a URL
        Dim renderer As New ChromePdfRenderer()

        Dim pdf = renderer.RenderUrlAsPdf("https://example.com")
        pdf.SaveAs("output.pdf")

        Console.WriteLine("PDF created from URL successfully!")
    End Sub
End Class
$vbLabelText   $csharpLabel

SAP Crystal Reports では、URLを直接 PDF に変換することはできません。 HTMLコンテンツを.rptテンプレートに抽出しバインドする必要がありますが、このプロセスは簡単ではなく、かなりの手作業が必要です。

IronPDFのRenderUrlAsPdf()メソッドは、すべてのCSS、JavaScript、および画像を含む完全にレンダリングされたウェブページを単一の呼び出しでキャプチャします。 詳しくは、チュートリアルをご覧ください。

例3:ページ番号を含むヘッダーとフッター

翻訳前(SAP Crystal Reports):

// NuGet: Install-Package CrystalReports.Engine
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System;

class Program
{
    static void Main()
    {
        // Crystal Reports requires design-time configuration
        ReportDocument reportDocument = new ReportDocument();
        reportDocument.Load("Report.rpt");

        // Headers and footers must be designed in the .rpt file
        // using Crystal Reports designer
        // You can set parameter values programmatically
        reportDocument.SetParameterValue("HeaderText", "Company Name");
        reportDocument.SetParameterValue("FooterText", "Page ");

        // Crystal Reports handles page numbers through formula fields
        // configured in the designer

        reportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, "output.pdf");
        reportDocument.Close();
        reportDocument.Dispose();
    }
}
// NuGet: Install-Package CrystalReports.Engine
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using System;

class Program
{
    static void Main()
    {
        // Crystal Reports requires design-time configuration
        ReportDocument reportDocument = new ReportDocument();
        reportDocument.Load("Report.rpt");

        // Headers and footers must be designed in the .rpt file
        // using Crystal Reports designer
        // You can set parameter values programmatically
        reportDocument.SetParameterValue("HeaderText", "Company Name");
        reportDocument.SetParameterValue("FooterText", "Page ");

        // Crystal Reports handles page numbers through formula fields
        // configured in the designer

        reportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, "output.pdf");
        reportDocument.Close();
        reportDocument.Dispose();
    }
}
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
Imports System

Class Program
    Shared Sub Main()
        ' Crystal Reports requires design-time configuration
        Dim reportDocument As New ReportDocument()
        reportDocument.Load("Report.rpt")

        ' Headers and footers must be designed in the .rpt file
        ' using Crystal Reports designer
        ' You can set parameter values programmatically
        reportDocument.SetParameterValue("HeaderText", "Company Name")
        reportDocument.SetParameterValue("FooterText", "Page ")

        ' Crystal Reports handles page numbers through formula fields
        ' configured in the designer

        reportDocument.ExportToDisk(ExportFormatType.PortableDocFormat, "output.pdf")
        reportDocument.Close()
        reportDocument.Dispose()
    End Sub
End Class
$vbLabelText   $csharpLabel

翻訳後(IronPDF):

// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();

        // Configure headers and footers
        renderer.RenderingOptions.TextHeader.CenterText = "Company Name";
        renderer.RenderingOptions.TextHeader.FontSize = 12;

        renderer.RenderingOptions.TextFooter.LeftText = "Confidential";
        renderer.RenderingOptions.TextFooter.RightText = "Page {page} of {total-pages}";
        renderer.RenderingOptions.TextFooter.FontSize = 10;

        string htmlContent = "<h1>Document Title</h1><p>Document content goes here.</p>";

        var pdf = renderer.RenderHtmlAsPdf(htmlContent);
        pdf.SaveAs("output.pdf");

        Console.WriteLine("PDF with headers and footers created!");
    }
}
// NuGet: Install-Package IronPdf
using IronPdf;
using System;

class Program
{
    static void Main()
    {
        var renderer = new ChromePdfRenderer();

        // Configure headers and footers
        renderer.RenderingOptions.TextHeader.CenterText = "Company Name";
        renderer.RenderingOptions.TextHeader.FontSize = 12;

        renderer.RenderingOptions.TextFooter.LeftText = "Confidential";
        renderer.RenderingOptions.TextFooter.RightText = "Page {page} of {total-pages}";
        renderer.RenderingOptions.TextFooter.FontSize = 10;

        string htmlContent = "<h1>Document Title</h1><p>Document content goes here.</p>";

        var pdf = renderer.RenderHtmlAsPdf(htmlContent);
        pdf.SaveAs("output.pdf");

        Console.WriteLine("PDF with headers and footers created!");
    }
}
Imports IronPdf
Imports System

Module Program
    Sub Main()
        Dim renderer As New ChromePdfRenderer()

        ' Configure headers and footers
        renderer.RenderingOptions.TextHeader.CenterText = "Company Name"
        renderer.RenderingOptions.TextHeader.FontSize = 12

        renderer.RenderingOptions.TextFooter.LeftText = "Confidential"
        renderer.RenderingOptions.TextFooter.RightText = "Page {page} of {total-pages}"
        renderer.RenderingOptions.TextFooter.FontSize = 10

        Dim htmlContent As String = "<h1>Document Title</h1><p>Document content goes here.</p>"

        Dim pdf = renderer.RenderHtmlAsPdf(htmlContent)
        pdf.SaveAs("output.pdf")

        Console.WriteLine("PDF with headers and footers created!")
    End Sub
End Module
$vbLabelText   $csharpLabel

SAP Crystal Reports では、ヘッダーとフッターをデザイン時に設定する必要があります。 Crystal Reportsデザイナーを使用して"FooterText"のようなパラメータ値を渡す必要があります。ページ番号はデザイナーの式フィールドを通じて設定する必要があります。

IronPDFはTextFooterプロパティでプログラム的なヘッダー/フッターの構成を提供します。 コード内で CenterText, LeftText, RightText, および FontSize を直接設定します。 ページ番号は{total-pages}のプレースホルダーを使用し、デザイナーは不要です。


よくある移行の問題

課題1:.rptファイルの変換

SAP Crystal Reports: レイアウト、データ、数式が埋め込まれたバイナリ.rptファイル。

解決策:直接変換することはできません-HTMLとして再作成する必要があります: 1.Crystal Reports デザイナーで .rpt を開く 2.文書のレイアウト、フォント、色 3.すべての数式フィールドに注意 4.HTML/CSSで再作成 5.数式をC#コードに変換する

課題2: データベース接続

SAP Crystal Reports: 組み込み接続文字列とODBC。

ソリューション: アプリケーションのデータレイヤーを使用してください:

// Instead of Crystal's database integration
var data = await _dbContext.Orders
    .Where(o => o.Date >= startDate && o.Date <= endDate)
    .ToListAsync();

// Bind to HTML template
var html = GenerateReportHtml(data);
// Instead of Crystal's database integration
var data = await _dbContext.Orders
    .Where(o => o.Date >= startDate && o.Date <= endDate)
    .ToListAsync();

// Bind to HTML template
var html = GenerateReportHtml(data);
Option Strict On



' Instead of Crystal's database integration
Dim data = Await _dbContext.Orders _
    .Where(Function(o) o.Date >= startDate AndAlso o.Date <= endDate) _
    .ToListAsync()

' Bind to HTML template
Dim html = GenerateReportHtml(data)
$vbLabelText   $csharpLabel

課題 3:ランタイム依存性

SAP Crystal Reports: Crystal Reports Runtimeのインストール(500MB以上)が必要です。

ソリューション: IronPDFは自己完結しています:

# Just add theNuGetpackage
dotnet add package IronPdf
# That's it - no additional installs needed
# Just add theNuGetpackage
dotnet add package IronPdf
# That's it - no additional installs needed
SHELL

課題4: 32ビット/64ビットおよび.NET Frameworkのロックイン

SAP Crystal Reports: Crystal ReportsランタイムはCOM依存であり、別々の32ビットおよび64ビットMSIで出荷されます。 SAPは、32ビットCR .NETランタイムがSP 39(2025年12月)以降に廃止されることを確認しました; 今後のサービスパックは64ビットのみです。 ランタイムは.NET Framework 4.xをターゲットにしており、.NET Core / .NET 5+ではロードできません。

ソリューション: IronPDFは.NET Framework 4.6.2+、.NET 6、.NET 8、および.NET 9で実行できます—LinuxやDockerも含みます。 64ビットまたはAnyCPU専用に特別な設定は不要です。


移行後の新機能

IronPDFに移行することで、SAP Crystal Reportsが提供できない機能を得ることができます:

PDFマージ

var pdf1 = PdfDocument.FromFile("report1.pdf");
var pdf2 = PdfDocument.FromFile("report2.pdf");
var merged = PdfDocument.Merge(pdf1, pdf2);
merged.SaveAs("complete_report.pdf");
var pdf1 = PdfDocument.FromFile("report1.pdf");
var pdf2 = PdfDocument.FromFile("report2.pdf");
var merged = PdfDocument.Merge(pdf1, pdf2);
merged.SaveAs("complete_report.pdf");
Dim pdf1 = PdfDocument.FromFile("report1.pdf")
Dim pdf2 = PdfDocument.FromFile("report2.pdf")
Dim merged = PdfDocument.Merge(pdf1, pdf2)
merged.SaveAs("complete_report.pdf")
$vbLabelText   $csharpLabel

PDFのセキュリティ

var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf(reportHtml);

pdf.MetaData.Title = "Quarterly Sales Report";
pdf.MetaData.Author = "Finance Department";

pdf.SecuritySettings.OwnerPassword = "admin123";
pdf.SecuritySettings.UserPassword = "view123";
pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights;
pdf.SecuritySettings.AllowUserCopyPasteContent = false;

pdf.SaveAs("secure_report.pdf");
var renderer = new ChromePdfRenderer();
var pdf = renderer.RenderHtmlAsPdf(reportHtml);

pdf.MetaData.Title = "Quarterly Sales Report";
pdf.MetaData.Author = "Finance Department";

pdf.SecuritySettings.OwnerPassword = "admin123";
pdf.SecuritySettings.UserPassword = "view123";
pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights;
pdf.SecuritySettings.AllowUserCopyPasteContent = false;

pdf.SaveAs("secure_report.pdf");
Dim renderer As New ChromePdfRenderer()
Dim pdf = renderer.RenderHtmlAsPdf(reportHtml)

pdf.MetaData.Title = "Quarterly Sales Report"
pdf.MetaData.Author = "Finance Department"

pdf.SecuritySettings.OwnerPassword = "admin123"
pdf.SecuritySettings.UserPassword = "view123"
pdf.SecuritySettings.AllowUserPrinting = PdfPrintSecurity.FullPrintRights
pdf.SecuritySettings.AllowUserCopyPasteContent = False

pdf.SaveAs("secure_report.pdf")
$vbLabelText   $csharpLabel

デジタル署名

var signature = new PdfSignature("certificate.pfx", "password");
pdf.Sign(signature);
var signature = new PdfSignature("certificate.pfx", "password");
pdf.Sign(signature);
Dim signature = New PdfSignature("certificate.pfx", "password")
pdf.Sign(signature)
$vbLabelText   $csharpLabel

ウォーターマーク

using IronPdf.Editing;

pdf.ApplyWatermark("<h1 style='color:red; opacity:0.3;'>DRAFT</h1>");
using IronPdf.Editing;

pdf.ApplyWatermark("<h1 style='color:red; opacity:0.3;'>DRAFT</h1>");
Imports IronPdf.Editing

pdf.ApplyWatermark("<h1 style='color:red; opacity:0.3;'>DRAFT</h1>")
$vbLabelText   $csharpLabel

機能比較の概要

フィーチャー SAP Crystal Reports IronPDF
:インストール: ランタイム配布 MSI再配布可能 NuGet
インストール方法 MSI + Visual Studio拡張 NuGet
デプロイメント ターゲットマシンでMSIを実行する xcopy / 公開
:プラットフォームサポート: .NET Framework 4.x はい はい(4.6.2以降)
.NET Core / .NET 5 以上 サポートされていません はい (.NET 6/8/9)
64ビットネイティブ はい (32ビットはSP 39、2025年12月後に終了) はい
Linux / Docker サポートされていない (Windowsのみ) はい
Azure / AWS Windows VM専用 単純
発達 レポートデザイナー 必須 オプション(HTML)
テンプレート形式 .rpt (バイナリ) HTML/CSS
学習曲線 クリスタルの構文 ウェブ標準
インテリセンス なし 完全なC#言語
:レンダリング: HTMLからPDFへ なし 完全なChromium
URLからPDFへ なし はい
CSSサポート なし 完全なCSS3
JavaScript なし フルES2024
: PDF の機能: PDFのマージ なし はい
PDFの分割 なし はい
透かし 制限的 フルHTML
デジタル署名 なし はい
PDF/A なし はい

移行チェックリスト

移行前

  • すべての.rptファイルをインベントリ化
  • 参考のために各レポートレイアウトのスクリーンショットを撮る
  • 数式フィールドと計算を文書化する
  • すべてのデータソースとパラメータを一覧表示する
  • 印刷要件を特定する
  • IronPDFからIronPDFライセンスキーを取得します

コードの更新

  • Crystal Reportsパッケージを削除する (CrystalDecisions.CrystalReports.Engine, 等)
  • デプロイメントからランタイムインストールを削除する
  • IronPdf NuGetパッケージをインストール
  • .rptレイアウトをHTML/CSSテンプレートに変換
  • Crystal の式を C# コードに変換する
  • データバインディングをSetDataSource()からHTML文字列補間に更新
  • 印刷コードをpdf.Print()に更新
  • アプリケーションの起動時にライセンスの初期化を追加

インフラ

  • サーバーからCrystal Runtimeを削除する
  • デプロイメントスクリプトを更新する
  • 32ビット互換モードを削除
  • Dockerイメージを更新する(該当する場合)

テスティング

  • PDF出力を元のレポートと比較する
  • すべての計算を検証する
  • すべてのパラメータをテストする
  • 印刷機能のテスト
  • パフォーマンステスト
  • 64ビットテスト

ご注意SAP Crystal Reportsはその所有者の登録商標です。 このサイトはSAPと提携しておらず、承認されていないか、SAPによってスポンサードされていません。すべての製品名、ロゴ、およびブランドはそれぞれの所有者の所有物です。 比較は情報提供のみを目的としており、執筆時点で公開されている情報を反映しています。

Curtis Chau
テクニカルライター

Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。

開発以外にも、CurtisはIoT(Internet of Things)への強い関心を持ち、ハードウェアとソフトウェアの統合方法を模索しています。余暇には、ゲームをしたりDiscordボットを作成したりして、技術に対する愛情と創造性を組み合わせています。

アイアンサポートチーム

私たちは週5日、24時間オンラインで対応しています。
チャット
メール
電話してね