protected void Button1_Click(object sender, EventArgs e) { try { using (MemoryStream stream = new MemoryStream()) { XtraReport rep = PivotReportGenerator.GenerateReport(ASPxPivotGrid1, GetReportGeneratorType(RadioButtonList1.Value.ToString()), Convert.ToInt32(ASPxSpinEdit1.Number), ASPxCheckBox1.Checked); rep.ExportToPdf(stream); ExportToResponse(stream, "Book", "pdf", "application/pdf", true); } } catch (Exception ex) { Response.Redirect("Error.aspx"); } }
private void button1_Click(object sender, EventArgs e) { XtraReport rep = PivotReportGenerator.GenerateReport(pivotGridControl1, ((ReportGeneratorType)radioGroup1.EditValue), Convert.ToInt32(spinEdit1.EditValue), checkEdit2.Checked); rep.ShowPreviewDialog(); }