private void ShowReport(string ID)
        {
            try
            {
                ReportViewer1.LocalReport.DataSources.Clear();

                DSPOS  ds         = new DSPOS();
                string reportPath = Server.MapPath("SalesReciptRpt.rdlc");
                DSPOSTableAdapters.usp_SalesReciptCustomerRptTableAdapter da1 = new DSPOSTableAdapters.usp_SalesReciptCustomerRptTableAdapter();
                DSPOSTableAdapters.usp_SalesReciptDetailRptTableAdapter   da2 = new DSPOSTableAdapters.usp_SalesReciptDetailRptTableAdapter();

                da1.Fill(ds.usp_SalesReciptCustomerRpt, Convert.ToInt32(ID));
                da2.Fill(ds.usp_SalesReciptDetailRpt, Convert.ToInt32(ID));

                ReportViewer1.LocalReport.ReportPath = reportPath;

                ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1", ds.Tables["usp_SalesReciptCustomerRpt"]));
                ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet2", ds.Tables["usp_SalesReciptDetailRpt"]));

                ReportViewer1.LocalReport.Refresh();
            }
            catch (Exception)
            {
            }
        }
Exemplo n.º 2
0
        private void ShowReport()
        {
            try
            {
                ReportViewer1.LocalReport.DataSources.Clear();
                DSPOS  ds         = new DSPOS();
                string reportPath = Server.MapPath("MostSellingProductRpt.rdlc");
                DSPOSTableAdapters.usp_BestSellingProductTableAdapter da = new DSPOSTableAdapters.usp_BestSellingProductTableAdapter();

                da.Fill(ds.usp_BestSellingProduct, Convert.ToDateTime(txtFromDate.Text), Convert.ToDateTime(txtToDate.Text), Convert.ToString(ddlReportType.Text), Convert.ToInt32(HttpContext.Current.Session["ShopID"]));


                ReportParameter paramLogo = new ReportParameter();
                paramLogo.Name = "Dates";

                paramLogo.Values.Add("From : " + txtFromDate.Text + " To : " + txtToDate.Text);

                ReportParameter paramRptType = new ReportParameter();
                paramRptType.Name = "ReportType";

                paramRptType.Values.Add(Convert.ToString(ddlReportType.SelectedItem.Text));


                ReportViewer1.LocalReport.ReportPath = reportPath;
                ReportViewer1.LocalReport.SetParameters(paramLogo);
                ReportViewer1.LocalReport.SetParameters(paramRptType);

                ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1", ds.Tables["usp_BestSellingProduct"]));

                ReportViewer1.LocalReport.Refresh();
            }
            catch (Exception)
            {
            }
        }
Exemplo n.º 3
0
        private void ShowReport(string ID)
        {
            try
            {
                ReportViewer1.LocalReport.DataSources.Clear();
                DSPOS  ds         = new DSPOS();
                string reportPath = Server.MapPath("PurchaseOrderRpt.rdlc");
                DSPOSTableAdapters.usp_PurchaseOrderMainTableAdapter da1 = new DSPOSTableAdapters.usp_PurchaseOrderMainTableAdapter();
                DSPOSTableAdapters.usp_PurchaseOrderSubTableAdapter  da2 = new DSPOSTableAdapters.usp_PurchaseOrderSubTableAdapter();

                da1.Fill(ds.usp_PurchaseOrderMain, Convert.ToInt32(ID));
                da2.Fill(ds.usp_PurchaseOrderSub, Convert.ToInt32(ID));


                ReportViewer1.LocalReport.ReportPath = reportPath;

                ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1", ds.Tables["usp_PurchaseOrderMain"]));
                ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet2", ds.Tables["usp_PurchaseOrderSub"]));

                ReportViewer1.LocalReport.Refresh();
            }
            catch (Exception)
            {
            }
        }
        private void ShowReport()
        {
            try
            {
                ReportViewer1.LocalReport.DataSources.Clear();
                DSPOS  ds         = new DSPOS();
                string reportPath = Server.MapPath("SalesReportDateWiseRpt.rdlc");
                DSPOSTableAdapters.usp_SalesReportDateWiseRptTableAdapter da = new DSPOSTableAdapters.usp_SalesReportDateWiseRptTableAdapter();

                da.Fill(ds.usp_SalesReportDateWiseRpt, Convert.ToDateTime(txtFromDate.Text), Convert.ToDateTime(txtToDate.Text), Convert.ToInt32(HttpContext.Current.Session["ShopID"]));


                ReportParameter paramLogo = new ReportParameter();
                paramLogo.Name = "DateOfReport";

                paramLogo.Values.Add("From : " + txtFromDate.Text + " To : " + txtToDate.Text);


                ReportViewer1.LocalReport.ReportPath = reportPath;
                ReportViewer1.LocalReport.SetParameters(paramLogo);

                ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1", ds.Tables["usp_SalesReportDateWiseRpt"]));

                ReportViewer1.LocalReport.Refresh();
            }
            catch (Exception ex)
            {
                var a = ex.Message;
            }
        }
Exemplo n.º 5
0
        private void ShowReport()
        {
            try
            {
                ReportViewer1.LocalReport.DataSources.Clear();
                DSPOS  ds         = new DSPOS();
                string reportPath = Server.MapPath("DamageProductRpt.rdlc");
                DSPOSTableAdapters.usp_DamageProductDetailRptTableAdapter da = new DSPOSTableAdapters.usp_DamageProductDetailRptTableAdapter();

                da.Fill(ds.usp_DamageProductDetailRpt, Convert.ToDateTime(txtFromDate.Text), Convert.ToDateTime(txtToDate.Text));


                ReportParameter paramLogo = new ReportParameter();
                paramLogo.Name = "Dates";

                paramLogo.Values.Add("From : " + txtFromDate.Text + " To : " + txtToDate.Text);


                ReportViewer1.LocalReport.ReportPath = reportPath;
                ReportViewer1.LocalReport.SetParameters(paramLogo);

                ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1", ds.Tables["usp_DamageProductDetailRpt"]));

                ReportViewer1.LocalReport.Refresh();
            }
            catch (Exception)
            {
            }
        }
Exemplo n.º 6
0
        void search()
        {
            ReportViewer1.LocalReport.DataSources.Clear();
            DSPOS  ds         = new DSPOS();
            string reportPath = Server.MapPath("BarcodeList.rdlc");

            DSPOSTableAdapters.usp_BarcodeGenerateRptTableAdapter da = new DSPOSTableAdapters.usp_BarcodeGenerateRptTableAdapter();

            var srch = Convert.ToString(txtSearchPurchaseOrderNo.Text.Trim());
            var a    = Request.Form["ddlPO"];

            da.Fill(ds.usp_BarcodeGenerateRpt, Convert.ToString(a));

            ReportViewer1.LocalReport.ReportPath = reportPath;



            // create a linear barcode object
            Linear barcode = new Linear();

            // set barcode type to Code 128
            barcode.Type = BarcodeType.CODE128;

            // draw barcodes for each data row
            foreach (DSPOS.usp_BarcodeGenerateRptRow row in ds.Tables["usp_BarcodeGenerateRpt"].Rows)
            {
                // set barcode encoding data value
                barcode.Data = row["tag"].ToString();

                // set drawing barcode image format
                barcode.Format = System.Drawing.Imaging.ImageFormat.Jpeg;

                row.Barcode = barcode.drawBarcodeAsBytes();
            }


            ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1", ds.Tables["usp_BarcodeGenerateRpt"]));
            ReportViewer1.LocalReport.Refresh();

            Session["selected_po"] = a;
        }
        private void ShowReport()
        {
            try
            {
                ReportViewer1.LocalReport.DataSources.Clear();
                DSPOS  ds         = new DSPOS();
                string reportPath = Server.MapPath("StockRegisterRpt.rdlc");
                DSPOSTableAdapters.usp_StockRegisterCatwiseRptTableAdapter da = new DSPOSTableAdapters.usp_StockRegisterCatwiseRptTableAdapter();

                DateTime fromDate, toDate;

                if (String.IsNullOrEmpty(txtFromDate.Text))
                {
                    fromDate = Convert.ToDateTime("1/1/1753");
                }
                else
                {
                    fromDate = Convert.ToDateTime(txtFromDate.Text);
                }

                if (String.IsNullOrEmpty(txtToDate.Text))
                {
                    toDate = DateTime.Now;
                }
                else
                {
                    toDate = Convert.ToDateTime(txtToDate.Text);
                }

                da.Fill(ds.usp_StockRegisterCatwiseRpt, Convert.ToInt32(ddlCategory.SelectedValue), Convert.ToInt32(ddlSubCategory.SelectedValue), txtSearchName.Text.Trim(), Convert.ToInt32(HttpContext.Current.Session["ShopID"]), Convert.ToInt32(ddlSold.SelectedValue), fromDate, toDate);

                ReportViewer1.LocalReport.ReportPath = reportPath;

                ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1", ds.Tables["usp_StockRegisterCatwiseRpt"]));

                ReportViewer1.LocalReport.Refresh();
            }
            catch (Exception)
            {
            }
        }
Exemplo n.º 8
0
        private void ShowReport()
        {
            try
            {
                ReportViewer1.LocalReport.DataSources.Clear();
                DSPOS  ds         = new DSPOS();
                string reportPath = Server.MapPath("CustomerListRpt.rdlc");
                DSPOSTableAdapters.usp_CustomerDetailRptTableAdapter da = new DSPOSTableAdapters.usp_CustomerDetailRptTableAdapter();

                da.Fill(ds.usp_CustomerDetailRpt);

                ReportViewer1.LocalReport.ReportPath = reportPath;

                ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1", ds.Tables["usp_CustomerDetailRpt"]));

                ReportViewer1.LocalReport.Refresh();
            }
            catch (Exception)
            {
            }
        }
        private void ShowReport()
        {
            try
            {
                ReportViewer1.LocalReport.DataSources.Clear();
                DSPOS  ds         = new DSPOS();
                string reportPath = Server.MapPath("StockRegisterRpt.rdlc");
                DSPOSTableAdapters.usp_StockRegisterCatwiseRptTableAdapter da = new DSPOSTableAdapters.usp_StockRegisterCatwiseRptTableAdapter();

                da.Fill(ds.usp_StockRegisterCatwiseRpt, Convert.ToInt32(ddlCategory.SelectedValue), Convert.ToInt32(ddlSubCategory.SelectedValue), txtSearchName.Text.Trim());

                ReportViewer1.LocalReport.ReportPath = reportPath;

                ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1", ds.Tables["usp_StockRegisterCatwiseRpt"]));

                ReportViewer1.LocalReport.Refresh();
            }
            catch (Exception)
            {
            }
        }
Exemplo n.º 10
0
        private void ShowReport()
        {
            try
            {
                ReportViewer1.LocalReport.DataSources.Clear();

                DSPOS  ds         = new DSPOS();
                string reportPath = Server.MapPath("POSInventroyAlertReportRpt.rdlc");
                DSPOSTableAdapters.usp_AlertReportInventoryRptTableAdapter da1 = new DSPOSTableAdapters.usp_AlertReportInventoryRptTableAdapter();

                da1.Fill(ds.usp_AlertReportInventoryRpt, Convert.ToInt32(HttpContext.Current.Session["ShopID"]));

                ReportViewer1.LocalReport.ReportPath = reportPath;

                ReportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WebForms.ReportDataSource("DataSet1", ds.Tables["usp_AlertReportInventoryRpt"]));

                ReportViewer1.LocalReport.Refresh();
            }
            catch (Exception)
            {
            }
        }