예제 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            ReportLogin rpt = new ReportLogin();

            rpt.Site = this.Site;
            return(rpt);
        }
예제 #2
0
        private void btn_Print_Click(object sender, EventArgs e)
        {
            try
            {
                sqlConnect.Connect.Open();
                SqlDataAdapter sqlSearch = new SqlDataAdapter("SELECT * FROM TBLOGIN WHERE USERNAME = '******'", sqlConnect.Connect);
                DataSet        ds        = new DataSet();
                sqlSearch.SelectCommand.ExecuteNonQuery();
                sqlSearch.Fill(ds, "my_data");
                ReportLogin rpt = new ReportLogin();
                rpt.SetDataSource(ds);
                crystalReport.ReportSource = ds;

                sqlConnect.Connect.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }