0

我有几个 Crystal Reports XI Release 2 报表,它们是 COM InteropForm 应用程序的一部分,它包含在 VB6 应用程序中。这两个报告都显示 SQL Server 数据库中 DateTime 字段中的日期。他们在过去 3 年左右的时间里工作得很好。

现在我的任务是显示数据的时间部分。我已经在 CR 11 R 2 设计器中打开了两个 .rpt 文件,并且正在查看格式编辑器。在“日期”选项卡下,我看不到任何会同时显示数据日期和时间的内容。(除非它是系统默认长格式,但我不确定每个用户的机器上是什么。事实上,坦率地说,我不知道如何在我自己的机器上检查它,这是一个 Windows安装了 SP3 的 XP Pro 机器。)无论如何,我已经查看了自定义样式,但我还是没有看到任何可以让我显示数据库中 DateTime 字段的时间部分的内容。如何从数据库的 DateTime 字段中同时显示日期和时间?

4

2 回答 2

1

You should see quite a few options. If your view looks anything like this attached picture, then you're good to go.

If you only see a bunch of formats for numbers, then the date is not stored in the correct format. This is easily fixed by making a custom formula converting the field to a datetime and then displaying that new formula field instead of the original.

Format Editor

于 2010-11-16T17:40:41.030 回答
0

报告选项中有一个选项(至少对于 CR9,CR XI 中也应如此),您可以在其中选择如何处理日期时间字段 - 日期、时间或日期时间。从那里选择 DateTime 并重新检查您的字段格式。

警告 - 之后您无法将该值恢复为 Date :)

于 2010-11-16T18:50:31.340 回答