Crystal Reports打印问题 [英] Crystal Reports Printing Problem

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

问题描述

你好,

我有一个非常奇怪的问题,用水晶报告打印,我会尽力解释。首先我使用的是visual studio 2010 pro。安装了测试版的水晶报告。请注意,虽然在开发计算机和客户端计算机上使用CrystalDecisions.CrystalReports.Engine v2.0.50727,2005年的问题也出现了
。我有一个非常基本的报告,它使用两个参数字段和两个硬编码文本对象。而已!非常基本的。用于创建
报告并设置参数和打印选项的代码为:

I'm having a very strange problem printing with crystal reports that I will try to explain the best I can. First I am using visual studio 2010 pro. with the beta version of crystal reports installed. Please note though that this problem was also occuring in vs 2005 using CrystalDecisions.CrystalReports.Engine v2.0.50727 on both the development machine and the client machine. I have a very basic report that is using two parameter fields and two hard coded text objects. Thats it! Very basic. The code for creating the report and setting the parameters and print options is:

          if(billToOnly == true)

          {tmpReport.Load(appDirectory +" \\Reports\\rptPrePrints.rpt " ); }
          else {tmpReport.Load(appDirectory +" \\Reports\\rptPrePrints2.rpt " ); }

          if (billToOnly == true)
          { tmpReport.Load(appDirectory + "\\Reports\\rptPrePrints.rpt"); }
          else { tmpReport.Load(appDirectory + "\\Reports\\rptPrePrints2.rpt"); }

          //获取发货人编号为
          long shipperNumber = m_Link.AssignShipperNumber();

          // Get a shipper number
          long shipperNumber = m_Link.AssignShipperNumber();

          //设置报告的发货人编号

          tmpReport.SetParameterValue(" BillToName",address.DisplayAddressWithPhoneNumber);

          tmpReport.SetParameterValue(" ShipperNumber",shipperNumber);

          tmpReport.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA5;

          tmpReport.PrintOptions.DissociatePageSizeAndPrinterPaperSize = false;

          // Set the shipper number for the report
          tmpReport.SetParameterValue("BillToName", address.DisplayAddressWithPhoneNumber);
          tmpReport.SetParameterValue("ShipperNumber", shipperNumber);
          tmpReport.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA5;
          tmpReport.PrintOptions.DissociatePageSizeAndPrinterPaperSize = false;

一切正常,除了每个报表对象,参数对象或文本对象,无论是单行还是多行对象,文本都是对象的顶行仅打印文本的下半部分。上半部分被切断。
现在,如果它是多行对象,例如:

Everything works fine except for each report object, Parameter object or Text object, regardless if it a single line or a multi-line object, the text of the top line of the object is only printing the bottom half of the text. The top half is cut off. Now if it is a multi-line object such as:

ABC公司

123 Maple Street

123 Maple Street

某处,MI  48000

Somewhere, MI  48000

ABC公司的上半部分被切断。您只能看到下半部分并且地址的其余部分正确打印。

The top half of ABC Company is cut off. You only see the bottom half and the rest of the address prints correctly.

这也发生在Crystal Reports PrintViewer控件中,并且几乎发生在我的所有报告中。

This is also happening in the Crystal Reports PrintViewer control as well and occurring with pretty much all my reports.

在VS2005下创建的旧版本的运行时中,这是一个随机问题,当它发生时,我们可以关闭程序,重新启动它并再次打印,它将正确打印。在较新版本中,这种情况每次都会发生。

In the runtime of the older version created under VS2005 this was a random problem that when it occurred we could close the program down, restart it and do another print and it would print correctly. In the newer version this is happening every time.

请注意我正在打印到Epson点阵式打印机并尝试使用打印选项,报告选项,移动的所有设置物体略微偏离边缘。换句话说,他们没有设置为零(0)。在我打印到的任何打印机上也会出现
。我可以提供这个问题的图片,但我想我无法将其附加到此。

Please note that I am printing to an Epson dot matrix printer and have tried playing with all the settings for the print options, report options, moving the objects slightly off of the edge. In other words so they're not setting on zero (0). This also occurs on any printer I print to. I can provide a picture of this problem but I guess I can't attach it to this.

我很感激任何人都可以提供帮助。

I would appreciate any help anyone can provide.

谢谢

推荐答案

检查属性是否可以增加以容纳所有这些项目的内容

check the property can increase to accomodate content for all those items

问题将得到解决。


这篇关于Crystal Reports打印问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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