コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crptMaterialReceiptReport rpt = new crptMaterialReceiptReport();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptMaterialReceiptReport rpt = new crptMaterialReceiptReport();
     rpt.Site = this.Site;
     return rpt;
 }
コード例 #3
0
ファイル: frmReport.cs プロジェクト: jsoques/openmiracle
        /// <summary>
        ///  Function to print  MaterialReceiptReport in curresponding Crystal report
        /// </summary>
        /// <param name="dsMaterialReceiptReport"></param>
        public void MaterialReceiptReportPrinting(DataSet dsMaterialReceiptReport)
        {
            try
            {
                crptMaterialReceiptReport crptMaterialReceiptReportObj = new crptMaterialReceiptReport();

                foreach (DataTable dtbl in dsMaterialReceiptReport.Tables)
                {
                    if (dtbl.TableName == "Table")
                    {
                        crptMaterialReceiptReportObj.Database.Tables["dtblCompanyReport"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table1")
                    {

                        crptMaterialReceiptReportObj.Database.Tables["dtblMaterialReceiptReport"].SetDataSource(dtbl);


                    }

                }

                this.crptViewer.ReportSource = crptMaterialReceiptReportObj;

                SettingsSP spSettings = new SettingsSP();
                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }

                else
                {
                    crptMaterialReceiptReportObj.PrintToPrinter(1, false, 0, 0);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("CRV15:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }