在报表查看器中显示项目,但在打印时隐藏

发布于 2024-08-22 16:08:05 字数 193 浏览 3 评论 0原文

我正在使用报告查看器来显示和打印身份证。身份证上预先印有“姓名、性别”等文字,我只需在该标签附近的卡间隙中打印即可。

我想在报表查看器中显示预打印的图像和文本框,但我不想打印这些项目,而只想打印间隙中的信息。

我怎样才能实现它?我可以在打印时隐藏某些元素或设置一些“thisIsNotPrintable”魔法属性吗?

谢谢。

I'm using a reportviewer to show and print an id Card. The id Card is pre-printed with the texts "Name, Surname, Gender"...etc and I only need to print in the gaps of the card near this labels.

I want to show this Images and Textboxes preprinted in the reportviewer, but I do not want to print this items, but only the info in the gaps.

How can I achieve it? Can I hide some elements when printing or set some "thisIsNotPrintable" magic property?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

指尖微凉心微凉 2024-08-29 16:08:05

不幸的是,如果您正在谈论 SQL Report Viewer Control,那么恐怕这是不可能的。

这是我关于该主题的问题

解决方案之一是您构建另一个用于打印的报告,并在第一个报告中添加指向该报告的链接以供显示。如果您使用 WIN Forms,您还可以将第二份报告直接发送到打印机。

If You are talking about SQL Report Viewer Control unfortunately, I am afraid that is not possibility.

Here is my SO question on that subject .

One of solutions are that You build another report for printing and add link to that report inside first report for showing. If you are using WIN Forms you can also send second report directly to printer.

蒗幽 2024-08-29 16:08:05

晚了,但有一个解决方案。您可以向报表添加参数,并在打印事件中更改参数值并刷新报表 (ReportViewer1.RefreshReport())

Late, but there are one solution. You can add a parameter to the report and in the Print event, change the parameter value and refresh the report (ReportViewer1.RefreshReport())

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文