Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            SalaryStatement rpt = new SalaryStatement();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
 private void btnSalaryStatement_Click(object sender, EventArgs e)
 {
     if (dataGridView1.RowCount > 0)
     {
         DataSet   ds = Connection.GetDataSet(" SELECT schoolname, schooladdress, affiliate_by, logoimage  FROM tbl_school");
         DataTable dt = Connection.GetDataTableFromDataGridView(dataGridView1);
         ds.Tables.Add(dt);
         SalaryStatement cr1 = new SalaryStatement();
         cr1.PrintOptions.PaperOrientation = PaperOrientation.Landscape;
         cr1.PrintOptions.PaperSize        = CrystalDecisions.Shared.PaperSize.PaperLetter;
         ds.WriteXmlSchema(@"" + Connection.GetAccessPathId() + @"Barcodes\a\SalaryStatement.xsd");
         cr1.SetDataSource(ds);
         ShowAllReports s = new ShowAllReports();
         s.crystalReportViewer1.ReportSource = cr1;
         s.Show();
     }
     else
     {
         MessageBox.Show("Record Not Shown.\n\tPlease Select Month And Press Tab Key.");
     }
 }