public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crptPDCClearanceVoucher rpt = new crptPDCClearanceVoucher();

            rpt.Site = this.Site;
            return(rpt);
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptPDCClearanceVoucher rpt = new crptPDCClearanceVoucher();
     rpt.Site = this.Site;
     return rpt;
 }
Exemple #3
0
        /// <summary>
        ///  Function to print PDCClearancevoucher in curresponding Crystal report
        /// </summary>
        /// <param name="dsPDCClearanceVoucher"></param>
        internal void PDCClearancevoucherPrinting(DataSet dsPDCClearanceVoucher)
        {
            try
            {

                crptPDCClearanceVoucher crptClearanceReport = new crptPDCClearanceVoucher();

                foreach (DataTable dtbl in dsPDCClearanceVoucher.Tables)
                {
                    if (dtbl.TableName == "Table")
                    {
                        crptClearanceReport.Database.Tables["dtblCompany"].SetDataSource(dtbl);


                    }

                    else if (dtbl.TableName == "Table1")
                    {

                        crptClearanceReport.Database.Tables["dtblPDCClearance"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table2")
                    {

                        crptClearanceReport.Database.Tables["dtblPDCClearanceDetails"].SetDataSource(dtbl);
                    }

                }

                this.crptViewer.ReportSource = crptClearanceReport;
                SettingsSP spSettings = new SettingsSP();

                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }
                else
                {
                    crptClearanceReport.PrintToPrinter(1, false, 0, 0);

                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("CRV" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }