2011-02-08 93 views
0

从我们的应用程序中打印报告时出现问题。在Crystal Reports 2008中避免缩放

我们希望避免Crystal Reports 2008中的打印功能自动缩放报表,以便将完整的报表内容放入特定打印机的可打印区域。

前身Crystal报表11没有规模东西,这就是我们要达到的水晶哪些报告2008

可悲的是下面的代码会抛出一个异常:

Dim layout As New CrystalDecisions.Shared.PrintLayoutSettings 

'Disable scaling, does not work 
layout.Scaling = PrintLayoutSettings.PrintScaling.DoNotScale 

crystalReport.PrintToPrinter(printerSettings:=printerSettings, 
          pageSettings:=pageSettings, 
          reformatReportPageSettings:=False, 
          layoutSettings:=layout) 

有趣的是,SAP Crystal报表查看器2008年打印报告正确,没有缩放,所以我们猜测功能存在。

+0

您是否应用了最新的修补程序和/或Service Pack? – craig 2011-02-19 15:37:38

+0

你会得到什么样的异常(NotImplemented)? – 2011-02-20 02:36:51

回答

1

您是否尝试过此设置?

crystalReport.PrintOptions.DissociatePageSizeAndPrinterPaperSize 
1

您是否尝试过设置此注册表项?

HKEY_LOCAL_MACHINE\SOFTWARE\BusinessObjects\Suite12.0\CrystalReports\DesignerOptions 

"DealWithMinimalMarginsWhenPrinting"="0" 

SAP forum。没有为我们工作,但我们正在使用2010年的CR。

根据this它可能不可能。目前唯一的解决方法是将页边距设置为可打印区域。可能不适合你。

-1

在我们的例子中,我们使用自定义纸张尺寸(8.27x8.75),在水晶报表查看器中,缩放和中心设置灰显,如上面问题所述设置为True。通过在打印机属性(客户纸张)中添加我们的自定义纸张尺寸,问题已得到解决。