Reports completely blank if one one field is null? (1 Viewer)

ahmed_optom

Registered User.
Local time
Today, 12:46
Joined
Oct 27, 2016
Messages
93
Hello,

Im trying to create a report, which will detail a history of a client.

Some clients have purchasing history, some we just have their contact details. These are stored in separate tables.

When I make a report that contains anything from a table that the client does not have an entry from, the entire report is blank. Not just the fields that I would expect.

Eg in table clients, we have their contact data. This shows fine if I make a report that only displays information from this table. But if they do not have any entry in purchases table, then their report is completely blank.

Ideally, and what I was expecting , that if they had no purchase history, only those fields would be blank, and the contact information, which we do have, would be displayed.

Any ideas?
 

CJ_London

Super Moderator
Staff member
Local time
Today, 12:46
Joined
Feb 19, 2013
Messages
16,553
you need to use a LEFT JOIN between tblClients and tblPurchases. If you are using an INNER JOIN, the query will only return records where there is a match, so if there are no matching records in tblPurchases, nothing will be returned
 

ahmed_optom

Registered User.
Local time
Today, 12:46
Joined
Oct 27, 2016
Messages
93
thank you CJ.

I will now being investigating LEFT Joins :)
 

Users who are viewing this thread

Top Bottom