How to Suggest name when saving report Crystal Report

2

Does anyone know how to suggest name when saving Crystal Report C # in the dialog box, windows form? The format I've been able to restrict ... like this:

crystalRVEditoraNomeComeca.AllowedExportFormats = (int)(CrystalDecisions.Shared.ViewerExportFormats.ExcelRecordFormat);

Below image to help in understanding:

    
asked by anonymous 11.09.2017 / 21:47

2 answers

1

It worked like this:

ReportDocument rd = new ReportDocument();
rd.SummaryInfo.ReportTitle = "Nome Desejado";
    
27.09.2017 / 13:36
2

See if this resolves, in this export, a class of options is used for the export. In it the DiskFileName property is the name of the file.

ExportOptions CrExportOptions ;
                DiskFileDestinationOptions CrDiskFileDestinationOptions = new DiskFileDestinationOptions();
                PdfRtfWordFormatOptions CrFormatTypeOptions = new PdfRtfWordFormatOptions();
                CrDiskFileDestinationOptions.DiskFileName = "c:\csharp.net-informations.pdf";
                CrExportOptions = cryRpt.ExportOptions;
                {
                    CrExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                    CrExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
                    CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions;
                    CrExportOptions.FormatOptions = CrFormatTypeOptions;
                }
                cryRpt.Export();
    
11.09.2017 / 21:55