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

How to call/reference Crystal Reports from .Net Core(如何从 .Net Core 调用/引用 Crystal Reports)
本文介绍了如何从 .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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)