<div dir="ltr">Hi Fabian<div><br></div><div>I can't reproduce such behavior in my report.</div><div>Can you send your project, please?</div><div>I have a db.</div><div><br></div><div>Thank you.</div><div><br></div><div>
<br></div><div>--</div><div>Best regards,</div><div>Sergey Pashkov</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 16, 2013 at 10:44 PM, Fabian Eschrich <span dir="ltr"><<a href="mailto:info@faesch.de" target="_blank">info@faesch.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I have a query with some conditions. This query returns 17 rows where<br>
products.categoryid IS NULL.<br>
<br>
SELECT<br>
<a href="http://transaction_items.id" target="_blank">transaction_items.id</a>,<br>
transaction_items.article_id,<br>
transaction_items.productid,<br>
transaction_items.product,<br>
transaction_items.quantity,<br>
<a href="http://transaction_items.net" target="_blank">transaction_items.net</a>,<br>
products.categoryid,<br>
<a href="http://product_categories.name" target="_blank">product_categories.name</a>,<br>
transactions.number,<br>
transactions.tdate,<br>
IF(productid IS NULL,<a href="http://transaction_items.id" target="_blank">transaction_items.id</a>,productid) AS groupingid,<br>
IF(products.categoryid IS NULL,'Free<br>
Product',<a href="http://product_categories.name" target="_blank">product_categories.name</a>) AS categoryname<br>
<br>
FROM transaction_items<br>
JOIN transactions ON transaction_items.transactionid = <a href="http://transactions.id" target="_blank">transactions.id</a><br>
LEFT OUTER JOIN products ON transaction_items.productid = <a href="http://products.id" target="_blank">products.id</a><br>
left outer join product_categories on products.categoryid =<br>
<a href="http://product_categories.id" target="_blank">product_categories.id</a><br>
where transactions.tdate >= $P(startdate) AND transactions.tdate <=<br>
$P(enddate)<br>
AND (transactions.`type` = 'invoice' OR transactions.`type` = 'creditmemo')<br>
<br>
<br>
But when I use this query for a report, these records are missing.<br>
When I add<br>
<br>
"AND products.categoryid IS NULL" to the query to filter only for these,<br>
the report is empty.<br>
<br>
Is the query handled in a different way when running in report?<br>
To test I made a quite simple report and added all information to the<br>
body. Nothing there.<br>
<br>
Best regards<br>
<br>
Fabian<br>
_______________________________________________<br>
Valentina mailing list<br>
<a href="mailto:Valentina@lists.macserve.net">Valentina@lists.macserve.net</a><br>
<a href="http://lists.macserve.net/mailman/listinfo/valentina" target="_blank">http://lists.macserve.net/mailman/listinfo/valentina</a><br>
<br>
</blockquote></div><br></div>