如何将备忘录字段流向报表中的其他页面? [英] How to flow a memo field to another page in a report?

查看:66
本文介绍了如何将备忘录字段流向报表中的其他页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的报告包含3个备注字段,文本字段和日期字段。我希望报告要做的是打印3个备忘录字段(排列为并排列),根据需要在页面之间流动它们,并在页面页脚中打印文本和日期字段。


我在页面页脚中有文本/日期字段,但它们只在报告的最后一页打印,而不是在每页打印。另外(实际上是一个更大的问题),即使我有 CanGrow CanShrink 设置为,并且备注字段的大小设置为高度在大约3个文本行中,备忘录字段似乎坚持打印它们的整个长度。我认为这就是为什么我的页脚没有打印在每页底部的原因。或者更确切地说,在页面底部打印,但页面长3-4页。


我假设备忘录字段的行为类似于Word中的表格单元格;即,他们将能够打破 (用Word的说法)跨页面,但没有?

解决方案

嗨Sueb。访问备注字段的行为与Word字段不同,据我所知,无法设置为从一个页面流向另一个页面。


您可以使用Word本身来执行您需要的操作,在Access的程序控制下。 Word将成为Access的自动化服务器,在VBA控制下启动。

使用Word写入预先设置并预先存储的预定义报告模板的学习曲线是不幸的是相当陡峭。您可能需要在MSDN上查找示例,或者更容易,按照使用VBA的Access自动化书籍中的示例(例如Getz和Glibert的VBA开发人员手册)。


一个非常这个主题的基本介绍从MSDN链接到这里。它给出了涉及的内容的味道。 http://support.microsoft.com/kb/184974


MSDN关于如何写入Word表的更复杂的例子说明了所涉及的复杂性。 http://msdn.microsoft.com /en-us/libr...ffice.11​​).aspx


-Stewart


感谢您的建议和这些链接,斯图尔特罗斯!


你是对的,这有点令人生畏。然而,阅读这些文章给了我一个想法,我希望你能够接受它:如果我将5个数据字段(一次只能记录一次)输出到Excel,该怎么办?并使用Word的合并功能来格式化报告?您认为备忘录字段是否会正确导出?


导出到Excel应该可以正常工作,只要从Access导出最新版本的Excel - 早期版本限制了字符数一个单元格到255,这对你想做的事情没用。


也可以直接邮件合并Word和Access作为它的数据源 - 这是一个选项你来自Word的mailmerge。如果我没记错的话,我认为数据可能需要在Access表中才能正常工作 - 我认为它不会连接到用于mailmerge目的的Access查询。


-Stewart

I have a report that comprises 3 memo fields, a text field, and a date field. What I want the report to do is to print the 3 memo fields (which are arranged as side-by-side columns), flowing them as necessary from page to page, and, in the page footer, print the text and the date fields.

I have the text/date fields in the page footer, but they print only on the last page of the report, not on each page. Also (and actually a bigger problem), even though I have CanGrow and CanShrink set to Yes, and the memo fields are sized to the height of about 3 text lines, the memo fields seem to insist on printing their entire length. I assume this is why my page footer isn''t printing at the bottom of each page. Or, rather, that it is printing at the bottom of the page, but the page is 3-4 pages long.

I had assumed that the memo fields would behave sort of like table cells in Word; i.e., that they would be able to "break" (in Word''s parlance) across pages, but no?

解决方案

Hi Sueb. Access memo fields do not behave like Word fields, and as far as I know cannot be set to flow from one page to another.

You could use Word itself to do what you require, under programmed control from Access. Word would be an automation server for Access, started under VBA control.

The learning curve to use Word to write to a pre-defined report template that you set up and store in advance is unfortunately fairly steep. You may need to look up examples on MSDN or, perhaps easier, follow examples in books on Access automation using VBA (such as the VBA Developers Handbook by Getz and Glibert).

A very basic introduction to this topic is linked here from MSDN. It gives a flavour of what is involved. http://support.microsoft.com/kb/184974

A more complex example from MSDN on how to write to Word tables illustrates the complexity involved. http://msdn.microsoft.com/en-us/libr...ffice.11).aspx

-Stewart


Thanks for this advice and these links, Stewart Ross!

You''re right, this is a bit daunting. Reading through these articles, however, gave me an idea, and I''d like your take on it: what if I export the 5 data fields (a single record is all I would ever be working with at a time) to Excel, and use Word''s Merge capabilities to format the report? Do you think a memo field will export properly?


Exporting to Excel should work fine, as long as you export from Access for the latest versions of Excel - earlier version limited the number of characters in a cell to 255, which would be useless for what you want to do.

It would also be possible to mail merge Word directly with Access as its data source - this is an option you have from Word''s mailmerge. I think the data may need to be in an Access table for this to work if I remember correctly - I don''t think it will connect to an Access query for mailmerge purposes.

-Stewart


这篇关于如何将备忘录字段流向报表中的其他页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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