how to create a web-i report with a prompt for "state name"...bet when ALL is selected then display all cities.
Posted on 2014-11-04
I am going to just use the eFashion universe here, because anyone can get that one. I am running BO XI R3. (soon to upgrade to BI 4.1)
I need to create a report that gets called by a .net web application and this report will need to prompt for input. For this dialog let's just say the report gets all cities by state with state being the filter. So for example, if I select California as my state, then I will get cities like: San Francisco and Los Angeles.
Here is where it gets tricky, I need to accept multiple values like: "Colorado, California", when "Colorado" is passed in, then I only want to see Colorado cities. This is easy, I just create a filter with "state" then set it to prompt....but then I need to accept a value like "ALL", and display all the cities for all the states. So when "ALL" or "0" is passed in then I want the report to ignore the filter.
In TSQL we get around this with something like this:
WHERE (0=@prompt OR STATE=@prompt)