Are conditions in queries handled different in reports?

Fabian Eschrich info at faesch.de
Wed Dec 18 03:11:02 CST 2013


Hi Sergey,

I recreated the report to make a sample for you and there it worked. No
Idea whats wrong with the old report.
Same grouping, same sorting but no data. Maybe the regions got damaged
somehow

Best regards

Fabian
> Sergey Pashkov <mailto:sergey_pashkov at valentina-db.com>
> 17. Dezember 2013 18:35
> Hi Fabian
>
> I can't reproduce such behavior in my report.
> Can you send your project, please?
> I have a db.
>
> Thank you.
>
>
> --
> Best regards,
> Sergey Pashkov
>
>
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
> Fabian Eschrich <mailto:info at faesch.de>
> 16. Dezember 2013 21:44
> Hi,
>
> I have a query with some conditions. This query returns 17 rows where
> products.categoryid IS NULL.
>
> SELECT
> transaction_items.id,
> transaction_items.article_id,
> transaction_items.productid,
> transaction_items.product,
> transaction_items.quantity,
> transaction_items.net,
> products.categoryid,
> product_categories.name,
> transactions.number,
> transactions.tdate,
> IF(productid IS NULL,transaction_items.id,productid) AS groupingid,
> IF(products.categoryid IS NULL,'Free
> Product',product_categories.name) AS categoryname
>
> FROM transaction_items
> JOIN transactions ON transaction_items.transactionid = transactions.id
> LEFT OUTER JOIN products ON transaction_items.productid = products.id
> left outer join product_categories on products.categoryid =
> product_categories.id
> where transactions.tdate >= $P(startdate) AND transactions.tdate <=
> $P(enddate)
> AND (transactions.`type` = 'invoice' OR transactions.`type` =
> 'creditmemo')
>
>
> But when I use this query for a report, these records are missing.
> When I add
>
> "AND products.categoryid IS NULL" to the query to filter only for these,
> the report is empty.
>
> Is the query handled in a different way when running in report?
> To test I made a quite simple report and added all information to the
> body. Nothing there.
>
> Best regards
>
> Fabian
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://lists.macserve.net/mailman/listinfo/valentina
>

-- 
Mit freundlichen Grüßen / best regards,
Fabian Eschrich
FAESCH Software
info at faesch.de
 
Fon:     +49 (0)371 334246-10
Fax:     +49 (0)371 334246-11
Skype:   feschrich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20131218/146cf886/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: compose-unknown-contact.jpg
Type: image/jpeg
Size: 770 bytes
Desc: not available
URL: <http://lists.macserve.net/pipermail/valentina/attachments/20131218/146cf886/attachment.jpg>


More information about the Valentina mailing list