I have a query that includes a logical field from a table. For the life of me, I can’t include a text string in my resulting report when the logical table field is true. Can someone walk me through the process. Thanks, Erik
And the query is:
And the text string is:
I prefer to do this in SQL before the report-generator works
SELECT "logical_table_field",
CASE
WHEN "logical_table_field"=TRUE THEN 'text string'
ELSE ''
END
AS inserted_string
FROM "table"
Obviously =TRUE should not be necessary.
Wanderer,
Thanks. Do I literally enter the string “inserted_string” after the AS?
I assume then, that when using this SQL, it is independent of the Query that generated the report? Erik
It doesn’t matter. Try Mickey_Mouse and see where it shows or omit the AS inserted_string
No, the case-statement should be part of that Query.
It is because of this that I asked above: how are you trying to insert the text string into the Report (?)
The text string should be a field of Report’s data source.
Or it can be a TextBox in the row:
[InsertedText] = “Your text”
As stated above, “inserted_string” is the alias (= a name) to identify the column that contains the text.
"text “string” is from the data source = @Wanderer’s query.
