Query to Select based on Modular inputs in a Report

I’m trying to create a report that is tracking regulatory data. The database contains a row for the data that comes in roughly once every three seconds. There is one column in the table that is a Boolean indicator indicating whether a certain regulatory condition has been met. Since there is so much data in this table the operators want to be able to look at just the instances in which the condition failed. This is simple enough to do using just a WHERE clause. However, they also want to be able to go and look at the whole dataset to see the events leading up to the fail. In other words I want functionality to be able to select “failed” conditions, “passed” conditions, and both in the same table. I can’t seem to get the parameters in my report to output the correct data. I’m assuming I’m either missing something simple or that this just isn’t possible in the way I’m trying to do it. Any help is appreciated. Thanks.

I don’t know as its the best way to do it but if your just trying to change that one WHERE condition instead of using WHERE X = 0 couldn’t you do 2 parameters that are set by expression on the page you setup the report from. Using those two parameters you can do WHERE X BETWEEN Param1 AND Param2. Between 0 and 0 would be the same as Boolean 0. Between 1 and 1 would be the same as Boolean 1. Between 0 and 1 would show you both.

2 Likes

I never thought of that. That worked perfectly! Thanks!