private void btnPreviewReport_Click(object sender, EventArgs e)
        {
            dsReport ds   = new dsReport();
            DataSet  dsSP = bllReports.GetSalesInvoice(this.txtInvoiceNumber.Text.Trim());

            try
            {
                foreach (DataRow dr in dsSP.Tables[0].Rows)
                {
                    ds.Tables["SalesParentInfo"].ImportRow(dr);
                }
                foreach (DataRow dr in dsSP.Tables[1].Rows)
                {
                    ds.Tables["SalesChildInfo"].ImportRow(dr);
                }
                foreach (DataRow dr in bllCompanyInfo.getById(1).Rows)
                {
                    ds.Tables["CompanyInfo"].ImportRow(dr);
                }

                rptSalesInvoice_Large rptTest = new Report.rptSalesInvoice_Large();
                rptTest.SetDataSource(ds);
                //rptTest.PrintToPrinter(1, false, 0, 0);
                frmRptv obj = new frmRptv();
                obj.SetReportDataSource = rptTest;
                obj.ShowDialog();
            }
            catch
            { }
        }
示例#2
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            rptSalesInvoice_Large rpt = new rptSalesInvoice_Large();

            rpt.Site = this.Site;
            return(rpt);
        }
示例#3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (_SelctedInvoice == "")
            {
                XtraMessageBox.Show("You have not select any invoice.", "Information");
            }
            else
            {
                string   SalesReturn = bllReportUtility.ReportData("Select IsNull(SalesReturn,0) from SalesParentInfo where InvoiceNo='" + _SelctedInvoice + "'").Rows[0][0].ToString();
                dsReport ds          = new dsReport();
                DataSet  dsSP        = bllReports.GetSalesInvoice(_SelctedInvoice);
                try
                {
                    foreach (DataRow dr in dsSP.Tables[0].Rows)
                    {
                        ds.Tables["SalesParentInfo"].ImportRow(dr);
                    }
                    foreach (DataRow dr in dsSP.Tables[1].Rows)
                    {
                        ds.Tables["SalesChildInfo"].ImportRow(dr);
                    }
                    foreach (DataRow dr in bllCompanyInfo.getById(1).Rows)
                    {
                        ds.Tables["CompanyInfo"].ImportRow(dr);
                    }
                    rptSalesInvoice_Large rptTest = new Report.rptSalesInvoice_Large();


                    rptTest.SetDataSource(ds);
                    rptTest.SetParameterValue("SalesReturn", bllUtility.Val(SalesReturn));
                    //rptTest.PrintToPrinter(1, false, 0, 0);

                    frmRptv obj = new frmRptv();
                    obj.SetReportDataSource = rptTest;
                    obj.ShowDialog();
                }
                catch
                { }
            }
        }