View Full Version: I Cannot Figure This Out

LawsonTalk > Reporting (NEW!!) > I Cannot Figure This Out


Title: I Cannot Figure This Out
Description: REVIEW table


Mil0n023 - January 5, 2007 12:39 AM (GMT)
I wrote a Emp Review report some time back - but recently Siemens (kindly enough!) applied a CTP that moved some field to REVIEW table - from PAEMPLOYEE. Now my reports ar eall screwed up...

Here's the deal: In the form PA26, I have some people with there first sequence number (on the table) missing Next review date, and type, but has a Scheduled Date. Now, their second and/or third sequenced records have all the data filled out properly. The latest of the sequenced records is the most accurate - But my report is pulling, in what appears to be order. So I deleted the 1st record, my Next review Date gets pulled from Record 2, and the most recent should be from 3!! How do I get this on my report?

:werd:

cjmart - January 5, 2007 04:09 AM (GMT)
Create a formula where you evaluate the next review date field. Formula logic: If the next review date is blank/null set the value to a date like '01/01/1700', otherwise set the value to the next review data field. Insert a group on this new formula. Place your "detail" in the group footer of this new group. This will return the record with the most recent next review date, which I believe is what you are trying to accomplish.

Mil0n023 - January 5, 2007 04:14 PM (GMT)
Hey CJMART! Thanks - So I am interpreting this like:

if {REVIEW.NEXT_REVIEW} isnull then (1700, 01, 01, 00, 00, 00)
else {REVIEW.NEXT_REVIEW}

Not working? I'm not so hot at crystal...and today is my BDay!!

<_<

:afro:

Mil0n023 - January 5, 2007 04:59 PM (GMT)
Here is an object command that works for another report - I didnt build this - but how can I use this SQL as a formula in Crystal? This is getting the most recent:

(SELECT MIN(R.NEXT_REVIEW)
FROM LAWSON.REVIEW R
WHERE R.COMPANY = EMPLOYEE.COMPANY AND
R.EMPLOYEE = EMPLOYEE.EMPLOYEE AND
R.ACTUAL_DATE = (SELECT MAX(R4.ACTUAL_DATE)
FROM LAWSON.REVIEW R4
WHERE R4.COMPANY = EMPLOYEE.COMPANY AND
R4.EMPLOYEE = EMPLOYEE.EMPLOYEE )) AS NEXT_REVIEW_DATE,
(SELECT MIN(R2.NEXT_REV_CODE)
FROM LAWSON.REVIEW R2
WHERE R2.COMPANY = EMPLOYEE.COMPANY AND
R2.EMPLOYEE = EMPLOYEE.EMPLOYEE AND
R2.ACTUAL_DATE = (SELECT MAX(R3.ACTUAL_DATE)
FROM LAWSON.REVIEW R3
WHERE R3.COMPANY = EMPLOYEE.COMPANY AND
R3.EMPLOYEE = EMPLOYEE.EMPLOYEE )) AS NEXT_REVIEW_CODE
FROM LAWSON.EMPLOYEE EMPLOYEE

Mil0n023 - January 8, 2007 06:50 PM (GMT)
Is anyone experiencing the same problems with PA26 - after running hte PA702?

The table seems to be off...I am going nutz! :bonk: :bonk:

cjmart - January 12, 2007 04:27 AM (GMT)
I don't currently have access to a comparable environment to test this out. If/when I do, I'll try to follow up. Sorry...



Hosted for free by InvisionFree