>UPDATE: Ok, I made this work using a public variable - which I didn't like to do - but I would still like to understand it. I think it's because THIS is the DE, not the report itself. Is there any way to reference properties of the DE in an expression in the report?
>.
>.
>.
>I have this in the INIT of the DE of a report form:
>
>THIS.AddProperty('TotalCodes')
>* Run some SQL...
>THIS.TotalCodes = _TALLY
>
>Then this in an expression in the report:
>
>THIS.TotalCodes
>
>I'm getting an error when running the report that TotalCodes is not found. What am I doing wrong? I have other properties that work, though none that are expressions. Is it a scoping thing of some sort?
Probably this.DataEnvironment.myProperty. Did you try report variable? Long time ago when I faced similar problem I used public variables. You can also use _screen.AddProperty if you want and then remove them in Destroy.
If it's not broken, fix it until it is.
My Blog