水晶报表验证数据库不工作

Crystal Report VerifyDatabase not working(水晶报表验证数据库不工作)
本文介绍了水晶报表验证数据库不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个针对开发数据库设计的 Crystal Report.当我将它加载到实时系统中时,我需要它来运行一个不同但等效的数据库.通常,我只是通过 C# 中的一些代码运行报告,这些代码设置连接信息、参数并在报告和子报告上调用 VerifyDatabase,并且一切正常.

I have a Crystal Report that was designed against a dev database. When I load it into the live system I need it to run a different but equivalent database. Normally I just run reports through some code in C# that sets the connection info, parameters and calls VerifyDatabase on the report and subreports and it all works well.

在一个特定的报告中,这不起作用,并且似乎没有验证任何内容,并且报告崩溃并在其中一个子报告中出现错误字段名称未知".使用此报告,如果我在 Crystal Reports 应用程序中针对实时数据库手动验证它,那么一切正常.

In one particular report this doesn't work though and doesn't seem to verify anything and the report crashes with an error 'The field name is not known' in one of the sub reports. With this report if I manually verify it in the Crystal Reports application against the live database then it all works fine.

所以问题是,除了设置连接信息、参数和调用 VerifyDatabase 方法之外,Crystal 应用程序中的验证数据库功能有什么不同我应该在代码中执行的操作吗?

So the question is, is there anything different that Verify Database function in the Crystal application does that I should do in code other than set connection info, parameters and call VerifyDatabase method?

关于我尝试过的更多信息

Some more info on what I tried

  1. 获取实时数据库的备份并将其放到我们的开发环境中.
  2. 根据此数据库手动验证报告(与实时数据库的结构完全相同)
  3. 将报告加载到实时系统并运行.

错误仍然存​​在.

推荐答案

这听起来像是两个版本的 Crystal 及其功能之间的混淆.dotNET 2008 附带的版本是 Crystal Reports Basic for VS2008,伪装成 Crystal 10.5(它不作为独立产品存在).但是,如果您指的是他们在 Visual Studio IDE 之外开发的独立报表,那么这将是一个不同版本的 Crystal,在功能上有一些差异.我想说此报告是在与其他版本不同的 Crystal 版本中创建的,并且代码中的验证遇到​​了 10.5 无法识别的某些功能.如果您有 Crystal 的独立版本(需要是 Crystal Reports 2008 或早期版本的开发人员版本),请使用 this 以确保您在应用程序中使用与中相同的 Crystal 版本在报告开发中.

It sounds like a confusion between two versions of Crystal and their capabilities. The version that comes with dotNET 2008 is Crystal Reports Basic for VS2008, masquerading as Crystal 10.5 (which doesn't exist as a standalone product). But if you're referring to standalone reports developed by themselves outside of the Visual Studio IDE, then this will be a different version of Crystal with some differences in capability. I'd say this report was created in a different version of Crystal to the others, and that the Verify within the code is coming across some feature that 10.5 can't recognise. If you have a standalone version of Crystal (which will need to be either Crystal Reports 2008, or a Developer edition of an earlier version), use this to make sure you're using the same Crystal version in the app as in in report development.

这篇关于水晶报表验证数据库不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

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

相关文档推荐

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子句?)