.net reportviewer控件可以完全只用代码操作吗(即去掉工具栏) [英] Can the .net reportviewer control be fully operated by code only (ie., minus the toolbar)

查看:34
本文介绍了.net reportviewer控件可以完全只用代码操作吗(即去掉工具栏)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

刚刚开始使用报表查看器控件的基于触摸屏的项目.我显然会为报告导航、导出为 pdf 等放置我自己的大按钮,因为即使是手指细小的人也很难点击此控件附带的现成工具栏(请参见下面的屏幕截图).我可以从代码中完成所有这些

Just started on a touchscreen based project that uses the reportviewer control. I will obviously be putting my own big buttons for report navigation , export to pdf etc since even people with tiny fingers will have a hard time clicking the out of box toolbar that comes with this control (see below screenshot). Can I do all of this from code

1) 显示报告的下一页/上一页/第一页/最后一页

1) Show next / prev/first /last page of report

2) 显示打印对话框/页面设置对话框/打印布局

2) Show print dialog/page setup dialog/print layout

3) 导出为 pdf

这就是我们现在所需要的.同时,我正在浏览 msdn 示例.还没有找到任何代码来完成显示的工具栏所做的所有事情.谢谢

Thats all we need for now. I am going thru the msdn samples meanwhile. Not yet found any code to do all that the toolbar shown does. thank you

推荐答案

是的,你可以.假设您的应用程序是 Windows 应用程序,请参阅 ReportViewer 的 ShowXXXXX 属性.

Yes, you can. Assuming your application is Windows app, refer to ShowXXXXX properties of ReportViewer.

http://msdn.microsoft.com/en-us/library/microsoft.reporting.winforms.reportviewer_properties%28v=VS.80%29.aspx

导出:http://social.msdn.microsoft.com/Forums/en/vsreportcontrols/thread/7a2ffdd4-8e25-43f1-863d-505941968b77

印刷:http://social.msdn.microsoft.com/forums/en-US/vsreportcontrols/thread/9f52d79d-5baf-4e84-97d5-7dbba6623b89

更新:由于 MS 删除了 reportviewer 的文档(上面的第一个链接),以下可能是替代方法.

Update: As MS has deleted documentation of reportviewer (the first link above), following might be an alternative.

https://docs.microsoft.com/en-us/sql/reporting-services/application-integration/using-the-winforms-reportviewer-control?view=sql-server-2017

这篇关于.net reportviewer控件可以完全只用代码操作吗(即去掉工具栏)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆