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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula Help

Status
Not open for further replies.

Hashiba14

MIS
May 14, 2007
29
US
I've been trying to get this report to work, but can't seem to grasp it. I'm using Crystal 10 and the main point is that I DO NOT want department 91500 to show up, but it keeps on.

Here is the code:
dme:pROD=PROD&FILE=PAPOSITION&_CMDTYPE=CGI&FIELD=DEPARTMENT;DESCRIPTION;EXEMPT-EMP;JOB-CODE;PAY-GRADE;POSITION;SCHEDULE;POSIT-STATUS;SHIFT;DEPARTMENT.DEPARTMENT;DEPARTMENT.NAME;END-DATE&SELECT=SCHEDULE%21%3DHISTORY%26POSIT-STATUS%3D1

dme:pROD=PROD&FILE=PABUDGET&_CMDTYPE=CGI&FIELD=AUTH-FTE;AUTH-HDCNT;AUTH-SALARY;BASE-AUTH-SAL;BASE-CURRENCY;BASE-ND;BASE-SALARY;CHG-REASON;COMPANY;CURRENCY-CODE;CURR-ND;DATE-STAMP;DEPARTMENT;EFFECT-DATE;END-DATE;FTE;HDCNT;JOB-CODE;POSITION;PROCESS-LEVEL;SALARY;TIME-STAMP;USER-ID

dme:pROD=PROD&FILE=EMPLOYEE&_CMDTYPE=CGI&FIELD=EMPLOYEE;EMP-STATUS;FULL-NAME;POSITION;USER-LEVEL;FTE-TOTAL&SELECT=EMP-STATUS%21%3DT%26EMP-STATUS%21%3DTP

and here is the select statement:

{Command.DEPARTMENT.DEPARTMENT} <> '91500' and
If {?REPORT-TYPE} = "BY DEPT" and {?ALL-INDIV} = "ALL DEPT" then true else

If {?REPORT-TYPE} = "BY DEPT" and {?ALL-INDIV} <> "ALL DEPT" then {?ALL-INDIV} = {Command.DEPARTMENT.DEPARTMENT} else


If {?REPORT-TYPE} = "BY JOB CODE" and {?ALL-INDIV} = "ALL JOB CODE" then true else

If {?REPORT-TYPE} = "BY JOB CODE" and {?ALL-INDIV} <> "ALL JOB CODE" then {?ALL-INDIV} = {Command.JOB-CODE} else


If {?REPORT-TYPE} = "BY SALGRADE" and {?ALL-INDIV} = "ALL SALGRADE" then true else

If {?REPORT-TYPE} = "BY SALGRADE" and {?ALL-INDIV} <> "ALL SALGRADE" then {?ALL-INDIV} = {Command.PAY-GRADE} and
Not ((not (isnull ({Command_1.EFFECT-DATE})) and not (isnull ({Command_1.END-DATE}))))

Any suggestions on what I'm doing wrong?
Thanks
 
Try setting off the clauses with parens, as in:

{Command.DEPARTMENT.DEPARTMENT} <> '91500' and

(
If {?REPORT-TYPE} = "BY DEPT" and
{?ALL-INDIV} = "ALL DEPT" then
true else
If {?REPORT-TYPE} = "BY DEPT" and
{?ALL-INDIV} <> "ALL DEPT" then
{?ALL-INDIV} = {Command.DEPARTMENT.DEPARTMENT}
else
If {?REPORT-TYPE} = "BY JOB CODE" and
{?ALL-INDIV} = "ALL JOB CODE" then
true else
If {?REPORT-TYPE} = "BY JOB CODE" and
{?ALL-INDIV} <> "ALL JOB CODE" then
{?ALL-INDIV} = {Command.JOB-CODE} else
If {?REPORT-TYPE} = "BY SALGRADE" and
{?ALL-INDIV} = "ALL SALGRADE" then
true else
If {?REPORT-TYPE} = "BY SALGRADE" and
{?ALL-INDIV} <> "ALL SALGRADE" then {?ALL-INDIV} = {Command.PAY-GRADE} and
Not (Not(isnull ({Command_1.EFFECT-DATE})) and
not (isnull ({Command_1.END-DATE})))
)

-LB
 
Nope, I tried that, but I still get the department 95100 showing up.
 
Is it 95100 or 91500? Note the value changed in your last post. I don't see how you could possibly be seeing this department with the above statement. Please post your exact select statement again.

-LB
 
Sorry, it was my type. That did do the trick.
Thanks for all the help.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top