cancel
Showing results for 
Search instead for 
Did you mean: 

Additional selection options of export functionality in CR Runtime SP21 .NET dll

Former Member
0 Kudos

HI,

I am using a application which uses CR Runtime SP21 .NET dll run time package for reports with WPF.

If we see "Export" option from Visual Studio, it shows us many option like, export to Disk file, to Application etc. (Below screen shots from Visual Studio report viewer preview).

And for each format there are setting window like for CSV, Excel etc.

How can I use same feature within my C# WPF application to show that dialog for export report?

Am I not able to view those options due to developer version of CR Runtime, Will purchasing licencing will resolve my issue?

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Hardik,

It does work same as the Windows Form API:

// set up the format export types:
int myFOpts = (int)(
    CrystalDecisions.Shared.ViewerExportFormats.RptFormat |
    CrystalDecisions.Shared.ViewerExportFormats.PdfFormat |
    CrystalDecisions.Shared.ViewerExportFormats.RptrFormat |
    CrystalDecisions.Shared.ViewerExportFormats.XLSXFormat |
    CrystalDecisions.Shared.ViewerExportFormats.CsvFormat |
    CrystalDecisions.Shared.ViewerExportFormats.EditableRtfFormat |
    CrystalDecisions.Shared.ViewerExportFormats.ExcelRecordFormat |
    CrystalDecisions.Shared.ViewerExportFormats.RtfFormat |
    CrystalDecisions.Shared.ViewerExportFormats.WordFormat |
    CrystalDecisions.Shared.ViewerExportFormats.XmlFormat |
    CrystalDecisions.Shared.ViewerExportFormats.ExcelFormat |
    CrystalDecisions.Shared.ViewerExportFormats.ExcelRecordFormat);
//CrystalDecisions.Shared.ViewerExportFormats.NoFormat); // no exports allowed
//int myFOpts = (int)(CrystalDecisions.Shared.ViewerExportFormats.AllFormats);

crystalReportsViewer2.ViewerCore.AllowedExportFormats = myFOpts;

Don ( thanks to R&D for pointing this out.... )

Answers (0)