I have a little challenge. I have a report that I declared a parameter called Department that has default values like this:
All Departments, Project, Field Service, Workshop, Warranty, Marine, Contract, Manufacturing.
Each department has database entry by which I grouped then in departments e.g
Field Service has [“JOB – EXT”, “JOB-AFMEXP”, “JOB-LUB/S”, “JOB-NBCMTU”,”JOB-ABB-AS”]
I have also enabled the “Allow Multiple Values” check box.
In my select expert, I have:
{command.Job Posting Group} in
switch(
{?Department} = "All Departments",["","JOB - EXT", "JOB-AFMEXP", "JOB-LUB/S", "JOB- NBCMTU","JOB-ABB-AS","JOB-CANPJB",
"JOB-INSTAL","JOB-CUMNS", "JOB-W/SHOP", "JOB-WS/GEN","JOB-WTY","JOB-MAR","JOB-S/AGR", "RENTAL"],
{?Department} = "Project",["JOB-INSTAL"],
{?Department} = "Field Service", ["JOB - EXT", "JOB-AFMEXP", "JOB-LUB/S", "JOB-NBCMTU","JOB-ABB-AS"],
{?Department} = "Workshop", ["JOB-CUMNS", "JOB-W/SHOP", "JOB-WS/GEN"],
{?Department} = "Warranty",["JOB-WTY"],
{?Department} = "Marine",["JOB-MAR"],
{?Department} = "Contract",["JOB-S/AGR"],
{?Department} = "Manufacturing",["JOB-CANPJB"]
)
The problem is that when I test this (with CR10 or on web), and I select multiple values, the thing does not show the values for the multiple values. It only works when I select a single department.
What should I do?
I toiled for a while b4 I came up with this solution (Thanks to some friends and Ryan who made me remember that switch wont work.):
I first created a parameter field called {?Department}, then wrote a function called {@Dept} like this:
I did not add an “All Dept” option to the formula. since I will do this programatically in the select expert like this: