Solved

Select Expert Sorting

Posted on 2012-04-11
3
316 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

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 …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

777 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