|
-
Dec 13th, 2007, 11:20 PM
#1
Thread Starter
Junior Member
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
Last edited by 3nigm@; Dec 21st, 2007 at 04:04 AM.
-
Dec 20th, 2007, 05:08 PM
#2
Hyperactive Member
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*"
-
Dec 21st, 2007, 04:03 AM
#3
Thread Starter
Junior Member
Re: function Max() problem
thx chrissy for your help....but i've found my way out 
THREAD CLOSED
-
Dec 21st, 2007, 09:04 AM
#4
Lively Member
Re: function Max() problem
 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
Working in VB2005 and SQL2005
-
Dec 27th, 2007, 10:14 PM
#5
Thread Starter
Junior Member
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|