Hello everyone,
I created a dialog with 3 fields, all set to Multiple Select.
I find it complicated to construct the filter for the report but I managed to come up with this (and I'm sure there's a better/easier way)
theyear = ChosenYear.dump()
theyear = remove_blank_lines(theyear)
theyear = *for_each(x,"Yr_Rec = " + x,theyear)
psycho = ChosenPsycho.dump()
psycho = remove_blank_lines(psycho)
psycho = *for_each(p,"Psych_ID = " + quote(p),psycho)
vschool = ChosenSchool.dump()
vschool = remove_blank_lines(vschool)
vschool = *for_each(s,"School_Id = " + quote(s),vschool)
filter = (stritran(alltrim(invnum),crlf()," .or. "))
filter = "(" + filter + ")"
filter2 = (stritran(alltrim(psycho),crlf()," .or. "))
filter2 = "(" + filter2 + ")"
filter3 = (stritran(alltrim(vschool),crlf()," .or. "))
filter3 = "(" + filter3 + ")"
filter = filter + " .and. " + filter2 + " .and. " + filter3
So my question is (other than a better way of doing it) how do I allow the user to choose ALL of the schools, or years, or psychologists?
If I choose, say, a few of the schools by doing [click shift-click] then it works and I get multiple schools, if I choose all the schools I get an error of "incorrect data type". There are approx. 200 schools. I have tried choosing schools in groups of a-c, d-f etc to see if any of them were a problem but each group works fine, it's just when I multi-choose all of them.
So, how do I allow a user to choose ALL?
oh, I tried using an wildcard "*" but still to no avail.
Thanks
-John
I created a dialog with 3 fields, all set to Multiple Select.
I find it complicated to construct the filter for the report but I managed to come up with this (and I'm sure there's a better/easier way)
theyear = ChosenYear.dump()
theyear = remove_blank_lines(theyear)
theyear = *for_each(x,"Yr_Rec = " + x,theyear)
psycho = ChosenPsycho.dump()
psycho = remove_blank_lines(psycho)
psycho = *for_each(p,"Psych_ID = " + quote(p),psycho)
vschool = ChosenSchool.dump()
vschool = remove_blank_lines(vschool)
vschool = *for_each(s,"School_Id = " + quote(s),vschool)
filter = (stritran(alltrim(invnum),crlf()," .or. "))
filter = "(" + filter + ")"
filter2 = (stritran(alltrim(psycho),crlf()," .or. "))
filter2 = "(" + filter2 + ")"
filter3 = (stritran(alltrim(vschool),crlf()," .or. "))
filter3 = "(" + filter3 + ")"
filter = filter + " .and. " + filter2 + " .and. " + filter3
So my question is (other than a better way of doing it) how do I allow the user to choose ALL of the schools, or years, or psychologists?
If I choose, say, a few of the schools by doing [click shift-click] then it works and I get multiple schools, if I choose all the schools I get an error of "incorrect data type". There are approx. 200 schools. I have tried choosing schools in groups of a-c, d-f etc to see if any of them were a problem but each group works fine, it's just when I multi-choose all of them.
So, how do I allow a user to choose ALL?
oh, I tried using an wildcard "*" but still to no avail.
Thanks
-John
Comment