public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            RequestedBooksRpt rpt = new RequestedBooksRpt();

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        private void requestedBooks_btn_Click(object sender, EventArgs e) //Generate report of Requested Books
        {
            var qryRequestedBooks = from x in ctx.BookRequesteds
                                    select new
            {
                x.RequestedBookTitle,
                x.RequestedBookAuthor,
                RequestedBookRemarks = x.RequestedBookRemarks ?? "",                         //replace null values of Remarks as empty string
            };

            RequestedBooksRpt crRB = new RequestedBooksRpt();

            crRB.SetDataSource(qryRequestedBooks);
            crystalReportViewer1.ReportSource = crRB;
        }