Exemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crptPartyAddressBook rpt = new crptPartyAddressBook();

            rpt.Site = this.Site;
            return(rpt);
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptPartyAddressBook rpt = new crptPartyAddressBook();
     rpt.Site = this.Site;
     return rpt;
 }
Exemplo n.º 3
0
        /// <summary>
        ///  Function to print  PartyAddressBook in curresponding Crystal report
        /// </summary>
        /// <param name="dsPartyAddressBook"></param>
        public void PartyAddressBookPrint(DataSet dsPartyAddressBook)
        {

            try
            {

                crptPartyAddressBook crptPartyAddressBook = new crptPartyAddressBook();
                foreach (DataTable dtbl in dsPartyAddressBook.Tables)
                {
                    if (dtbl.TableName == "Table1")
                    {
                        crptPartyAddressBook.Database.Tables["dtblCompany"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table2")
                    {
                        crptPartyAddressBook.Database.Tables["PartyAddressDetails"].SetDataSource(dtbl);
                    }

                }
                this.crptViewer.ReportSource = crptPartyAddressBook;
                SettingsSP spSettings = new SettingsSP();
                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }
                else
                {
                    crptPartyAddressBook.PrintToPrinter(1, false, 0, 0);
                }
            }
            catch (Exception ex)
            {

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