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

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
 private void btnreportforbank_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);
         rptSalaryStatementForOther cr1 = new rptSalaryStatementForOther();
         cr1.PrintOptions.PaperOrientation = PaperOrientation.Landscape;
         cr1.PrintOptions.PaperSize        = CrystalDecisions.Shared.PaperSize.PaperLetter;
         ds.WriteXmlSchema(@"" + Connection.GetAccessPathId() + @"Barcodes\a\SalaryStatementForOther.xsd");
         cr1.SetDataSource(ds);
         cr1.SetParameterValue("Month", new DateTime(Convert.ToInt16(cmbYear.Text), cmbMonth.SelectedIndex, 1));
         ShowAllReports s = new ShowAllReports();
         s.crystalReportViewer1.ReportSource = cr1;
         s.Show();
     }
     else
     {
         MessageBox.Show("Record Not Shown.\n\tPlease Select Month And Press Tab Key.");
     }
 }