Skip to Content
avatar image
Former Member

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


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?

application.png (8.0 kB)
option.png (8.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 05, 2018 at 10:19 PM

    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.NoFormat); // no exports allowed
    //int myFOpts = (int)(CrystalDecisions.Shared.ViewerExportFormats.AllFormats);
    crystalReportsViewer2.ViewerCore.AllowedExportFormats = myFOpts;
    Don ( thanks to R&D for pointing this out.... )
    Add comment
    10|10000 characters needed characters exceeded