|
public void OnReportLoaded(ReportViewerOptions reportOption)
{
if (reportOption.ReportModel.PDFOptions == null || reportOption.ReportModel.ExcelOptions == null)
{
reportOption.ReportModel.PDFOptions = new Syncfusion.EJ.ReportWriter.PDFOptions();
reportOption.ReportModel.PDFOptions.Security = new Syncfusion.Pdf.Security.PdfSecurity();
reportOption.ReportModel.ExcelOptions = new Syncfusion.EJ.ReportWriter.ExcelOptions();
}
reportOption.ReportModel.PDFOptions.Security.UserPassword = "coolcomp@123"; //specify the password to open the Exported PDF
reportOption.ReportModel.ExcelOptions.PasswordToOpen = "coolcomp@123"; //specify the password to open the Exported Excel
} |