Solved

Select Expert Sorting

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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. …
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 …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 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