问题描述
我有一个C#2010应用程序,其中包含使用Crystal Reports for VS2010创建的报表。
I have a C# 2010 application which contains reports created with Crystal Reports for VS2010.
对于其中一个报告,可以选择将报告打印或通过电子邮件发送给某人[导出并通过SMTP发送]。
For one of the reports, there is the option to print the report or e-mail it to someone [export and send via SMTP].
我希望在查看报告以及通过电子邮件发送时显示水印。我不希望它在打印时显示,因为它将被打印在带水印的页面上。
I want the watermark to be shown when viewing the report and also when e-mailing it. I do not want it to be shown when it is printed since it will be printed on watermarked page.
我想知道如何在水印中更改水印的可见性。窗体,该窗体以编程方式[不在运行时中]包含crystalReportViewer,因此在打印时也不会打印水印。
I would like to know how I can change the watermark visibility in the form which contains the crystalReportViewer programmatically [not on runtime], so that when printing, it doesn't print the watermark too.
推荐答案
- 创建布尔参数(
{?显示水印}
) - 添加
否({?Show Watermark})
到图像或包含图像的部分的条件公式 - 以编程方式设置参数的值。
- Create a boolean parameter (
{?Show Watermark}
) - Add
Not({?Show Watermark})
to the conditional formula of the image or the section that contains the image - Set the value of the parameter programatically.
这篇关于以编程方式更改Crystal Reports对象的可见性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!