Hi Math,
Thanks a lot for the generous amount of info....
I have deleted the link from Company and tried the following on ReportSQL but I still couldn't get it working tho
SELECT
Company.coLogo,
Company.coName,
Company.coAddress,
Company.coPhone,
SaleInv.invDate,
SaleInv.invCode,
SaleInv.subTotal,
SaleInv.taxTotal,
SaleInv.grossTotal,
SaleInv.discount,
SaleInv.delivery,
SaleInv.InvTotal,
Customer.name,
Customer.surname,
SaleProduct.name,
SaleInvItem.Qty,
SaleInvItem.unitPrice,
SaleInvItem.netPrice,
SaleInvItem.taxAmt,
SaleInvItem.totalAmt
FROM
Company
INNER JOIN Company ON Company.id = SaleInv.id_Company,
SaleInv
INNER JOIN Customer ON Customer.id = SaleInv.id_Customer,
SaleProduct
INNER JOIN SaleInvItem ON SaleInvItem.id_SaleInv = SaleInv.id
AND SaleProduct.id = SaleInvItem.id_SaleProduct
Concerning "SaleTransHist" report, you don't see company fields because the link from and to this table are NULL : the link exists, it is referenced in both SaleInv and Company tables, but has no value on either sides.
Not clear on this one.
Now, before modifying you database structure, what do you mean by Company ?
It's user business-company, where they keep some company info such as tax and company registrations numbers etc beside co logo name address etc to use in reports and prints. i.e. if an invoice printed it'd have user's company logo, address, etc beside what's on inv form. It's not for recording any financial activity. It's mainly getting user company details on reports.
Project is a sample project, you can edit, change as you see fit to make it work.