VB6、ActiveReports 和 Ricoh 打印机:旋转页面?
我有一个用 VB6 编写的程序。它使用 ActiveReports 生成信件。
报告被循环处理;带有语言构建循环和(一大堆)嵌套的“if”和“case”语句。丑陋!
报告像这样发送到打印机:
Function PrintIt(ltrobj as Object)
Set ltrobj = MyARdocument '(.Dsr file)
ltrobj.txtfield1 = strVerbage 'This string was populated somewhere else
ltrobj.Printer.DisplayProgressDialog = False
ltrobj.PrintReport False
End Function
现在这是奇怪的部分:从打印机中物理出来的页面在每次循环迭代时都会旋转 90 度。更奇怪的是 -- 这只发生在我的 VB6 应用程序中 -- 其他 Word 文档、报告、批处理作业,无论结果如何都正常。
所以第一页像平常一样出现,标题在前(指向北)。第二页横向出现(页眉指向西)。第三个像第一个一样从打印机中出来,第四个像第二个一样从打印机中出来,等等……
打印机:Ricoh Aficio MP5000
我在打印机上找不到设置,或者在 ActiveReports 中找到控制此设置的属性。
任何想法、帮助或总体方向将不胜感激!
谢谢,
杰森
I have a BEAST of a program written in VB6. It uses ActiveReports to generate letters.
The reports are processed in a loop; with verbage-building loops and (a whole lotta) nested 'if' and 'case' statements. Fugly!
The reports are sent to the printer like such:
Function PrintIt(ltrobj as Object)
Set ltrobj = MyARdocument '(.Dsr file)
ltrobj.txtfield1 = strVerbage 'This string was populated somewhere else
ltrobj.Printer.DisplayProgressDialog = False
ltrobj.PrintReport False
End Function
Now here's the weird part: The pages physically come out of the printer rotated 90 degrees each iteration of the loop. What's even weirder -- this only happens for my VB6 application -- other Word documents, reports, batch jobs, whatever come out normal.
So the first page comes out like normal, the header first (pointing North). The second page comes out sideways (header pointing West). The third comes out of the printer like the first, the fourth comes out like the second, and on and on...
The printer: A Ricoh Aficio MP5000
I cannot find a setting on the printer, or a property in ActiveReports that controls this.
Any ideas, help, or a general direction would be greatly appreciated!
Thanks,
Jason
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ActiveReports 中没有“旋转”设置。可能影响这一点的最接近的因素是页面大小和方向,但最坏的情况是我希望它们来回翻转而不是实际旋转页面。我会尝试做几件事:
要跟踪页面设置,您应该在几个地方执行此操作。一个在打印机上,另一个在报告的每一页(或画布)上。还有可能相关的 ActiveReport.PrintWidth(报表的宽度,而不是页面的宽度)。因此,在打印每个报告之前,请尝试找出以下值:
顺便说一句:ActiveReports COM 帮助位于 此处< /a>.
如果预览/PDF 测试看起来不错,那么我会专注于打印机本身。显然,打印到另一台打印机也是如此。否则,请关注 ActiveReports 设置。
希望这有帮助
There is no "rotation" setting in ActiveReports. The closest things that might impact this would be the page size and orientation, but at worst I would expect them to flip back and forth not actually rotate the page. I would try to do a few things:
To trace page settings you should do it in a couple places. One on the printer, and another on each page (or Canvas) in the report. There is also the ActiveReport.PrintWidth (the width of the report, not the pages) that may also be relevant. So just before printing each report try tracing out the following values:
BTW: ActiveReports COM Help is here.
If the preview/PDF test seems okay then I'd focus on the printer itself. Same for the print to another printer obviously. Otherwise, focus on ActiveReports settings.
Hope this helps