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

            rpt.Site = this.Site;
            return(rpt);
        }
Beispiel #2
0
        /// <summary>
        ///  Function to print AccountGroupReport in curresponding Crystal report
        /// </summary>
        /// <param name="dsAccountGroup"></param>
        internal void AccountGroup(DataSet dsAccountGroup)
        {
            try
            {

                crptAccountGroupReport crptAccountGroupReport = new crptAccountGroupReport();

                foreach (DataTable dtbl in dsAccountGroup.Tables)
                {
                    if (dtbl.TableName == "Table1")
                    {
                        crptAccountGroupReport.Database.Tables["dtblAccountGroup"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table2")
                    {

                        crptAccountGroupReport.Database.Tables["dtblCompany"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table3")
                    {
                        crptAccountGroupReport.Database.Tables["dtblSum"].SetDataSource(dtbl);
                    }




                }
                this.crptViewer.ReportSource = crptAccountGroupReport;

                SettingsSP spSettings = new SettingsSP();
                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }
                else
                {
                    crptAccountGroupReport.PrintToPrinter(1, false, 0, 0);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("BS14:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptAccountGroupReport rpt = new crptAccountGroupReport();
     rpt.Site = this.Site;
     return rpt;
 }