How was the join Report

Stimulsoft Reports.NET discussion
Post Reply
loei
Posts: 2
Joined: Wed Jun 01, 2016 5:00 pm

How was the join Report

Post by loei »

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 };
Hi,

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();
How can all the tables were reports؟
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

Re: How was the join Report

Post by Jan »

Hello,

Please remove following line of the code:

Code: Select all

rep.Dictionary.Synchronize();
Let me know about results.

Thank you.
loei
Posts: 2
Joined: Wed Jun 01, 2016 5:00 pm

Re: How was the join Report

Post by loei »

Was fouled again
The name 'tblInvoice' does not exist in the current contextc:
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How was the join Report

Post by HighAley »

Hello.

Please, send us a sample project that reproduces the issue.

Thank you.
Post Reply