private void Print() { XtraReport report = new XtraReport1(); ReportData = new SignsJobCardReportData(); var aluminumSheets = SelectedAluminumSheets.Split(','); ReportData.AluminumSheet2_03MM = aluminumSheets.Contains("2.03mm") ? "P" : ""; ReportData.AluminumSheet3_175MM = aluminumSheets.Contains("3.175mm") ? "P" : ""; ReportData.AluminumSheet3_0MM = aluminumSheets.Contains("3.0mm") ? "P" : ""; ReportData.AluminumSheet2_0MM = aluminumSheets.Contains("2.0mm") ? "P" : ""; ReportData.AluminumSheet1_5MM = aluminumSheets.Contains("1.5mm") ? "P" : ""; ReportData.AluminumSheet1MM = aluminumSheets.Contains("1.0mm") ? "P" : ""; report.DataSource = new List <SignsJobCardReportData> { ReportData }; DocumentPreviewWindow window = new DocumentPreviewWindow(); window.PreviewControl.DocumentSource = report; report.CreateDocument(); window.Show(); }
public void SetData <T>(List <T> tList) { XtraReport1 report = new XtraReport1(); this.documentViewer1.DocumentSource = report; report.SetTableSource(tList); report.CreateDocument(false); }
protected void Page_Load(object sender, EventArgs e) { XtraReport report = new XtraReport1(); report.CreateDocument(); ASPxPager1.ItemCount = report.Pages.Count; DocumentViewer1.Report = report; }
XtraReport createreport(DataTable dts) { XtraReport1 report = new XtraReport1(); report.DataSource = dts; report.DataMember = "vwpostingrequestlist"; report.CreateDocument(); return(report); }
XtraReport1 CreateReport() { XtraReport1 report = new XtraReport1(); report.dersid.Value = GetSelectedValue(1); report.CreateDocument(); return report; }
protected void Page_Load(object sender, EventArgs e) { string test = string.Empty; HtmlInputHidden hf = (HtmlInputHidden)this.Page.FindControl("ReportMsg"); XtraReport1 report = new XtraReport1(); report.Parameters["test"].Value = hf.Value.ToString(); report.CreateDocument(); this.DocumentViewer1.Report = report; this.DocumentViewer1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { HtmlInputHidden hf = (HtmlInputHidden)this.Page.FindControl("ReportMsg"); XtraReport1 r = new XtraReport1(); if (hf.Value == "landscape") { r.Landscape = true; } r.CreateDocument(); this.ReportViewer1.Report = r; this.ReportViewer1.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { nwndDataSet ds = GetData(); ASPxGridView1.DataSource = ds; ASPxGridView1.DataMember = ds.Categories.TableName; ASPxGridView1.DataBind(); XtraReport1 report = GetReport(); string selectedIDs = HiddenField1.Value.Trim(new char[] { ',' }); report.FilterString = string.Format("CategoryID in ({0})", selectedIDs); report.CreateDocument(); ReportViewer1.Report = report; }
protected void Page_Load(object sender, EventArgs e) { using (MemoryStream ms = new MemoryStream()) { XtraReport1 r = new XtraReport1(); r.CreateDocument(); PdfExportOptions opts = new PdfExportOptions(); opts.ShowPrintDialogOnOpen = true; r.ExportToPdf(ms, opts); ms.Seek(0, SeekOrigin.Begin); byte[] report = ms.ToArray(); Page.Response.ContentType = "application/pdf"; Page.Response.Clear(); Page.Response.OutputStream.Write(report, 0, report.Length); Page.Response.End(); } }
private void reportService_CustomShowPreview( object sender, CustomShowPreviewEventArgs e) { XtraReport1 coverPageReport = new XtraReport1(); coverPageReport.CreateDocument(); e.Report.CreateDocument(); coverPageReport.Pages.AddRange(e.Report.Pages); ReportPrintTool printTool = new ReportPrintTool(coverPageReport); printTool.ShowPreviewDialog(); e.Handled = true; }
protected void ExportarExcel() { try { EnlazarDatos(); Sesion loSesion = (Sesion)Session["Sesion"]; XtraReport1 objReport = new XtraReport1(); objReport.DataSource = (DataTable)ViewState["loResultado"]; objReport.DataMember = "sqlDataSource1"; #region Asignar permiso de imprimir y guardar if (Session["Permiso"] == null) { foreach (Permiso loPermiso in loSesion.Usuario.Permiso) { if (loPermiso.Clave == 14) { foreach (Dapesa.Seguridad.Comun.Definiciones.TipoPermiso loTipoEmelento in loPermiso.TipoPermiso) { if (loTipoEmelento.ToString() == "Imprimir") { #region Eliminar Boton Imprimir ReportToolbarItem saveItem = null; foreach (ReportToolbarItem item in xrInforme.ToolbarItems) { if (item.ItemKind == ReportToolbarItemKind.PrintReport || item.ItemKind == ReportToolbarItemKind.PrintPage) { saveItem = item; } } xrInforme.ToolbarItems.Remove(saveItem); saveItem = null; foreach (ReportToolbarItem item in xrInforme.ToolbarItems) { if (item.ItemKind == ReportToolbarItemKind.PrintPage || item.ItemKind == ReportToolbarItemKind.PrintPage) { saveItem = item; } } xrInforme.ToolbarItems.Remove(saveItem); #endregion xrInforme.ToolbarItems.Add(new ReportToolbarButton(ReportToolbarItemKind.PrintPage, true)); xrInforme.ToolbarItems.Add(new ReportToolbarButton(ReportToolbarItemKind.PrintReport, true)); } } } if (loPermiso.Clave == 14) { foreach (Dapesa.Seguridad.Comun.Definiciones.TipoPermiso loTipoEmelento in loPermiso.TipoPermiso) { if (loTipoEmelento.ToString() == "Guardar") { #region Eliminar Boton Guadar ReportToolbarItem loItem = null; foreach (ReportToolbarItem item in xrInforme.ToolbarItems) { if (item.ItemKind == ReportToolbarItemKind.SaveToDisk || item.ItemKind == ReportToolbarItemKind.SaveToDisk) { loItem = item; } } xrInforme.ToolbarItems.Remove(loItem); #endregion xrInforme.ToolbarItems.Add(new ReportToolbarButton(ReportToolbarItemKind.SaveToDisk, true)); } } } } } #endregion objReport.CreateDocument(); this.xrInforme.Report = objReport; Page.Session["loInformeBackOrderPedidos"] = objReport; } catch (Exception ex) { Session["Excepcion"] = ex; Response.Redirect("~/Error.aspx", false); } }
private void Print() { XtraReport report = new XtraReport1(); ReportData = new SignsJobCardReportData(); ReportData.Lines.AddRange(new[] { new SignJobCardReportLine { Shape = new ImageSource(Properties.Resources.SL), Size = "750 SL", Qty = 20, Unit = "Nos" }, new SignJobCardReportLine { Shape = new ImageSource(Properties.Resources.Circle), Size = "600 Dia", Qty = 32, Unit = "Nos" }, new SignJobCardReportLine { Shape = new ImageSource(Properties.Resources.HT), Size = "600 HT", Qty = 2, Unit = "Nos" }, new SignJobCardReportLine { Shape = new ImageSource(Properties.Resources.R1), Size = "1200 x 400", Qty = 16, Unit = "Nos" }, new SignJobCardReportLine { Shape = new ImageSource(Properties.Resources.R2) }, new SignJobCardReportLine { Shape = new ImageSource(Properties.Resources.R3) } }); var aluminumSheets = SelectedAluminumSheets.Split(','); ReportData.AluminumSheet2_03MM = aluminumSheets.Contains("2.03mm") ? "P" : ""; ReportData.AluminumSheet3_175MM = aluminumSheets.Contains("3.175mm") ? "P" : ""; ReportData.AluminumSheet3_0MM = aluminumSheets.Contains("3.0mm") ? "P" : ""; ReportData.AluminumSheet2_0MM = aluminumSheets.Contains("2.0mm") ? "P" : ""; ReportData.AluminumSheet1_5MM = aluminumSheets.Contains("1.5mm") ? "P" : ""; ReportData.AluminumSheet1MM = aluminumSheets.Contains("1.0mm") ? "P" : ""; report.DataSource = new List <SignsJobCardReportData> { ReportData }; DocumentPreviewWindow window = new DocumentPreviewWindow(); window.PreviewControl.DocumentSource = report; report.CreateDocument(); window.Show(); }