Пример #1
0
        private void crystalReportViewer1_Load(object sender, EventArgs e)
        {
            LibDataSet context = new LibDataSet();

            LibDataSetTableAdapters.BooksTableAdapter  b = new LibDataSetTableAdapters.BooksTableAdapter();
            LibDataSetTableAdapters.BorrowTableAdapter c = new LibDataSetTableAdapters.BorrowTableAdapter();
            b.Fill(context.Books);
            c.Fill(context.Borrow);

            BorrowReport cr1 = new BorrowReport();

            cr1.SetDataSource(context);
            crystalReportViewer1.ReportSource = cr1;
        }
Пример #2
0
        private void crystalReportViewer1_Load(object sender, EventArgs e)
        {
            LibDataSet context = new LibDataSet();

            LibDataSetTableAdapters.BooksTableAdapter  b = new LibDataSetTableAdapters.BooksTableAdapter();
            LibDataSetTableAdapters.BorrowTableAdapter c = new LibDataSetTableAdapters.BorrowTableAdapter();
            LibDataSetTableAdapters.MemberTableAdapter d = new LibDataSetTableAdapters.MemberTableAdapter();

            b.Fill(context.Books);
            c.Fill(context.Borrow);
            d.Fill(context.Member);
            receiptCrystalReport cr1 = new receiptCrystalReport();

            cr1.SetDataSource(context);
            crystalReportViewer1.ReportSource = cr1;
            ///
            /// select a transcation shown on the receipt
            ///
            crystalReportViewer1.SelectionFormula = "{Borrow.TransactionID} = " + TranID;
        }