SAP Knowledge Base Article - Public

2196829 - ER - Enable ability to set Destination and Type properties to print and export the current tab selected in the CrystalDecisions.Windows.Forms.CrystalReportViewer control

Symptom

We need to be able to print and export the current tab selected in the CrystalDecisions.Windows.Forms.CrystalReportViewer control.

Currently the only way to do this is to do so from the Viewer itself and it prompts for destination and type every time by setting this property:

crystalReportViewer1.ExportReport(); Or from the Viewer itself from the tab wanting to print or export.

Enhancement Request is to allow setting the output type and destination, Exporting and Printing, in code so no user interaction is required.

Environment

  • Crystal Reports for Visual Studio 2010 and above
  • Windows desktop application only

Reproducing the Issue

Write an application that replaces the Print and Export buttons in the viewer control...then try to have the retrieved settings supplied by the user apply to the relative functions for just the selected tab.

Resolution

This ER has been assigned to R&D who are currently looking into this enhancement request.

This Enhancement Request is now available in SP 16.

NOTE: This works when using the Print or Export buttons in the Viewer. Exporting using PrintOutputController exports all pages after the drilled down page so you must set the page range to 1

Keywords

CR for VS, Export current Tab, Print Current tab, crystalreportviewer tab, .net , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio