Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3316

Re: How to create new button in button bar of SAP crystal report viewer by WPF Visual studio 2013 C#?

$
0
0

I'm not sure if you will have any luck finding that KBA so here is a copy / paste:

 

Symptom

  • Exporting from the Windows Viewer does not prompt for the various Export options as it does in Crystal Reports Designer.
  • Exporting from the Windows Viewer does not allow users to select the output file type destination as Application, only allows to save to disk.
  • Is there a sample application that demonstrates how to manage this in the Windows .NET Viewer.

 

Environment

Crystal Reports for Visual Studio 2010

 

 

Cause

There is no Export Button Click Event to capture.

 

 

Resolution

 

 

  1. When Designing reports select the menu File -> Export -> Report Export options

     

  2. Chose the first format you wish to use and set all properties as required or desired.

  3. Do this for each format option.

  4. Save the report, these default export properties are now saved in the rpt file and will be used the next time the report is exported using the Default Export button of the Viewer.

  5. See the attached sample application that replaces the Crystal Report Viewer Export button with a new button labeled "Export"

  6. Within the application you can now use the default export types as defined in the First Option above or add additional code to handle the specific export options as required by your application.

PLEASE NOTE: Crystal Reports buttons may not be indexed in the same order or have the same ID in each version so this may change when updating your Crystal Reports Runtime.

Where to find the code:

Look in ExportFormat.cs for the defined file types, comment out any you do not want to support or use.

Exportcontrols.cs has the actual export functions.

Also note: Not added to the sample is the use of CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument.get_SavedExportOptions(CrystalDecisions.ReportAppServer.ReportDefModel.CrReportExportFormatEnum)

This API allows the Developer to get the saved report option from the report file.

 

 

 

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow me on Twitter

Got Enhancement ideas? Use the SAP Idea Place


Viewing all articles
Browse latest Browse all 3316

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>