Building Invoice Using CrystalReports
Posted on 2007-11-19
I've never worked with CrystalReports (2005) before, but I've done quite a bit of work with ASP/ASP.Net. Here's my situation. I've got an application almost completely developed using a 3-tier structure (interface, business layer, data layer). I need to now integrate CrystalReports for the purpose of printing an invoice. Basically, when the user views an invoice on the screen two functions are invoked from my BLL - GetInvoiceDetails and GetLineItems. The first one gets details such as who the customer is, the job it's for, the date, etc. GetLineItems, interestingly enough, gets all the line items for the invoice. Both take a parameter for the invoice ID from the query string. What I can't for the life of me figure out however is how to build a report using these two functions as the data sources. To provide a little more info, GetInvoiceDetails returns a custom 'Invoice' object, and GetLineItems returns a DataTable. I would love it if someone can give me some insight into how to do this, preferably with references and/or code samples. Thanks in advance!