SQL expressions return one value only, not a set of values, and they do not accept parameters. I'm not sure why you would WANT to do this in a SQL expression. Why not just use a formula?
I didn't think I could, but sometimes there are workarounds so I wanted to ask ;-).
I did want to return the values of only one database field, but based on a condition.
So on the server, it might look like;
CASE WHEN "Fieldx" = "Yes" Then "Field1" END
I wanted "Fieldx" to be the value of a parameter answer (so it might be "Yes"="Yes"). It is possible with a command with a parameter but not using sql expressions.
As to the why, I was hoping it might help with my attempts at getting a subreport to group on server if the value came in the way I needed it, to be summed in a shared variable (I have that question pending in another thread766-1427480)
I did some testing though and summing the data in a database field in a shared variable didn't help, so doing this would be pointless. Thanks for the help though!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.