/// <summary> /// Get Order details click event /// </summary> protected void btnOrderFilter_Click(object sender, EventArgs e) { objReportViewer.Visible = true; Mode = "271"; //Get Filetered Orders in DataSet OrderAdmin _OrderAdmin = new OrderAdmin(); dsOrders = _OrderAdmin.ReportList(Mode, Year, ddlSupplier.SelectedValue); dsOrdersLineItems = _OrderAdmin.GetAllOrderLineItems().ToDataSet(false); DataView dv = new DataView(dsOrders.Tables[0]); DataView dv1 = new DataView(); dsOrders = _OrderAdmin.ReportList(Mode, Year,ddlSupplier.SelectedValue); dv = new DataView(dsOrders.Tables[0]); DateTime StartDate = DateTime.Parse(txtStartDate.Text.Trim()); DateTime EndDate = DateTime.Parse(txtEndDate.Text.Trim()); dv.RowFilter = "orderdate >= '" + StartDate + "' and orderdate <= '" + EndDate.AddDays(1) + "'"; if (dv.ToTable().Rows.Count == 0) { lblErrorMsg.Text = "No records found"; objReportViewer.Visible = false; return; } objReportViewer.LocalReport.DataSources.Clear(); ReportParameter param1 = new ReportParameter("CurrentLanguage", System.Globalization.CultureInfo.CurrentCulture.Name); objReportViewer.LocalReport.SetParameters(new ReportParameter[] { param1 }); this.objReportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeOrderDataSet_ZNodeOrder", dv)); objReportViewer.LocalReport.Refresh(); }
protected void btnOrderFilter_Click(object sender, EventArgs e) { objReportViewer.Visible = true; if (Request.Params["filter"] != null) { Mode = Request.Params["filter"]; } //Get Filetered Orders in DataSet OrderAdmin _OrderAdmin = new OrderAdmin(); DataView dv = new DataView(); if (dsOrders.Tables.Count == 0) { Mode = "25"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/TaxReport.rdlc"; dv = new DataView(dsOrders.Tables[0]); DateTime StartDate = DateTime.Parse(txtStartDate.Text.Trim()); DateTime EndDate = DateTime.Parse(txtEndDate.Text.Trim()); dv.RowFilter = "orderdate >= '" + StartDate + "' and orderdate <= '" + EndDate.AddDays(1) + "'"; if (dv.Count == 0) { lblErrorMsg.Text = "No records found"; objReportViewer.Visible = false; return; } objReportViewer.LocalReport.DataSources.Clear(); ReportParameter param1 = new ReportParameter("CurrentLanguage", System.Globalization.CultureInfo.CurrentCulture.Name); objReportViewer.LocalReport.SetParameters(new ReportParameter[] { param1 }); this.objReportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeOrderDataSet_ZNodeOrder", dv)); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeTitleDataSet_ZNodeTitle", dv)); this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/TaxReportMonth.rdlc"; string asas = this.objReportViewer.LocalReport.ReportPath; objReportViewer.LocalReport.Refresh(); }
protected void btnOrderFilter_Click(object sender, EventArgs e) { objReportViewer.Visible = true; DateTime StartDate = DateTime.MinValue; //Get Filetered Orders in DataSet OrderAdmin _OrderAdmin = new OrderAdmin(); dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); DataView dv = new DataView(dsOrders.Tables[0]); if (txtStartDate.Text.Length > 0) StartDate = DateTime.Parse(txtStartDate.Text.Trim()); string Status = ddlLogCategory.SelectedItem.Text; if (Status == "ALL" && txtStartDate.Text.Length > 0) { dv.RowFilter = "createDte >= '" + StartDate + "'"; } else if(Status != "ALL" && txtStartDate.Text.Length > 0) { dv.RowFilter = "createDte >= '" + StartDate + "' and category = '" + Status + "'"; } else if(Status != "ALL") { dv.RowFilter = "category = '" + Status + "'"; } if (dv.ToTable().Rows.Count == 0) { lblErrorMsg.Text = "No records found"; objReportViewer.Visible = false; return; } objReportViewer.LocalReport.DataSources.Clear(); ReportParameter param1 = new ReportParameter("CurrentLanguage", System.Globalization.CultureInfo.CurrentCulture.Name); objReportViewer.LocalReport.SetParameters(new ReportParameter[] { param1 }); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZnodeActivityLog_ZnodeActivityLog", dv)); }
/// <summary> /// Page Load Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Request.Params["filter"] != null) { Mode = Request.Params["filter"]; } //Bind Supplier SupplierAdmin supplier = new SupplierAdmin(); ddlSupplier.DataSource = supplier.GetAll(); ddlSupplier.DataTextField = "name"; ddlSupplier.DataValueField = "supplierid"; ddlSupplier.DataBind(); ListItem li1 = new ListItem("None", "0"); ddlSupplier.Items.Insert(0, li1); //Get Filetered Orders in DataSet OrderAdmin _OrderAdmin = new OrderAdmin(); DataView dv = new DataView(); dsOrders = _OrderAdmin.ReportList(Mode, Year,""); dsOrdersLineItems = _OrderAdmin.GetAllOrderLineItems().ToDataSet(false); dv = new DataView(dsOrders.Tables[0]); if (Request.Params["filter"] != null) { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/SupplierReport.rdlc"; } if (dv.ToTable().Rows.Count == 0) { lblErrorMsg.Text = "No records found"; objReportViewer.Visible = false; return; } objReportViewer.LocalReport.DataSources.Clear(); ReportParameter param1 = new ReportParameter("CurrentLanguage", System.Globalization.CultureInfo.CurrentCulture.Name); objReportViewer.LocalReport.SetParameters(new ReportParameter[] { param1 }); this.objReportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeOrderDataSet_ZNodeOrder", dv)); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeOrderLineItems_ZNodeOrderLineItem", dsOrdersLineItems.Tables[0])); objReportViewer.LocalReport.Refresh(); } }
/// <summary> /// Page Load Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Request.Params["filter"] != null) { Mode = Request.Params["filter"]; } OrderAdmin _OrderAdmin = new OrderAdmin(); dsOrders = _OrderAdmin.ReportList(Mode, Year,""); DataView dv = new DataView(dsOrders.Tables[0]); if (Request.Params["filter"] != null) { Mode = Request.Params["filter"]; if (Mode.Equals("25")) { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/TaxReport.rdlc"; } } if (dv.ToTable().Rows.Count == 0) { lblErrorMsg.Text = "No records found"; objReportViewer.Visible = false; return; } objReportViewer.LocalReport.DataSources.Clear(); ReportParameter param1 = new ReportParameter("CurrentLanguage", System.Globalization.CultureInfo.CurrentCulture.Name); objReportViewer.LocalReport.SetParameters(new ReportParameter[] { param1 }); this.objReportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeOrderDataSet_ZNodeOrder", dv)); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeTitleDataSet_ZNodeTitle", dv)); objReportViewer.LocalReport.Refresh(); } }
protected void btnOrderFilter_Click(object sender, EventArgs e) { objReportViewer.Visible = true; if (Request.Params["filter"] != null) { Mode = Request.Params["filter"]; } //Get Filetered Orders in DataSet OrderAdmin _OrderAdmin = new OrderAdmin(); dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); DataView dv = new DataView(); string Status = ListOrderStatus.SelectedItem.Text; if (Mode == "23") { this.objReportViewer.LocalReport.ReportPath = "admin/Secure/SEO/Reports/popularsearch.rdlc"; if (Status == "Day") { Mode = "231"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Week") { Mode = "232"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Month") { Mode = "233"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Quarter") { Mode = "234"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Year") { Mode = "235"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } dv = new DataView(dsOrders.Tables[0]); } if (dv.ToTable().Rows.Count == 0) { lblErrorMsg.Text = "No records found"; objReportViewer.Visible = false; return; } objReportViewer.LocalReport.DataSources.Clear(); ReportParameter param1 = new ReportParameter("CurrentLanguage", System.Globalization.CultureInfo.CurrentCulture.Name); objReportViewer.LocalReport.SetParameters(new ReportParameter[] { param1 }); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZnodeSEOMost_Search_ZnodeSEOSearch", dv)); objReportViewer.LocalReport.Refresh(); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Request.Params["filter"] != null) { Mode = Request.Params["filter"]; } if (Request.Params["pagetype"] != null) { PageType = Request.Params["pagetype"]; } else { PageType = ""; } // Get Filetered Orders in DataSet OrderAdmin _OrderAdmin = new OrderAdmin(); dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); DataView dv = new DataView(dsOrders.Tables[0]); // Set the Report Path this.objReportViewer.LocalReport.ReportPath = "admin/Secure/SEO/Reports/popularsearch.rdlc"; if (dv.ToTable().Rows.Count == 0) { lblErrorMsg.Text = "No records found"; objReportViewer.Visible = false; return; } objReportViewer.LocalReport.DataSources.Clear(); ReportParameter param1 = new ReportParameter("CurrentLanguage", System.Globalization.CultureInfo.CurrentCulture.Name); objReportViewer.LocalReport.SetParameters(new ReportParameter[] { param1 }); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZnodeSEOMost_Search_ZnodeSEOSearch", dsOrders.Tables[0])); objReportViewer.LocalReport.Refresh(); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnOrderFilter_Click(object sender, EventArgs e) { objReportViewer.Visible = true; if (Request.Params["filter"] != null) { Mode = Request.Params["filter"]; } //Get Filetered Orders in DataSet OrderAdmin _OrderAdmin = new OrderAdmin(); dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); dsOrdersLineItems = _OrderAdmin.GetAllOrderLineItems().ToDataSet(false); DataView dv = new DataView(dsOrders.Tables[0]); DataView dv1 = new DataView(); pnlCustom.Visible = true; string Status = ListOrderStatus.SelectedItem.Text; if (Mode == "15") { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/FrequentCustomer.rdlc"; if (Status == "Day") { Mode = "151"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Week") { Mode = "152"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Month") { Mode = "153"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Quarter") { Mode = "154"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Year") { Mode = "155"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } dsOrdersLineItems = _OrderAdmin.GetAllOrderLineItems().ToDataSet(false); dv1 = new DataView(dsOrders.Tables[0]); } else if (Mode == "16") { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/FrequentCustomer.rdlc"; if (Status == "Day") { Mode = "161"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Week") { Mode = "162"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Month") { Mode = "163"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Quarter") { Mode = "164"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Year") { Mode = "165"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } dsOrdersLineItems = _OrderAdmin.GetAllOrderLineItems().ToDataSet(false); dv1 = new DataView(dsOrders.Tables[0]); } else if (Mode == "17") { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/PopularProduct.rdlc"; if (Status == "Day") { Mode = "171"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Week") { Mode = "172"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Month") { Mode = "173"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Quarter") { Mode = "174"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Year") { Mode = "175"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } dsOrdersLineItems = _OrderAdmin.ReportList(Mode, Year, ""); dv1 = new DataView(dsOrdersLineItems.Tables[0]); } else if (Mode == "20") { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/BestSellers.rdlc"; if (Status == "Day") { Mode = "201"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Week") { Mode = "202"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Month") { Mode = "203"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Quarter") { Mode = "204"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Year") { Mode = "205"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } dsOrdersLineItems = _OrderAdmin.ReportList(Mode, Year, ""); dv1 = new DataView(dsOrdersLineItems.Tables[0]); } else if (Mode == "24") { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/CouponUsage.rdlc"; if (Status == "Day") { Mode = "241"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Week") { Mode = "242"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Month") { Mode = "243"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Quarter") { Mode = "244"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Year") { Mode = "245"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } dsOrdersLineItems = _OrderAdmin.GetAllOrderLineItems().ToDataSet(false); dv1 = new DataView(dsOrders.Tables[0]); } else if (Mode == "26") { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/Affiliate.rdlc"; if (Status == "Day") { Mode = "261"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Week") { Mode = "262"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Month") { Mode = "263"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Quarter") { Mode = "264"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } else if (Status == "Year") { Mode = "265"; dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); } dsOrdersLineItems = _OrderAdmin.GetAllOrderLineItems().ToDataSet(false); dv1 = new DataView(dsOrders.Tables[0]); } if (dv1.ToTable().Rows.Count == 0) { lblErrorMsg.Text = "No records found"; objReportViewer.Visible = false; return; } objReportViewer.LocalReport.DataSources.Clear(); ReportParameter param1 = new ReportParameter("CurrentLanguage", System.Globalization.CultureInfo.CurrentCulture.Name); objReportViewer.LocalReport.SetParameters(new ReportParameter[] { param1 }); this.objReportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeAffiliate_ZNodeAffiliate", dv1)); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeOrderDataSet_ZNodeOrder", dv1)); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeCouponDataSet_ZNodeCoupon", dv1)); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeOrderLineItems_ZNodeOrderLineItem", dsOrdersLineItems.Tables[0])); objReportViewer.LocalReport.Refresh(); }
/// <summary> /// Page Load Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Request.Params["filter"] != null) { Mode = Request.Params["filter"]; } //Get Filetered Orders in DataSet OrderAdmin _OrderAdmin = new OrderAdmin(); DataView dv = new DataView(); // Mode 17 - For Top Earning Products // Mode 18 - For Inventory Re-Orderlevel // Mode 20 - For Best Sellers if (Mode.Equals("17") || Mode.Equals("18") || Mode.Equals("20") || Mode.Equals("26")) { dsOrdersLineItems = _OrderAdmin.ReportList(Mode, Year, ""); dv = new DataView(dsOrdersLineItems.Tables[0]); } else if (Mode.Equals("19")) // Mode 19 - Customer Feedback { dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); dsCaseRequest = _OrderAdmin.ReportList(Mode, Year, ""); dv = new DataView(dsOrders.Tables[0]); } else { dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); dsOrdersLineItems = _OrderAdmin.GetAllOrderLineItems().ToDataSet(false); dv = new DataView(dsOrders.Tables[0]); } if (Request.Params["filter"] != null) { Mode = Request.Params["filter"]; // Order Pick List if (Mode.Equals("13")) { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/Inventory.rdlc"; } // Email Opt-In Customers if (Mode.Equals("14")) { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/EmailOptIn.rdlc"; } // Most Frequent Customers if (Mode.Equals("15")) { pnlCustom.Visible = true; this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/FrequentCustomer.rdlc"; } // Highest Dollar Customers if (Mode.Equals("16")) { pnlCustom.Visible = true; this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/VolumeCustomer.rdlc"; } // Most Popular Product if (Mode.Equals("17")) { pnlCustom.Visible = true; this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/PopularProduct.rdlc"; } // Inventory Re-Order if (Mode.Equals("18")) { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/ReOrder.rdlc"; } // Customer Feedback if (Mode.Equals("19")) { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/Feedback.rdlc"; } // Best Sellers if (Mode.Equals("20")) { pnlCustom.Visible = true; this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/BestSellers.rdlc"; } // Coupon Usage if (Mode.Equals("24")) { pnlCustom.Visible = true; this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/CouponUsage.rdlc"; } // Affiliate Orders if (Mode.Equals("26")) { pnlCustom.Visible = true; this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/Affiliate.rdlc"; } } if (dv.ToTable().Rows.Count == 0) { lblErrorMsg.Text = "No records found"; objReportViewer.Visible = false; pnlCustom.Visible = false; return; } objReportViewer.LocalReport.DataSources.Clear(); ReportParameter param1 = new ReportParameter("CurrentLanguage", System.Globalization.CultureInfo.CurrentCulture.Name); objReportViewer.LocalReport.SetParameters(new ReportParameter[] { param1 }); this.objReportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); if (Mode.Equals("24")) { objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeCouponDataSet_ZNodeCoupon", dv)); } else if (!Mode.Equals("19")) { objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeOrderDataSet_ZNodeOrder", dv)); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeAccountDataSet_ZNodeAccount", dv)); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeOrderLineItems_ZNodeOrderLineItem", dsOrdersLineItems.Tables[0])); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeAffiliate_ZNodeAffiliate", dv)); } else { objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeTitleDataSet_ZNodeTitle", dv)); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeCaseRequestDataSet_ZNodeCaseRequest", dsCaseRequest.Tables[0])); } objReportViewer.LocalReport.Refresh(); } }
protected void Page_Load(object sender, EventArgs e) { if (Request.Params["filter"] != null) { Mode = Request.Params["filter"]; } // Get Fietered Orders in DataSet OrderAdmin _OrderAdmin = new OrderAdmin(); dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); DataView dv = new DataView(dsOrders.Tables[0]); if (!Page.IsPostBack) { // Load Order State Item if (Request.Params["filter"] != null) { if (Mode.Equals("22")) { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/ActivityLog.rdlc"; } } if (dv.ToTable().Rows.Count == 0) { lblErrorMsg.Text = "No records found"; objReportViewer.Visible = false; return; } objReportViewer.LocalReport.DataSources.Clear(); ReportParameter param1 = new ReportParameter("CurrentLanguage", System.Globalization.CultureInfo.CurrentCulture.Name); objReportViewer.LocalReport.SetParameters(new ReportParameter[] { param1 }); objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZnodeActivityLog_ZnodeActivityLog", dv)); } }
protected void btnOrderFilter_Click(object sender, EventArgs e) { objReportViewer.Visible = true; //Get Filetered Orders in DataSet OrderAdmin _OrderAdmin = new OrderAdmin(); DataView dv = new DataView(); if (Mode.Equals("12")) { DataSet tempDs = FormatReportDataSet(_OrderAdmin.GetAllOrders(ZNodeConfigManager.SiteConfig.PortalID).ToDataSet(false)); dsOrdersLineItems = _OrderAdmin.GetAllOrderLineItems().ToDataSet(false); dv = new DataView(tempDs.Tables[0]); } else if (Mode.Equals("21")) { dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); dv = new DataView(dsOrders.Tables[0]); } DateTime StartDate = DateTime.Parse(txtStartDate.Text.Trim()); DateTime EndDate = DateTime.Parse(txtEndDate.Text.Trim()); if (Mode.Equals("12")) { string Status = ddlOrderStatus.SelectedItem.Text; if (Status == "ALL") { dv.RowFilter = "orderdate >= '" + StartDate + "' and orderdate <= '" + EndDate.AddDays(1) + "'"; } else { dv.RowFilter = "orderdate >= '" + StartDate + "' and orderdate <= '" + EndDate.AddDays(1) + "' and orderstatus = '" + Status + "'"; } } if (Mode.Equals("21")) { string Status = ddlProfilename.SelectedItem.Text; if (Status == "ALL") { dv.RowFilter = "CreateDte >= '" + StartDate + "' and CreateDte <= '" + EndDate.AddDays(1) + "'"; } else { dv.RowFilter = "CreateDte >= '" + StartDate + "' and CreateDte <= '" + EndDate.AddDays(1) + "' and ProfileName = '" + Status + "'"; } } if (dv.ToTable().Rows.Count == 0) { lblErrorMsg.Text = "No records found"; objReportViewer.Visible = false; return; } objReportViewer.LocalReport.DataSources.Clear(); ReportParameter param1 = new ReportParameter("CurrentLanguage", System.Globalization.CultureInfo.CurrentCulture.Name); objReportViewer.LocalReport.SetParameters(new ReportParameter[] { param1 }); this.objReportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); if (Mode.Equals("12")) objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeOrderDataSet_ZNodeOrder", dv)); else if (Mode.Equals("21")) objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeAccountDataSet_ZNodeAccount", dv)); objReportViewer.LocalReport.Refresh(); }
/// <summary> /// Page Load Event /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (Request.Params["filter"] != null) { Mode = Request.Params["filter"]; } if (!Page.IsPostBack) { // Load Order State Item OrderAdmin _OrderAdminAccess = new OrderAdmin(); ddlOrderStatus.DataSource = _OrderAdminAccess.GetAllOrderStates(); ddlOrderStatus.DataTextField = "orderstatename"; ddlOrderStatus.DataValueField = "Orderstateid"; ddlOrderStatus.DataBind(); ListItem item1 = new ListItem("ALL", "0"); ddlOrderStatus.Items.Insert(0, item1); ddlOrderStatus.SelectedIndex = 0; // Load Profile Types ProfileAdmin profileAdmin = new ProfileAdmin(); ddlProfilename.DataSource = profileAdmin.GetAll(); ddlProfilename.DataTextField = "Name"; ddlProfilename.DataValueField = "ProfileID"; ddlProfilename.DataBind(); ListItem item2 = new ListItem("ALL", "0"); ddlProfilename.Items.Insert(0, item2); ddlProfilename.SelectedIndex = 0; // Get Filetered Orders in DataSet OrderAdmin _OrderAdmin = new OrderAdmin(); dsOrders = _OrderAdmin.ReportList(Mode, Year, ""); dsOrdersLineItems = _OrderAdmin.GetAllOrderLineItems().ToDataSet(false); DataView dv = new DataView(dsOrders.Tables[0]); if (Request.Params["filter"] != null) { if (Mode.Equals("12")) { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/Orders.rdlc"; pnlOrderStatus.Visible = true; lblOrderStatus.Visible = true; lblOrderStatus.Text = "Order Status"; btnOrderFilter.Text = "Get Orders"; } if (Mode.Equals("21")) { this.objReportViewer.LocalReport.ReportPath = "Admin/Secure/Reports/Accounts.rdlc"; pnlprofile.Visible = true; lblProfileName.Visible = true; lblProfileName.Text = "Profiles"; btnOrderFilter.Text = "Get Details"; } } if (dv.ToTable().Rows.Count == 0) { lblErrorMsg.Text = "No records found"; objReportViewer.Visible = false; pnlCustom.Visible = false; return; } objReportViewer.LocalReport.DataSources.Clear(); ReportParameter param1 = new ReportParameter("CurrentLanguage", System.Globalization.CultureInfo.CurrentCulture.Name); objReportViewer.LocalReport.SetParameters(new ReportParameter[] { param1 }); this.objReportViewer.LocalReport.SubreportProcessing += new SubreportProcessingEventHandler(LocalReport_SubreportProcessing); if (Mode.Equals("12")) objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeOrderDataSet_ZNodeOrder", dv)); else if(Mode.Equals("21")) objReportViewer.LocalReport.DataSources.Add(new ReportDataSource("ZNodeAccountDataSet_ZNodeAccount", dv)); objReportViewer.LocalReport.Refresh(); } }