Applies to: a report generated from the templates; the thread was posted in the Clarion 6 group and names no template chain.
Problem
A report has a prompt "Less Discount Amount:" next to a field. When the record's discount flag is 1 the poster wanted the field hidden, and asked which embed point takes the command.
Solution
- Put the code in the TakeRecord embed. Because a report has both a progress window and the report window, the code must tell Clarion which one it means, with SETTARGET:
SETTARGET(Report)
IF SomeJunk
?Control{Prop:Hide}=TRUE
ELSE
?Control{Prop:Hide}=FALSE
END
SETTARGET()
- Easier, a second poster said: put a local variable on the report instead of the control, and in TakeRecord set it to an empty string when the flag is set, otherwise to the value to print.
Caveats
- The second answer is only sketched in the thread; the value assigned in the ELSE branch was not shown.
- The original poster thanked both answerers and confirmed the first answer was what he needed; he called the second a good idea for next time.
Today (2026)
Likely unchanged: SETTARGET to the report before touching control properties is ordinary Clarion. Not re-tested.
Sources: Robert J. (Jan 2005, the question), Kingsley K., Steve P. (Jan 2005) in softvelocity.public.clarion6.