Solved

Select Expert Sorting

Posted on 2012-04-11
3
310 Views
Last Modified: 2012-04-11
I have a formula that get's 're-prioritized' after the report refreshes and doens't display what I'm expecting.  

My Record Selection Formula looks like this:

{aptp_view_time_cards.JobNumber} = {?JobNumber} and
{@EndDateOnly} = {?DateParam} and
{@StartDateOnly} = {?DateParam} and

If {?EmployeeName} = 'ALL' then
{empMain.firstname} like '*'
else {empMain.firstname} = {?EmployeeName}


And I don't get any errors.  However, when I refrsh the report, it displays more results that I anticipated.  Then when I go in and look at the formula it has changed to this:

If {?EmployeeName} = 'ALL' then
{empMain.firstname} like '*'
else {empMain.firstname} = {?EmployeeName} and
{aptp_view_time_cards.JobNumber} = {?JobNumber} and
{@EndDateOnly} = {?DateParam} and
{@StartDateOnly} = {?DateParam}

How do I prevent this from happening?
Labor-Report---with-Parameters-N.rpt
0
Comment
Question by:ITworks
  • 2
3 Comments
 
LVL 9

Assisted Solution

by:BlueYonder
BlueYonder earned 167 total points
ID: 37833417
The formula should be as below.  The like '*' is not required.

If {?EmployeeName} = 'ALL' then
{aptp_view_time_cards.JobNumber} = {?JobNumber} and
{@EndDateOnly} = {?DateParam} and
{@StartDateOnly} = {?DateParam}
else
{aptp_view_time_cards.JobNumber} = {?JobNumber} and
{@EndDateOnly} = {?DateParam} and
{@StartDateOnly} = {?DateParam} and
{empMain.firstname} = {?EmployeeName}
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 333 total points
ID: 37833458
Your version just needs ( )

{aptp_view_time_cards.JobNumber} = {?JobNumber} and
{@EndDateOnly} = {?DateParam} and
{@StartDateOnly} = {?DateParam} and
(
If {?EmployeeName} = 'ALL' then
{empMain.firstname} like '*'
else {empMain.firstname} = {?EmployeeName}
)

mlmcc
0
 
LVL 100

Assisted Solution

by:mlmcc
mlmcc earned 333 total points
ID: 37833464
Another way to do this is

{aptp_view_time_cards.JobNumber} = {?JobNumber} and
{@EndDateOnly} = {?DateParam} and
{@StartDateOnly} = {?DateParam} and
(
    {?EmployeeName} = 'ALL'  OR  {empMain.firstname} = {?EmployeeName}
)

mlmcc
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

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…
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 …
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 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

10 Experts available now in Live!

Get 1:1 Help Now