MS Access MSChart.Graph.8不打印 [英] MS Access MSChart.Graph.8 not printing

查看:203
本文介绍了MS Access MSChart.Graph.8不打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


软件:Microsoft Access 2007 SP2

数据库文件版本:Access 2000


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



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



我认为它必须是图形本身的东西,因为他们有时会丢失所有信息。我必须在编辑模式下打开图形,并将数据源从列更改为行,然后重新返回,以便重绘。 (刷新不能解决这个问题)



现在我甚至不知道在哪里可以看到这些想法。



编辑#1



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


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


主表单的查询是

  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;

图表查询为:

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

查询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;

那么如何来到,在窗体视图中,它显示图表与正确的数据链接时: / p>


子字段:ixTest

主字段:ixTest


但不会打印图形。



如果我删除链接,图表将打印,但是我有所有的数据



编辑#2



这似乎是一个数据检索/打印时出现渲染问题。

解决方案

我有一个类似的问题,一份报告。我创建了一个图表,在一个组,给我一个单独的图表为每个类别(说分部)。图表在报表视图(对于每个部门)和打印预览中都显示良好,但是当我打印到PDF时,只有第一个图形打印。如果我打开报告并转到打印预览,然后打印到PDF,它的工作伟大。如果这是你的问题,你在这里是我的工作:



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

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



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



(2)DoCmd.RunCommand acCmdPrint



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


Software: Microsoft Access 2007 SP2
Database File Version: 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

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.

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?

解决方案

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:

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.

Dim stDocName As String stDocName = "My Reports Name"

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

(2) DoCmd.RunCommand acCmdPrint

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

这篇关于MS Access MSChart.Graph.8不打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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