using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Shared; public partial class Compassion_forms_Parternship_Committee : System.Web.UI.Page { ReportDocument children = new ReportDocument(); protected void Page_Load(object sender, EventArgs e) { } protected void btnPrintRegisteredChild_Click(object sender, EventArgs e) { //Code For Printing Out The Registered Children try { using (DataSetCompassion childrenlist = new DataSetCompassion()) { using (DataSetCompassionTableAdapters.childrenTableAdapter childrens = new DataSetCompassionTableAdapters.childrenTableAdapter()) { childrens.FillByChildren(childrenlist.children, txtChildApproval.Text); } crChildrenViewer.Visible = true; children.Load(Server.MapPath("~/CrystalReportChildren.rpt")); children.SetDataSource(childrenlist); crChildrenViewer.ReportSource = children; children.ExportToHttpResponse(ExportFormatType.PortableDocFormat, Response, false, "receipt"); children.Dispose(); } } catch (Exception ex) { lblPrintChildError.Text = ex.Message.ToString(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)