Solved

Select Expert Sorting

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

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 101

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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

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