Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Payroll check deduction duplicating

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Running live payroll checks. The detail that prints on the face of the check is duplicating every line. The totals all add up correctly.

I've pulled queries from PRCheckTran and nothing is duplicated there. Looked at the check preview report and no duplication. Just the front of the check.

My first assumption is that there is a form issue; but our IT manager who manages those state that it is the same form that our other entity uses where no problems exist. And no form changes have occurred recently; and this is a new problem.

Anyone run into this issue previously?

Thanks,

*This post is locked for comments

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Payroll check deduction duplicating

    Wanted to follow up on the solution. It did end up being tied to multi-company. It was the muti check sub report because there were two entities in the same database using the same cash account.

    Thanks again for the help in troubleshooting.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Payroll check deduction duplicating

    Since we seem to be at a bit of a dead end here.  You indicated that payroll was set up for 2016 but no live payrolls we done until 2017.  If that is the case, we could trying deleting the 2016 records from the Deduction table (delete from deduction where calyr = 2016) and see if that has any effect.  Not holding a lot of hope on that but it would not harm anything to try.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Payroll check deduction duplicating

    Sorry, none of my clients run multi-company so my knowledge is limited here.  However, any table that can be shared under multi-company would have a cpnyid field (I suspect).  Given that the SQL query did not produce duplicates then I am thinking the multi-company is not a prime suspect.  Further, since the other companies do not use payroll, they would not be part of the issue anyways.

    So, the correctly working company is in its own database.  But, one the same server?  If so them the same report definition is being used by both entities which suggests the issue is not with the report definition but something in the database.  However, the SQL query eliminated that (or so it seems) so we are basically back at the beginning other than we have eliminated some of the potential causes.  SL uses Crystal Reports and Crystal Reports interfaces with the database through ODBC.  While I am hard pressed to see where ODBC could be the issue, we could use the ODBC Manager to delete that ODBC definition for the failing database and then run any SL report which will rebuild the ODBC definition and see if that has any effect.

    Payroll check issues are more difficult to resolve because they utilize PRCheckTran which only exists after payroll is calculated and before the checks are kept which means the issue can only be diagnosed in that window or if you are willing to create a dummy payroll check that you void at some point.  I am not sure where your payroll stands right now but, since you are able to run the SQL queries you have run, you are in that window with either the live payroll or a dummy check.  If it is the live payroll then I suspect you have a short time frame before you have to keep the checks and thereby lose the data we need.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Payroll check deduction duplicating

    Also....the other companies without a problem are on their own database. This company has multi-site turned on with some other smaller entities. Those other shared companies are not using payroll.

    In the multi site, is there an exclusion needed on the site...not sure if any of these tables are shared.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Payroll check deduction duplicating

    Same format, but this company is in a different database.

    Following is the selection; looks to include calyear from the deduction table:

    {Employee.CurrCheckCalc} <> 0 and

    {Employee.CurrNet} >=0 and

    Uppercase({Employee.Status}) = 'A' and

    {@MaskMode} = False and

    {Batch.Module} = 'PR' and

    Uppercase({PRCheckTran.Col1Type}) <> 'D' and

    ({Deduction.CalYr} = {@CalYr} OR {PRCheckTran.Col2Id} = '') and

    {PRCheckTran.ASID} = 0

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Payroll check deduction duplicating

    So, if the query is not showing duplicates then I agree the next focus is on the report definition.  Perhaps the filter in the definition is not checking the calyr field in the deduction table.  If you have Crystal reports loaded you could pull up the 02.630 report (assuming you are using laser check by employee ID format) and look at the filter definition for that report.  You can also look at the table joins using database expert and the link tab.

    You did not provide further detail on whether the working entity was using the same check format, was on the same system and was in the same database or not.  We may need to alter our approach based on that information.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Payroll check deduction duplicating

    Sorry, ignore that; you are right. It wasn't active then but there were 2016 rows in the deduction table....I added that criteria and the duplication disappeared....

    So I'm thinking it has to be the form?

    Thanks for all the support on this!

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Payroll check deduction duplicating

    We only started using SL in 2017; so there shouldn't be prior year records in there yet. Yea, I was trying to wrap my brain around why there would be two rows with identical information...but I ran a formula to see if they matched in case I was overlooking a difference and they are identical.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Payroll check deduction duplicating

    Your join looks correct (my initial query had the wrong field name in prtran for joining to deduction so good catch there).

    There has to be at least one field that is different in order for this query to duplicate records or something is wrong with the indexes on one of the tables involved (not likely but cannot rule that out).  We could use spHelp on each of the tables and look at the defined indexes on the table to see if they are correct but I would like you to look again for a different field content.  To help some, you could add some additional where conditions to select only one resident ID and one deduction ID so you have just those records in you results.

    You know, I am looking at the data source and links for the report and I just realized that the prchecktran table joins the deduction table by using the Col2Id field only but the deduction table has rows for each calendar year so now I am wondering why there would not be an issue when you have had payroll active for more than one calendar year.  It seems like that join would find records for more than 1 calendar year.  I then looked at the filter in the report and that adds where deduction.calyr=the calendar year of the check so that means, in order to emulate the report you would have to add to your where clause deduction.calyr=2017.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Payroll check deduction duplicating

    All fields between the two duplicated lines match...let me know if I messed up the joins:

    WHERE CalcChk.ChkSeq = PRCheckTran.ChkSeq AND CalcChk.EmpID = PRCheckTran.EmpId AND PRCheckTran.Col2Id = Deduction.DedId

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans