Solved

Grouping/Parameter Field issues - Crystal Reports 9

Posted on 2004-04-23
5
282 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
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:Ken Turner
Comment Utility
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
Comment Utility
Is there anyway to force evaluation in a specific order?
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 350 total points
Comment Utility
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
Comment Utility
Thanks for the help mlmcc!

I got it working.
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
Glad I could help

mlmcc
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now