How was the join Report
Posted: Wed Jun 01, 2016 5:12 pm
Code: Select all
var query = from r in mydb.tblInvoices
join a in mydb.tblAddInvoices on r.invoice_ID equals a.invadd_invoiceID
join s in mydb.tblStores on a.invadd_storeID equals s.store_ID
join u in mydb.tblUsers on r.invoice_userID equals u.user_ID
where r.invoice_ID == Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value)
orderby r.invoice_ID descending
select new { r.invoice_ID, r.invoice_date, r.invoice_desc, r.invoice_off, r.invoice_tax, u.user_fullname, u.user_address, u.user_tell, s.store_name, a.invadd_price, a.invadd_qulity, a.invadd_stock, a.invadd_sumprice };
This is my code and LINQ multiple tables, but the report Join I'd had failed because only one table
Code: Select all
// show report
StiReport rep = new StiReport();
rep.Load(Application.StartupPath + "\\fatcktorprint2.mrt");
rep.Dictionary.Clear();
rep.RegData("tblInvoice", query);
rep.Dictionary.Synchronize();
rep.Compile();
rep.Show();