热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

MSAccessMSChart.Graph.8无法打印-MSAccessMSChart.Graph.8notprinting

Software:MicrosoftAccess2007SP2DatabaseFileVersion:Access2000软件:MicrosoftAccess2007

Software: Microsoft Access 2007 SP2
Database File Version: Access 2000

软件:Microsoft Access 2007 SP2数据库文件版本:Access 2000

I have an access program that I inherited from a previous employee. It uses forms for reports and since I don't have much experience in access I have continued to do this. I have created a copy of the program for another project and modified it to suit.

我有一个访问程序,我从前一个员工继承。它使用报表的形式,因为我没有太多的访问经验,我继续这样做。我为另一个项目创建了一个程序副本并对其进行了修改以适应。

I am having trouble getting more then one chart to print. All the charts display in form view, they all have the same properties (excepting data, position, etc.) For some reason they are not printing. They don't even show up in the print preview.

我无法获得更多的图表来打印。所有图表都显示在表单视图中,它们都具有相同的属性(除了数据,位置等)。由于某些原因,它们不是打印。它们甚至没有出现在打印预览中。

I am thinking it must be something with the graphs themselves as they sometimes lose all information. I have to open the graphs in edit mode and change the data source from column to row and back again so that it gets redrawn. (Refresh doesn't fix it)

我认为它必须与图表本身有关,因为它们有时会丢失所有信息。我必须在编辑模式下打开图形并将数据源从列更改为行再返回,以便重新绘制。 (刷新无法修复)

So right now I don't even have a clue as to where to look so ideas are welcome.

所以现在我甚至都不知道在哪里看,所以欢迎这些想法。

Edit #1

It seems to be a problem with linking to an unbound form.

链接到未绑定的表单似乎是一个问题。

Subform Field Linker: Can't build a link between unbound forms.

子表单字段链接器:无法在未绑定表单之间建立链接。

The query for the main form is

主窗体的查询是

SELECT tTest.ixTest, tMotorTypes.ixMotorType, tMotorTypes.asMotorType, tMotorTypes.fDeprecated, tTestType.asTest, tTest.asSerialNum, tTest.asOrderNum, tTest.asFrameNum, tTest.asRotorNum, tTest.asOperator, tTest.iStation, tTest.dtTestDate, tTest.ixTestType
FROM tMotorTypes 
INNER JOIN (tTestType 
  INNER JOIN tTest ON tTestType.ixTestType=tTest.ixTestType) 
ON tMotorTypes.ixMotorType=tTest.ixMotorType;

The query for the chart is:

图表的查询是:

SELECT qGraphRSTTemperatures.Frequency, qGraphRSTTemperatures.[Drive End], qGraphRSTTemperatures.[Non Drive End], qGraphRSTTemperatures.[Air In], qGraphRSTTemperatures.Core 
FROM qGraphRSTTemperatures 
ORDER BY qGraphRSTTemperatures.ixTemperature;

Query qGraphRSTTemperatures:

SELECT tElectricalData.dblFrequency AS Frequency, tTemperatures.dblDrvEnd AS [Drive End], tTemperatures.dblNonDrvEnd AS [Non Drive End], tTemperatures.dblAirIn AS [Air In], tTemperatures.dblCore AS Core, tSubTest.ixTest, tTemperatures.ixTemperature
FROM (tSubTest INNER JOIN tElectricalData ON tSubTest.ixSubTest = tElectricalData.ixSubTest) 
  LEFT JOIN tTemperatures ON tElectricalData.ixElectrical = tTemperatures.ixElectrical
WHERE (((tSubTest.ixSubTestType)=5))
ORDER BY tSubTest.ixTest, tTemperatures.ixTemperature;

So how come, in the form view it shows the graph with the correct data when linked thus:

那么为什么在表单视图中显示链接时带有正确数据的图形:

Child field: ixTest
Master field: ixTest

子字段:ixTest主字段:ixTest

but won't print the graph.

但不会打印图表。

The graph will print if I remove the links, but then I have all the data from chart query as it is not limited by ixTest.

如果我删除链接,图表将打印,但随后我将获得图表查询中的所有数据,因为它不受ixTest的限制。

edit #2

It seems to be a data retrieval/rendering issue in printing. Is there anything in printing that changes the context of records with respect to parent/child relationships?

它似乎是打印中的数据检索/渲染问题。打印中是否存在更改父/子关系记录上下文的内容?

4 个解决方案

#1


Check the "Display When" Property of the control and make sure it's set to "Always" (if you do it via code then Always is 0).

检查控件的“显示时间”属性并确保将其设置为“始终”(如果通过代码执行,则“始终为0”)。

Some other things to look for would be the "Auto Activate" property. I believe it's set to "double click" by default.

要查找的其他一些内容将是“自动激活”属性。我相信它默认设置为“双击”。

#2


My solution to work around the problem.

我解决问题的解决方案。

I created separate reports with the graphs/charts in them. I just copied & pasted the charts from the forms into the reports and they worked.

我创建了单独的报告,其中包含图表/图表。我只是将表格中的图表复制并粘贴到报告中,然后就可以了。

I didn't want to do it this way as it uses a couple sheets of paper more than before. I am also dissatisfied with this solution as the question of why still remains.

我不想这样做,因为它比以前使用了几张纸。我对这个解决方案也不满意,因为问题仍然存在。

#3


Ran into a similar problem... Reports with graphs were working fine until I had an invalid syntax issue with the report code that I did not catch.

遇到类似问题...带有图表的报告工作正常,直到我的报告代码无法解决语法问题。

apparently the code for the report would not compile correctly, so it did not link up to the graphs and sub reports correctly and I would get the same errors even when manually putting in the link fields.

显然,报告的代码无法正确编译,因此它没有正确链接到图形和子报告,即使手动输入链接字段,我也会得到相同的错误。

My advice would be to check the code on the form or report... then compile the code and fix any problmes. Hope this helps.

我的建议是检查表单或报告上的代码......然后编译代码并修复任何问题。希望这可以帮助。

#4


I have a similar problem with a report. I created a graph that is in a group to give me a separate graph for each category (say divisions). The graphs all display fine in the report view (for each division) and the print preview but when I print to a pdf only the first graph prints. If I open the report and go to the print preview and then print to a PDF it works great. If this is the problem you are having here is my work around:

我的报告有类似的问题。我创建了一个组中的图形,为每个类别(比如分区)提供了一个单独的图表。图表在报告视图(每个分区)和打印预览中都显示正常,但是当我打印到pdf时,只打印第一个图形。如果我打开报告并转到打印预览,然后打印到PDF,它的效果很好。如果这是你遇到的问题,我的工作是:

I used VBA to follow a sequence to solve the problem. When a button is clicked on my main form the following events happen (1)Open the report in print preview (hidden), (2)open the print dialog box, after the PDF has been created the (3)report closes.

我使用VBA按顺序解决问题。当在我的主窗体上单击按钮时,会发生以下事件(1)打印打印预览中的报告(隐藏),(2)打开打印对话框,在创建PDF后(3)报告关闭。

Dim stDocName As String stDocName = "My Reports Name"

Dim stDocName As String stDocName =“我的报告名称”

(1) DoCmd.OpenReport stDocName, acViewPreview, , , acHidden

(1)DoCmd.OpenReport stDocName,acViewPreview ,,, acHidden

(2) DoCmd.RunCommand acCmdPrint

(2)DoCmd.RunCommand acCmdPrint

(3) DoCmd.Close acReport, "My Reports Name"

(3)DoCmd.Close acReport,“我的报告名称”


推荐阅读
  • 本文详细介绍了中央电视台电影频道的节目预告,并通过专业工具分析了其加载方式,确保用户能够获取最准确的电视节目信息。 ... [详细]
  • 优化ListView性能
    本文深入探讨了如何通过多种技术手段优化ListView的性能,包括视图复用、ViewHolder模式、分批加载数据、图片优化及内存管理等。这些方法能够显著提升应用的响应速度和用户体验。 ... [详细]
  • 本文详细介绍了 GWT 中 PopupPanel 类的 onKeyDownPreview 方法,提供了多个代码示例及应用场景,帮助开发者更好地理解和使用该方法。 ... [详细]
  • 深入理解 SQL 视图、存储过程与事务
    本文详细介绍了SQL中的视图、存储过程和事务的概念及应用。视图为用户提供了一种灵活的数据查询方式,存储过程则封装了复杂的SQL逻辑,而事务确保了数据库操作的完整性和一致性。 ... [详细]
  • 前言--页数多了以后需要指定到某一页(只做了功能,样式没有细调)html ... [详细]
  • Python自动化处理:从Word文档提取内容并生成带水印的PDF
    本文介绍如何利用Python实现从特定网站下载Word文档,去除水印并添加自定义水印,最终将文档转换为PDF格式。该方法适用于批量处理和自动化需求。 ... [详细]
  • 作为一名新手,您可能会在初次尝试使用Eclipse进行Struts开发时遇到一些挑战。本文将为您提供详细的指导和解决方案,帮助您克服常见的配置和操作难题。 ... [详细]
  • 本文探讨了 Objective-C 中的一些重要语法特性,包括 goto 语句、块(block)的使用、访问修饰符以及属性管理等。通过实例代码和详细解释,帮助开发者更好地理解和应用这些特性。 ... [详细]
  • 从 .NET 转 Java 的自学之路:IO 流基础篇
    本文详细介绍了 Java 中的 IO 流,包括字节流和字符流的基本概念及其操作方式。探讨了如何处理不同类型的文件数据,并结合编码机制确保字符数据的正确读写。同时,文中还涵盖了装饰设计模式的应用,以及多种常见的 IO 操作实例。 ... [详细]
  • 使用GDI的一些AIP函数我们可以轻易的绘制出简 ... [详细]
  • Windows服务与数据库交互问题解析
    本文探讨了在Windows 10(64位)环境下开发的Windows服务,旨在定期向本地MS SQL Server (v.11)插入记录。尽管服务已成功安装并运行,但记录并未正确插入。我们将详细分析可能的原因及解决方案。 ... [详细]
  • 本文介绍了在使用Visual Studio 2015进行项目开发时,遇到类向导弹出“异常来自 HRESULT:0x8CE0000B”错误的解决方案。通过具体步骤和实践经验,帮助开发者快速排查并解决问题。 ... [详细]
  • 题目描述:给定n个半开区间[a, b),要求使用两个互不重叠的记录器,求最多可以记录多少个区间。解决方案采用贪心算法,通过排序和遍历实现最优解。 ... [详细]
  • 本文将介绍由密歇根大学Charles Severance教授主讲的顶级Python入门系列课程,该课程广受好评,被誉为Python学习的最佳选择。通过生动有趣的教学方式,帮助初学者轻松掌握编程基础。 ... [详细]
  • 本文详细介绍了如何通过多种编程语言(如PHP、JSP)实现网站与MySQL数据库的连接,包括创建数据库、表的基本操作,以及数据的读取和写入方法。 ... [详细]
author-avatar
雪灵女子_826
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有