IvyChart对象已添加到新创建的报表中,并干扰了版本控制 [英] IvyChart object added to newly created reports and interferring with version control

查看:78
本文介绍了IvyChart对象已添加到新创建的报表中,并干扰了版本控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用类似于此答案中使用SaveAsText的版本控制和更新解决方案.和LoadFromText来管理增量更新.

I'm using a version control and update solution similar to the one described in this answer that uses SaveAsText and LoadFromText to manage incremental updates.

但是,最近加载在不同计算机上使用SaveAsText创建的使用LoadFromText保存的报告时出现了问题.我将此问题归结为以下问题:

However, a problem arose recently when loading reports saved using LoadFromText that had been created using SaveAsText on different computers. I tracked this problem down to the following issue:

MCVE

在PC 1上:

  1. 创建一个新数据库
  2. 使用功能区 Create ,然后单击 Table 按钮
  3. ,在该数据库中创建一个表.
  4. 关闭并保存该表
  5. 通过选择表格并按 Create ,然后按 Report
  6. 来创建报告.
  7. 关闭并保存报告
  8. 在立即窗口中,执行SaveAsText acReport, "Table1", "C:\SomePath\Report.txt"
  1. Create a new database
  2. Create a table in that database using the ribbon Create, then Table button
  3. Close and save that table
  4. Create a report by selecting the table, and pressing Create, and then Report
  5. Close and save the report
  6. In the immediate window, execute SaveAsText acReport, "Table1", "C:\SomePath\Report.txt"

在PC 2上:

  1. 创建一个新数据库
  2. 在立即窗口中,执行LoadFromText acReport, "Table1", "C:\SomePath\Report.txt"
  3. 我收到一个通用错误,在数据库位置创建了一个名为 error.txt 的文件,并在其中指出 Expected:对象名.观察到:IvyChart .
  1. Create a new database
  2. In the immediate window, execute LoadFromText acReport, "Table1", "C:\SomePath\Report.txt"
  3. I receive a generic error, a file called error.txt is created at the database location, and in it, it says Expected: object name. Observed: IvyChart.

更多观察结果:

文本文件 Report.txt 大约为100 KB(以前基于小表导出的报告大约为40 KB).

The text file Report.txt is approximately 100 KB (previous exports of reports based on small tables were around 40 KB).

在report.txt文件中,您可以找到包含以下内容的报告:

In the report.txt file, you can find the report contains:

  • BoundObjectFrame
  • 图表
  • UnboundObjectFrame
  • 一个CustomControl
  • 一个WebBrowser
  • 一个NavigationControl
  • 具有以下属性的IvyChart:

  • A BoundObjectFrame
  • A Chart
  • An UnboundObjectFrame
  • A CustomControl
  • A WebBrowser
  • A NavigationControl
  • An IvyChart with the following properties:

UnknownProp = {48 ,329 ,2 ,1 ,1 } Begin
    0x00
End
UnknownProp = {49 ,11 ,2 ,1 ,1 } Begin
    0x00
End
UnknownProp = {98 ,150 ,3 ,4 ,2 } Begin
    0xb811
End
UnknownProp = {99 ,44 ,3 ,4 ,2 } Begin
    0x130b
End
UnknownProp = {260 ,462 ,4 ,4 ,4 } Begin
    0x27000080
End
UnknownProp = {295 ,616 ,4 ,0 ,4 } Begin
    0x01000000
End
UnknownProp = {300 ,756 ,10 ,4 ,22 } Begin
    0x4300680061007200740020005400690074006c006500
End

其他控件都没有这些 UnknownProp 属性.

None of the other controls have these UnknownProp properties.

当我在PC 2上使用相同的步骤创建报告时,所有这些控件都不会显示.

When I create the report on PC 2, using the same steps, all these controls don't show up.

所有这些控件在报表本身上都不可见.从具有Office 2016(365)1803版的计算机中导出并在较旧版本的Office 2016中导入时,该问题主要表现出来.

All these controls are not visible on the report itself. The problem mainly manifests when exporting from a computer with Office 2016 (365) version 1803, and importing in an older version of Office 2016

Access没有使用任何加载项,COM或其他方式.空白数据库会发生这种情况,因此只能使用默认引用.

Access is not using any add-ins, COM or otherwise. This occurs with blank databases, so only using the default references.

有人知道这个IvyChart对象是什么,为什么它存在于所有基于现有对象的新创建的报表上,以及为什么所有其他这些看似随机的不可见控件都附带了呢?

Has anyone got any idea what this IvyChart object is, why it's on all newly created reports based on existing objects, and why all these other seemingly random invisible controls come with it?

我可以停止Access将这些不可见的控件添加到新报表中吗?

Can I stop Access adding these invisible controls to new reports?

搜索IvyChart或咨询其他资源根本没有带来任何见识.

Googling IvyChart or consulting other resources has brought no insight at all.

我只能在PC 2上打开数据库,然后从那里使用SaveAsText.但是,如果我这样做,就不会出现怪异的控件,但是文本文件中充满了这样的行:

I can just open the database on PC 2 and use SaveAsText from there. However, if I do that, the weird controls aren't there but text file is full of lines like this:

Begin
End

这使得在任何计算机上导入文本文件都无效.

This makes importing the text file invalid on any computer.

我现在的解决方法是在基于对象创建新报表时,选择所有控件,将所有控件(使用ctrl + A)复制到空白报表中,然后保存该报表.可以复制的事实以及这些隐藏的控件会导致错误的事实没有被复制,这对我来说也有些无聊.

My workaround for now is when creating a new report based on an object, to select all controls, copy all controls (using ctrl + A) to a blank report, and then save the report. The fact that this works, and these hidden controls causing errors aren't copied, also feels a bit iffy to me.

推荐答案

IvyChart是O365中添加的新Chart控件类型的内部控件名称. Office 2016不支持此控件类型,因此在尝试从表单或包含这些表单的报表加载LoadFromText时会出现错误.

IvyChart is the internal control name for the new Chart control type that was added in O365. Office 2016 does not support this control type, so you get an error when trying to LoadFromText a form or report that contains them.

请注意,2016 Access仍然可以打开这些表单/报告,但不会显示图表.

Note that 2016 Access can still open these forms/reports, but will not display the chart.

如果要使用新图表,则需要使用Office 365或Office 2019.

If you want to use the new charts, you need to use Office 365, or Office 2019.

这篇关于IvyChart对象已添加到新创建的报表中,并干扰了版本控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆