Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selection Formula Help

Status
Not open for further replies.

skystar70

Technical User
Nov 3, 2006
40
US
Hello.

I am on Crystal v 9.2. I having an issue with a selection formula which is a bit hard to describe.

First, here is my formula right now:

{s_work.extract_id} = {?ExtractID} and
{st_work_7.structure_name} = "$Plan" and
{st_work_7.depth} = 7 and
{s_work.structure_name} = "$Plan" and
not ({st_wbs66.description} in ["Cancel", "Other"]) and
{@Execution Stage} in ["Planning"] and
({@Planned or Actual Start Date} in Over90Days or {@PlanningStageComplete} in Date (1900,01,02) to Date (2008,10,27)) and
not ({st_wbs101.description} in ["Ongoing Support Activities"]) and
isnull ({custom_data.acesteercommrevdate})

The part where I am having trouble getting right is this section:

({@Planned or Actual Start Date} in Over90Days or {@PlanningStageComplete} in Date (1900,01,02) to Date (2008,10,27))

This is working as written, but I need to further refine to state that I DON'T WANT TO SEE records with a @PlanningStageComplete date greater than 10/27 AT ALL. I've done a few different things and it doesn't seem to work properly.

I hope this is clear.

Any ideas?

Thanks,
Skystar



 
Post the formula for @Planned or Actual Start Date
 
It's literally just a spit out of a field:

{custom_data.planstart}

After looking at this some more (my brain hurts) I think it has to do with blanks in the @PlanningStageComplete field. The formula for @PlanningStageComplete is:

If (isnull ({vw_WMS_Milestone_Steps_Planning_Complete.planning_code}) or
{vw_WMS_Milestone_Steps_Planning_Complete.planning_code} = "")
Then
date(1900,01,01)
else
date({vw_WMS_Milestone_Steps_Planning_Complete.milsone_date})

which appears to account for blanks and nulls. I get some records with the 1900 date, but I STILL get some records with nothing in this field - at least not visible to me. I don't know what is in this field for these records and why I can't account for them. Those records don't respond to null or blank and when I try to say to exclude everything greater than 10/27, the records with nothing in this field are excluded too.

Thanks,
Skystar
 
Okay, I tried something else which inexplicably works.
I went into Section Expert for the Details section and put in a suppress formula of
{@PlanningStageComplete} > Date (2008, 10, 29)

If I check the suppress box while this formula is in there, it suppresses all of the blanks along with the 10/30/08 date that I have out there. I ONLY wanted it to suppress the 10/30/08 dated record.

Here is the weird thing, I left the formula in the x.2 field and UNCHECKED Suppress and now the 10/30/08 is suppressed and the blank records are back - which is what I wanted, but this is unnerving because this seems like a bug. If the Suppress is UNCHECKED, it shouldn't be using the formula in x.2 at all, right?

Well, I guess I can use this for now since it works, but I'm going to have to keep a close eye on this one.

Unless someone can give me the RIGHT way to do this.

Thanks!

Skystar
 
Just add a clause to your record selection formula:

(
{@Planned or Actual Start Date} in Over90Days or {@PlanningStageComplete} in Date (1900,01,02) to Date (2008,10,27)
) and
{@PlanningStageComplete} < Date (2008, 10, 28)

Regarding the checkmark, conditional formulas override the status of the checkmark except when the formula does not execute. If the formula in the x+2 area does not execute because it hits a null, then the status of the checkbox will apply. For example, if your formula referred to a previous record, then on the first record it would not execute, because there is no previous record. If you had the check box checked, the first record would then be suppressed. I have found in most cases that it makes sense NOT to check the box when using a conditional formula in the formula area.

-LB
 
I want to suppress a sub report if there is no data and show the word "No Data" can this be done pls help emergency I am using verison 2008
 
taxibc-

Please start a new thread--your topic does not relate to the current thread.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top