Re: Help with Formula please
Cant you use selection formula?
Re: Help with Formula please
Use the Select Expert.
For the first criteria ("OPMGR"."RECTYPE"='PK'), this is pretty simple. Select RECTYPE as the field. Select "is equal to" as the relationship. Enter PK as the value.
For the second criteria ("OPMGR"."CLOSEBY">={ts '2007-01-01 00:00:00'} AND "OPMGR"."CLOSEBY"<{ts '2009-01-02 00:00:00'}), select CLOSEBY as the field. Select "is between" as the relationship. Enter 2007-01-01 as the first value, and 2009-01-02 as the second value.
As for your third criteria, that's a little trickier. Well, your specific example isn't (incidentally, why isn't this just "STAGE <> '(Templates)'?). If you want to reference a subquery, there are two options. If it is a subquery of the current dataset, as yours is, you can create a SQL Expression, and use that in your formula (though, in general, I wouldn't recommend this). Otherwise, I would simply add the subquery to the SQL itself, either in the database if that's an option, or by using the Add Command function when setting up the data.