Crystal Reports Re-Sort

SUGGESTED

Howdy All,

We are using the Manufacturing Module within Sage 100 Advanced Manufacturing, and I am trying to figure out how to remedy a problem with Work Tickets. Here's what's happening:

We are in the chemical industry, and when I create a Work Ticket Template with multiple steps. Each of the steps are in order when I preview or print the work ticket. However, within the steps, the parts listed are out of order. Within each step, the parts need to be in the order they were entered in the Template, but are not. Now when I open the Work Ticket in Work Ticket Edit, the parts are in the correct order. But again, when I preview or print the ticket, the parts are in a random order. I presume it's a setting within Crystal Reports, but my knowledge of CR is pretty limited.

I've tried to look at the Section Expert to see if there is some guidance there, but nothing jumps out at me. Below are 2 screen shots to help illustrate.

Thanks in advance!

This is the correct order of the parts in Work Tickets Template Maintenance

This is the incorrect order while previewing the Work Ticket via Work Ticket Edit

  • 0
    SUGGESTED

    The picking sheet report uses the ItemGroup formula to determine the third level of sorting. 

    It should look like the following.

    If {@SortItemsByBinLocation} = "Y" then
        formula = {JT_WorkTicketWrk.BinLocation} & {JT_WorkTicketWrk.ItemCode}
    else
        formula = {JT_WorkTicketWrk.ItemCode}
    End If

    That If statement is evaluating the option seen below.

    If you want to completely override the sort order, you could just comment out the original formula and use the {JT_WorkTicketWrk.LineSeqNo} field so it would look like this.

    'If {@SortItemsByBinLocation} = "Y" then
    '    formula = {JT_WorkTicketWrk.BinLocation} & {JT_WorkTicketWrk.ItemCode}
    'else
    '    formula = {JT_WorkTicketWrk.ItemCode}
    'End If
    formula = {JT_WorkTicketWrk.LineSeqNo}

    If you want to retain the ability to sort by the bin location if the option is checked, then use the following.

    If {@SortItemsByBinLocation} = "Y" then
        formula = {JT_WorkTicketWrk.BinLocation} & {JT_WorkTicketWrk.ItemCode}
    else
    '    formula = {JT_WorkTicketWrk.ItemCode}
        formula = {JT_WorkTicketWrk.LineSeqNo}
    End If

  • 0 in reply to David Speck

    Hey David,

    Thanks for the information. If I were to apply this as a solution to the Work Ticket, what would I use instead of Bin Location? I can't find the equivalent module for 'Production Management Options' in Work Ticket Edit. I was looking for a module in 'Manufacturing' like the image you posted, that has a Forms menu option where you can affect the sort order within Crystal. I'm very new to supporting Sage. We just migrated our Mas90 deployment to Sage 100 and to be honest, nobody knew how to support Mas90, and I'm fumbling my way through Sage right now.

  • 0 in reply to j-fly

    Sorry, I misread your initial post and thought you were using Production Management.  If you're using Sage 100 Manufacturing, IIRC, they still use the SO_SalesOrderDetail table so the picking sheet can still use the LineSeqNo to control the grouping/sorting since that field is used to control the order in which items are displayed when on the Lines tab.  I do not however recall what the group/sort order looks like in the crystal report for that picking sheet so you will need to review those.  You can reply with a screenshot of the grouping/sorting if you want.

    This is an example of the Group Expert (Report > Group Expert).

  • 0 in reply to David Speck

    No worries! I just appreciate the help! Here are 2 screenshots. The first is of the Crystal Report that generates our Work Tickets. The circled item is the Group where each of the materials/parts are brought into the form. Those correspond to the lines in Work Ticket Template Maintenance.

    The second screenshot is the Group Expert layout. Hopefully this helps.

    Thank you again!

  • 0 in reply to j-fly

    It looks like your report has been customized quite a bit.  The 4th level is what is grouping on the item code and therefore sorting by the item code.  If you select it, you can click the Options button and then select a different field in the first drop down on the Common tab.  Look for the LineSeqNo under the JT_WorkTicketWrk table and replace the ItemCode field with it and then click OK.

  • 0 in reply to David Speck

    OK, very close! If I change ItemGroup to anything else it breaks the form. However, you are dead-on with the group that controls the sorting of the line items. When I keep the sorting as ItemGroup under the JT_WorticketWrk Table, and change the order to 'in original order' that did affect change. It still doesn't put the line items in the correct order though, so I'm thinking the sorting may have to be suppressed, or done with a function. Am I warm?

  • 0 in reply to j-fly

    I was using ItemGroup because that is what was in my report but your report has been customized beyond the standard group options.  If you use ItemGroup, it will use the standard formula i posted in earlier answers unless you modified it as i recommended to instead use the LineSeqNo.  If you don't want to use the ItemGroup formula in the 4th level of the Group Expert, you can instead try using LineSeqNo directly and see what happens.  Alhough based on what you said previously, i suspect you still may not get the desired results and this is likely due to the other customizations made and this starts getting complicated.