Target warehouse in stock entry

In below mentioned query report how can I filter the target warehouse in stock entry.
In stock entry source and target warehouse will be different for different items , I want to filter either source warehouse or target warehouse depending on item to be produced.
The condition warehouse=%(warehouse)s simply links to warehouse but not target warehouse.

As stock entry consists of two items, one input and one output, item appears two times in query report. How to set it to appear only once either input or output.

This can be achieved by using Report builder for the Stock entry.

Hope this helps.

Thanks ArundhatiS,

In above solution we have to mention the target warehouse is equal to or like, and report will be generated only for particular warehouse. But in my case target warehouse will be different for different item.

How to tell the report not to repeat the stock entry number more than once in its column.