private void sve_excel_Click(object sender, EventArgs e) { RPRT.CrystalReport_ALL_PRDCTS prd = new RPRT.CrystalReport_ALL_PRDCTS(); ExportOptions ex = new ExportOptions(); DiskFileDestinationOptions dist = new DiskFileDestinationOptions(); ExcelFormatOptions excel = new ExcelFormatOptions(); dist.DiskFileName = @"C:\Users\hima\Desktop\\Excel_Sheet.xls"; ex = prd.ExportOptions; ex.ExportDestinationType = ExportDestinationType.DiskFile; ex.ExportFormatType = ExportFormatType.Excel; ex.ExportFormatOptions = excel; ex.ExportDestinationOptions = dist; prd.Export(); MessageBox.Show("File Exported on Desktop Successfully", "INFO", MessageBoxButtons.OK); }
private void Print_All_Click(object sender, EventArgs e) { RPRT.CrystalReport_ALL_PRDCTS crs = new RPRT.CrystalReport_ALL_PRDCTS(); RPRT.PRNT_SNGL_PRD prd = new RPRT.PRNT_SNGL_PRD(); prd.crystalReportViewer1.ReportSource = crs; prd.ShowDialog(); }