使用C#禁用MS Report Viewer中的“打印布局"按钮 [英] Disable the Print Layout Button in MS Report Viewer using C#
本文介绍了使用C#禁用MS Report Viewer中的“打印布局"按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道如何使用C#在MS Report Viewer中禁用打印布局"按钮.
有人可以帮我吗?
谢谢,
ParvathySunu
Hi,
I want to know how to disable the Print Layout Button in MS Report Viewer using C#.
Can anybody help me?
Thanks,
ParvathySunu
推荐答案
如果您允许使用表单上的按钮打印报表,则以下行可以隐藏打印布局按钮",但要以隐藏打印按钮为代价隐藏页面设置按钮.
Incase you are allowing printing of the report using a button on form, the following line can hide Print Layout Button at the cost of hiding print button as well as hiding page setup button.
reportViewer1.ShowPrintButton = false;
所有这些按钮(即打印"按钮,页面设置"和打印布局"按钮)都分组在ShowPrintButton的属性下.
希望获得帮助.
All these buttons i.e. Print Button, Page Setup and Print Layout buttons are grouped under property of ShowPrintButton.
Hope this help.
我不确定,但是您可以通过修改^ ],
如果您无法获得成功,我敢肯定这 [ ^ ]帮助您.
谢谢.
I am not sure but you can do it by modifying RsServer Configuration File[^],
In case you are not getting success with that I am sure THIS[^] may help you.
Thanks.
您可以在chrome中查看,右键单击它,转到检查元素",获取为其生成的ID(如果有)
那么在c#中,您可以在文档代码中使用find元素并将属性设置为禁用,或者执行.visible = false;
ya could view in chrome, right click it, go to ''inspect element'', get the ID generated for it (if any)
then in c# ya could use the find element in document code and set the attribute disabled, or do .visible = false;
这篇关于使用C#禁用MS Report Viewer中的“打印布局"按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文