using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CrystalDecisions.CrystalReports.Engine;

namespace Library
{
    public partial class frmBookReport : Form
    {
        public frmBookReport()
        {
            InitializeComponent();
        }

        private void frmBookReport_Load(object sender, EventArgs e)
        {
            Book b = new Book();
            DataTable dt = b.SelectForreport();

            ReportDocument rd = new ReportDocument();
            rd.Load("rptbook.rpt");
            rd.SetDataSource(dt);

            crystalReportViewer1.ReportSource = rd;
            crystalReportViewer1.Show();
        }
    }
}