Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

report only generated for some records - SOLVED

Locked
Tinka
Posts: 73
Joined: Mon Feb 24, 2014 2:58 pm

report only generated for some records - SOLVED

Unread post by Tinka »

Hi

Hopefully, someone can use this information. Please consider me still a bloody beginner in mysql, php and Javascript!

I have a "Print Record" button on my edit form, which runs a report nuPrintPDF('001') on the click event.

I had the problem that for some records the report looked fine, while for others it was empty (when not all db fields had a value). I first thought that the problem was in the generation of the temporary table or my php version (php 5.3.27). I changed some parameters in the .htaccess file as suggested here:

http://forums.nubuilder.cloud/viewtopic.p ... ort#p11827

But I found out that the error was in my sql query, where I had used INNER JOIN for a number of tables, like in the Edit form.

When changing this to LEFT JOIN it worked, because the right data gets selected.
Liked this illustration from http://stackoverflow.com/questions/5706 ... -full-join:
SQL JOIN.png
SQL JOIN.png (158.86 KiB) Viewed 3161 times
Thank you for continously developing and supporting users of NuBuilder!

Tinka
massiws
Posts: 503
Joined: Thu May 24, 2012 2:08 am
Location: Milan, Italy
Contact:

Re: report only generated for some records - SOLVED

Unread post by massiws »

.
Locked