简体   繁体   中英

Setting a filter on a data item but the filter is using another data item. COGNOS report Studio

One data Item is QoH (quantity on hand) There is also another data item stock location. The entire report has a prompt for stock location but for one field in my report I want the QoH just for a specific stock location. (no matter the prompt selection)

I was wondering how I can go about creating this custom filter. Thanks in advance and I hope I provided enough info. (Cognos Report Studio)

Based on your stated requirement, this isn't a filter, it's a data item.

Create a custom data item with an expression like this:

case
    when [Stock Location] = 'My specific stock location'
        then [QoH]
    else 0
end

I can improve my answer if you can provide a clearer description of your requirement and sample data.

Couple of ways

1) Master detail. Drop a list inside the list. Go to properties and select master detail Link by the key such as company, item, etc (without location).
Then for that detail query, filter for the specific location you want

2) Create a separate query just for just that stock location Join this to the main report query by the key (without location)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM