Solved

Grouping/Parameter Field issues - Crystal Reports 9

Posted on 2004-04-23
5
331 Views
Last Modified: 2012-06-21
I was tasked with creating a report for our company helpdesk.  This report is grouped by Completed and Pending tasks and filtered by a date range and location.  The date range works fine as does the grouping for Pending and Completed tasks.  The issue is in the filtering by Location.  Its not working correctly.  I will provide the Record selection code below:

{tasks.assndate} <= {?Date} and {tasks.location} = {?Location} and {tasks.status} = "Pending" or {tasks.status} = "Overdue"
or
{tasks.assndate} = {?Date} and {tasks.location} = {?Location} and {tasks.status} = "Completed"
or
{?Location} = "All" and {tasks.assndate} <= {?Date} and {tasks.status} = "Pending" or {tasks.status} = "Overdue"
or
{tasks.assndate} = {?Date} and {tasks.status} = "Completed"

Any help would be greatly appreciated!

AndyITsupport
0
Comment
Question by:AndyITsupport
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:Ken Turner
ID: 10900593
I suggest you try extensive use of brackets in your selection formula to make sure all the OR's and AND's are evaluated in the correct order.
0
 
LVL 2

Author Comment

by:AndyITsupport
ID: 10901013
Is there anyway to force evaluation in a specific order?
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 350 total points
ID: 10902605
Yes.  Use (  )

If my memory is correct AND is evaluated before OR.  So in your case

{tasks.assndate} <= {?Date} and {tasks.location} = {?Location} and {tasks.status} = "Pending" or {tasks.status} = "Overdue"
                                             1                                                2                                           8
or
9
{tasks.assndate} = {?Date} and {tasks.location} = {?Location} and {tasks.status} = "Completed"
                                           3                                                 4
or
10
{?Location} = "All" and {tasks.assndate} <= {?Date} and {tasks.status} = "Pending" or {tasks.status} = "Overdue"
                              5                                              6                                          11
or
12
{tasks.assndate} = {?Date} and {tasks.status} = "Completed"
                                           7


I think this is more what you want
(({tasks.assndate} <= {?Date} and {tasks.location} = {?Location}) and ({tasks.status} = "Pending" or {tasks.status} = "Overdue"))
or
({tasks.assndate} = {?Date} and {tasks.location} = {?Location} and {tasks.status} = "Completed")
or
(({?Location} = "All" and {tasks.assndate} <= {?Date}) and ({tasks.status} = "Pending" or {tasks.status} = "Overdue"))
or
({tasks.assndate} = {?Date} and {tasks.status} = "Completed")

mlmcc
0
 
LVL 2

Author Comment

by:AndyITsupport
ID: 10903137
Thanks for the help mlmcc!

I got it working.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 10905118
Glad I could help

mlmcc
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question