Access 2003 报表的计算字段在导出到 xls 文件时不会出现,但会出现在 csv 上

发布于 2024-10-21 02:44:34 字数 338 浏览 1 评论 0原文

我在 Access 2003 上创建了多个报告。

其中的一些字段(例如“总花费时间”)是根据从数据库中获取的报告中的其他字段计算的。 TotalSpentTime 文本框的“控制源”属性设置为“=Sum([NumberOfHours])”。

该报告在屏幕上显示时看起来不错,但每当我尝试将其导出到 xls 文件(无论是 Ms Excel 5-7 或 Excel 2003 格式)时,计算字段都不会导出。

这很有趣,因为当我将其导出到 csv 时,我想要在 xls 文件中包含的相同计算字段也存在。

我在网上找不到任何可以帮助的东西。

有什么方法可以将计算字段导出到 xls 文件吗?

I created several reports on Access 2003.

Some of their fields such as "Total spent time" are calculated based on other fields in the report that are being fetched from the database.
The TotalSpentTime textbox has the Control Source property set to "=Sum([NumberOfHours])".

The report looks alright when shown on screen, but whenever I try to export it to a xls file (be it in the Ms Excel 5-7 or Excel 2003 formats), the calculated fields aren't exported.

It's funny because the same calculated fields that I wanted to be in the xls file are there when I export it to csv.

I coudln't find anything that could help on the web.

Is there any way to get the calculated fields to be exported to a xls file?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

乖乖兔^ω^ 2024-10-28 02:44:34

我认为您必须更改查询,以便在查询内执行求和。据我了解,表单级求和是在报表格式化期间完成的,而当您将报表导出到 Excel 时,不会执行这些求和。

如果您进行一些 Google 搜索,您会发现这个问题偶尔会被问到,但我无法从 Microsoft 或 Microsoft MVP 那里找到任何权威答案。

这是一个类似的问题,得出了相同的结论:
http://www.utteraccess.com/forum/export-calculated-value -t1523613.html

I think you'll have to change your query so that your sums are performed inside the query. It's my understanding that form-level sums are done during the formatting of the report and these sums are not performed when you export a report to Excel.

If you do some Google searching you'll see that this question is occasionally asked but I've been unable to find any authoritative answer from Microsoft or a Microsoft MVP.

Here's a similar question that came to the same conclusion:
http://www.utteraccess.com/forum/export-calculated-value-t1523613.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文