开发者

Show items in a reportviewer, but hide when printing

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 elemen开发者_StackOverflow中文版ts when printing or set some "thisIsNotPrintable" magic property?

Thanks.


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.


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())

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜