如何从 .Net Core 调用/引用 Crystal Reports

9

本文介绍了如何从 .Net Core 调用/引用 Crystal Reports的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我有一个包含多个项目的 Visual Studio 解决方案.

I have a visual studio solution that has several projects in it.

  • 解决方案
    • 领域层(类库> .Net Core 2.2)
      • 保存所有数据库模型
      • 保存与数据库的所有交互.我参考了 Microsoft.EntityFrameworkCore 和 Oracle.EntityFrameworkCore
      • 是应用的主要交互方式

      我正处于需要集成报告和打印报告的地步.我一直在我的应用程序中使用 Crystal Reports(非常成功).但是,由于 Crystal 需要 Framework 4.5,我不知道如何使其工作.

      I'm at the point where I need to integrate reporting and printing of reports. I've always used Crystal Reports for my applications (with good success). However, since Crystal requires Framework 4.5 I can't figure out how to make that work.

      我已经创建了我的报告对象并对其进行了测试.他们在自己的独立解决方案中工作得很好.一旦我在我的核心应用程序中引用了框架应用程序,我就会中断.特别是当我尝试创建一个 Crystal 'ReportDocument' 对象时,我会崩溃.我已经看到过 SO(并经过测试),由于 DLL 不同,您不能将 .Net Core 与 .Net Framework 混合使用.

      I've created my Reporting objects and tested them. They work great in their own standalone solution. Once I reference the Framework app in my Core app I break. In particular I break when I attempt to create a Crystal 'ReportDocument' object . I've seen all over SO (and tested) you can't mix a .Net Core with .Net Framework because of the different DLLs.

      关于如何让报告/打印工作的任何建议?我对 Crystal Reports 也不挑剔.

      Any suggestions on how I can get reporting/printing to work? I'm not picky when it comes to Crystal Reports either.

      推荐答案

      你不走运,因为它不受支持.我鼓励您寻找其他替代方案

      You are out of luck, because it is not supported. I would encourage you looking into other alternatives

      来自 Crystal Reports 供应商网站:

      From the Crystal Reports vendor website:

      因此,将您的核心项目更新到完整的 4.7.1,它应该可以工作.我只安装了 4.7.1,它适用于我现有的设置为 4.0 的 ASP.NET 项目.

      So update your Core Project to the full 4.7.1 and it should work. I just install 4.7.1 and it works for my existing ASP.NET project that was set to 4.0.

      需要明确的是,不支持 Framework 2.0 Core

      To be clear, Framework 2.0 Core is NOT supported

      来源:水晶报告ASP .NET Core 2.0

      这篇关于如何从 .Net Core 调用/引用 Crystal Reports的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

      The End

相关推荐

C# 中的多播委托奇怪行为?
Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)...
2023-11-11 C#/.NET开发问题
6

参数计数与调用不匹配?
Parameter count mismatch with Invoke?(参数计数与调用不匹配?)...
2023-11-11 C#/.NET开发问题
26

如何将代表存储在列表中
How to store delegates in a List(如何将代表存储在列表中)...
2023-11-11 C#/.NET开发问题
6

代表如何工作(在后台)?
How delegates work (in the background)?(代表如何工作(在后台)?)...
2023-11-11 C#/.NET开发问题
5

没有 EndInvoke 的 C# 异步调用?
C# Asynchronous call without EndInvoke?(没有 EndInvoke 的 C# 异步调用?)...
2023-11-11 C#/.NET开发问题
2

Delegate.CreateDelegate() 和泛型:错误绑定到目标方法
Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)...
2023-11-11 C#/.NET开发问题
14