private void entirelistofbooks_Load(object sender, EventArgs e) { SQLiteConnection con; con = new SQLiteConnection("Data Source=./database/database.sqlite;datetimeformat = CurrentCulture;"); SQLiteDataAdapter da = new SQLiteDataAdapter("SELECT * from querybook", con); ReportDocument cr = new ReportDocument(); cr.Load(Application.StartupPath + "\\Report\\listofbooks.rpt"); viewDataSet ds = new viewDataSet(); try { da.Fill(ds.querybook); cr.SetDataSource(ds); } catch (Exception ex) { MessageBox.Show("Error" + ex); } crystalReportViewer1.ReportSource = cr; crystalReportViewer1.Refresh(); }
private void ReportDateWise_View__Load(object sender, EventArgs e) { SQLiteConnection con; con = new SQLiteConnection("Data Source=./database/database.sqlite;datetimeformat = CurrentCulture;"); ReportAuthorWise rptAuth = new ReportAuthorWise(); // MessageBox.Show("" + rptAuth.authorwiseParameter); SQLiteDataAdapter da = new SQLiteDataAdapter("select * from issue1 where issueddaate >= '" + combQuery + "' and issueddaate <= '" + combQuery2 + "'", con); ReportDocument cr = new ReportDocument(); cr.Load(Application.StartupPath + "\\Report\\bookissuance(datewise).rpt"); viewDataSet ds = new viewDataSet(); try { da.Fill(ds.issue1); cr.SetDataSource(ds); } catch (Exception ex) { MessageBox.Show("Error" + ex); } crystalReportViewer1.ReportSource = cr; crystalReportViewer1.Refresh(); }
private void ReportCupboardWise_View__Load(object sender, EventArgs e) { SQLiteConnection con; con = new SQLiteConnection("Data Source=./database/database.sqlite;datetimeformat = CurrentCulture;"); ReportAuthorWise rptAuth = new ReportAuthorWise(); // MessageBox.Show("" + rptAuth.authorwiseParameter); SQLiteDataAdapter da = new SQLiteDataAdapter("SELECT * from querybook where Regid='" + combQuery + "'", con); ReportDocument cr = new ReportDocument(); cr.Load(Application.StartupPath + "\\Report\\listofbooks.rpt"); viewDataSet ds = new viewDataSet(); try { da.Fill(ds.querybook); cr.SetDataSource(ds); } catch (Exception ex) { MessageBox.Show("Error" + ex); } crystalReportViewer1.ReportSource = cr; crystalReportViewer1.Refresh(); }
private void crysView_Load(object sender, EventArgs e) { SQLiteConnection con; con = new SQLiteConnection("Data Source=database.sqlite;datetimeformat = CurrentCulture;"); SQLiteDataAdapter da = new SQLiteDataAdapter("SELECT * from test3", con); ReportDocument cr = new ReportDocument(); //CrystalReport4 cr = new CrystalReport4(); cr.Load(Application.StartupPath + "\\Report\\CrystalReportas.rpt"); //string appPath = Application.StartupPath; //string reportPath = @"Report\CrystalReportas.rpt"; //cr.Load(appPath + reportPath); viewDataSet ds = new viewDataSet(); try { da.Fill(ds.test3); } catch (Exception ex) { MessageBox.Show("Error" + ex); } cr.SetDataSource(ds); crystalReportViewer1.ReportSource = cr; crystalReportViewer1.Refresh(); }