1

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) Show next / prev/first /last page of report

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

3) Export to pdf

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

enter image description here

Gullu
  • 3,477
  • 7
  • 43
  • 70
  • Yes. I resolved this problem in WinWorms, http://stackoverflow.com/questions/114733/reportviewer-modify-toolbar/30645044#30645044. – lison Jun 04 '15 at 13:29

1 Answers1

1

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

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

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

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

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

Tae-Sung Shin
  • 20,215
  • 33
  • 138
  • 240
  • i see options to hide show buttons on the toolbar. But how to hide the whole toolbar and say show the print dialog or do an export of the current report on a click of my own button.. thanks – Gullu Aug 01 '11 at 23:39
  • There is ShowToolbar property as well. As for print dialog or export, you need to use LocalReport properties. I will add more reference to answer above – Tae-Sung Shin Aug 01 '11 at 23:54
  • Taesung. Thanks dude. I did not know msdn had a dedicated forum just to answer questions on the report viewer and other related controls like the chart control. These days I have been using stack overflow so much that I totally forgot good old technet/msdn forums that exist since pre stackoverflow days. – Gullu Aug 02 '11 at 01:03
  • First link is dead – Maxter Mar 19 '19 at 19:35