CLOSED : function Max() problem
Hi to all pros,
I'm new in crystal report. I'm trying to do something like below in Selection Formulas-Record Selection :
Code:
{Table1.AUDIT_ID}= Max({Table2.AUDIT_ID}) and {Table1.ERROR_MESSAGE} like "*Validation*"
but, i'm getting this error message "This formula cannot be used because it must be evaluated later"
Also, how can i perform distinct query in crystal report. I cant find it.
please help me if you know how to solve this. really appreciate it. thanks
Re: function Max() problem
I think instead of using
{Table1.AUDIT_ID}= Max({Table2.AUDIT_ID})
you need to use
{Table1.AUDIT_ID}= (SELECT Max({Table2.AUDIT_ID}) from ... where...) and {Table1.ERROR_MESSAGE} like "*Validation*"
Re: function Max() problem
thx chrissy for your help....but i've found my way out :)
THREAD CLOSED
Re: function Max() problem
Quote:
Originally Posted by 3nigm@
thx chrissy for your help....but i've found my way out :)
THREAD CLOSED
Could you share the solution so the rest of us can learn from your experiance please?
Thanks :thumb:
Re: CLOSED : function Max() problem
my pleasure :)
1. Just FYI, func Max() dont work in Selection Formula-Record Selection section, it works in other section such as Formula field
2. Instead of doing distinct and Max() in the Record Selection section, i just put the query in the Add Command section.
3. For those who dont know where to find the Add Command section, just open up the Database Expert, browse to your data source, instead of adding the tables to your report, pick the "Add Command" and there you go :)