Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Select Expert based on formula Post Reply Post New Topic
Author Message
althomas
Newbie
Newbie


Joined: 09 Nov 2010
Online Status: Offline
Posts: 36
Quote althomas Replybullet Topic: Select Expert based on formula
    Posted: 09 Mar 2011 at 4:31pm
I posted this message on data connectivity by accident.. reposting here
 
 
Hi,
 I am trying to create a "select expert" based on a formula to give me 2 different results based on the boolean.
 
My conception is like this:
 
if ({Option03}) = True then {jobdtl.jobcomplete} = true else if ({Option04}) = True then {jobdtl.jobClosed} = true else if
({Option03} and {Option04}) = True then ({jobdtl.jobcomplete} and {jobdtl.JobClosed}) = true
 
Basically i want it as:
 if Option03 is True then make Jobdtl.Jobcomplete True as well  or else
if Option04 is True then make Jobdtl.JobClosed True as well
else if both options are True then make Jobcomplete and jobclosed true.
 
Am i writing this properly? Any advise will be greatly appreciated...
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 10 Mar 2011 at 2:26am
Should this really be in the select expert? with the formula above it doesn't seem like you are trying to "select" information. Rather, it appears you wish to set values based on other values. Is this correct?
|< /\ '][' ( )
IP IP Logged
althomas
Newbie
Newbie


Joined: 09 Nov 2010
Online Status: Offline
Posts: 36
Quote althomas Replybullet Posted: 10 Mar 2011 at 2:35am
Thanks for the quick reply. Yes you're correct, i am trying to set the filter value based on an other value. Both are booleans. The first value would be a true/false check mark the operator selects on the program. There are 2 of these check marks (Job Completed & Job Closed). Based on which one they checked, i want the information to be filtered.
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 10 Mar 2011 at 3:20am
So if they only check Option03 then you only want to see records where Jobdtl.Jobcomplete is true? And likewise, if they only check Option04 then you only want to see records where Jobdtl.JobClosed is true? And if both are checked you want to see only those records where both Jobdtl.JobComplete AND Jobdtl.JobClosed are true? Or if they check both do you want to see where either Jobdtl.JobComplete OR Jobdtl.JobClosed are true?
 
Try this:
 
(({Option3}=True
and
{Option4=False)
and
{Jobdtl.JobComplete}=True)
 
or
 
(({Option3}=False
and
{Option4}=True)
and
{Jobdtl.JobClosed}=True)
 
or
 
(({Option3}=True
and
{Option4}=True)
and
({Jobdtl.JobComplete}=True
and
{Jobdtl.JobClosed}=True))


Edited by FrnhtGLI - 10 Mar 2011 at 3:20am
|< /\ '][' ( )
IP IP Logged
althomas
Newbie
Newbie


Joined: 09 Nov 2010
Online Status: Offline
Posts: 36
Quote althomas Replybullet Posted: 10 Mar 2011 at 3:24am
Hi,
 Do i enter this in the Select expert? I know that select expert uses all "AND" criteria. Also, i know if it needs to be changed then i would have to go into the SQL to change it to an OR.
Your formula looks logically good. I will enter it on the select expert and see what happens will let you know my results. Thanks again for your help....
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 10 Mar 2011 at 3:33am

Correct, Select Expert. When I said AND or OR, i wanted to know if they check both Option3 and Option4 if you want to see records only where Job Complete and Job Closed are true or if you wanted to display those records where Job Complete is True and Job Closed is False; Job Complete is False and Job Closed is True; Job Complete is True and Job Closed is True; and exclude those records where Job Complete is False and Job Closed is False.

|< /\ '][' ( )
IP IP Logged
althomas
Newbie
Newbie


Joined: 09 Nov 2010
Online Status: Offline
Posts: 36
Quote althomas Replybullet Posted: 15 Mar 2011 at 9:23am
Thank you so much... Your code worked perfectly.
 
Is there any way to copy and paste a finished report? Say, the report is done and i go into my database and run the report. The report shows up with a bunch of Job Numbers. I want to copy a job number from the report but i cannot use Cntrl+C or right click and copy?
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.078 seconds.