Access 2003 报表的计算字段在导出到 xls 文件时不会出现,但会出现在 csv 上
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您必须更改查询,以便在查询内执行求和。据我了解,表单级求和是在报表格式化期间完成的,而当您将报表导出到 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