Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Duplicate Records

Duplicate Records

Duplicate Records

I have created a form report and need to pull in the last 5 history rows from the JOB table.  Since a form report only shows one row of data I added the JOB table into the report 5 times, one for each history row. I have the Reports Effective Date set to None.
I am trying to translate the Reason Code.  So I figured that I would need to add the ACTN_REASON_TBL 5 times, one for each JOB table and because the JOB table is set to None I would need to create a selection criteria selection criteria to get the lastest information from the ACTN_REASON_TBL.  (SELECT MAX(ACTION2.EFFDT) FROM DEMO.PS_ACTN_REASON_TBL ACTION2 WHERE PS_ACTN_REASON_TBL = ACTION2.EFFDT)   Unfortunatly I am still getting multiple pages due to the multiple rows on the Action Reason table.  Does anyone have any suggestions?  Thanks!!!!

RE: Duplicate Records

Here's the solution:

Add the JOB table, but set the Effective Date Logic of the Report to "As of current date".  Then go into Selection Criteria and delete the line that sets the EFFDT of the JOB table to be the current date.  This is a good way to show history from a table without setting the effective date logic of the whole report to "None"  Then when you add the ACTN_REASON_TBL, it will automatically pull the most current description for the reason code.

By the way, if you were hard coding the logic yourself:

       EFFDT <= GETDATE()

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close