I have added a condition to only display the qty on hand if the binnum is not SHIP. This seems to work fine if there is one line, however, if there are multiple lines with only one SHIP binnum, it does not exclude that one line. Any ideas on why it is acting this way. Example shown below.
Hi Kyle - I am guessing that SSRS is evaluating your statement as false because the first value is not SHIP. I believe you would need code to loop through the binnum values and keep track of a variable to arrive at 40 in that scenario.
It’s not very slick, but something that might work… add a hidden table to the report that excludes the parts with binnum=SHIP, with an aggregate/sum field for the on hand qty. Then you can name that table field and reference it wherever you need in the report.
If you don’t want to see items from the SHIP bin, exclude it from the dataset in the first place (in the table filter in BAQ) rather than filter it out in a report expression.
If you want the option of choosing between including SHIP or not, same answer. Just have two filters (@IncludeShipParameter = true or BinNum <> ‘SHIP’)
Query Builder tab in BAQ Designer. Note the whole list of icons and tabs towards the bottom left of the screen. Use them to add a new “criteria” to your table. This works exactly like a WHERE clause in a SQL script.