Report Designer and the LOOKUP function

SOLVED
I have work in process report with the "JC-Transaction Record" as the primary record.  We are beginning to set up our jobs with the account prefix entered at the job category level.  I've figured out how to condition the report to include the costs by account prefix. 
 
However, we enter our contract schedule of values in the contract module and that is where the account prefix is entered for each SV item.  My issue is that the account prefix doesn't come over to job cost with the schedule of value data after it is entered.  So I need a way to access the account prefix in the CN module. 
 
To do this I wonder if I need to create an ASUM formula for the contract item amounts for my jobs based  on the account prefix field.  This field is located within the "CN - Contract Item Record" field list.  I believe this will require using a LOOKUP function formula (and maybe even a custom sort order) but I have been unable to properly write it. 
 
If anyone has any guidance on this I would appreciate it.
  • 0
    SUGGESTED

    You won't be able to accomplish your objective because of the database structure.  Contract items are linked to Job Cost at the Cost Code level, not the Category level.  Within Job Cost, the relationship between Cost Codes and Categories is a one-to-many relationship (each Cost Code can have multiple Categories). So there is no logical link between a Contract Item and any specific Category.

  • 0 in reply to Art Minds

    Thank you.  As a follow up if we were to set up our jobs at the cost code level would there be a way to pull the account prefix from CN?

  • 0
    verified answer

    The lookup would be possible if all contract items are assigned the same GL prefix and a prefix is entered at the Contract level on the contract.

    If the GL Prefix varies by contract item, it won't be possible to lookup the GL Prefix stored on the contract item on a report processing on the current.jct since the contract item would not be stored on the SV JC transaction as stated in previous replies.

    Hope this helps.

  • 0 in reply to Denise Paulus
    verified answer

    If the CN Contract Item is the driving record on a report, you can lookup any information from the linked JC Job and Cost Code.  But remember that it's possible to link multiple CN Contract Items to the same JC Job and Cost Code.  

  • 0 in reply to jtmcbrayer

    It would be helpful if you would provide further detail as to what you're trying to accomplish.  If I understand you correctly, you use a different GL Prefix in Job Cost for routing cost to your GL than the Prefix you use in Contracts for routing revenue to the GL.  Since the only connection between Contracts and Job Cost would be the CN Contract and CN Contract Item stored on the JC Cost Code record, you could create a formula for sorting your JC Transactions using the LOOKUP formula to reference the CN Contract and CN Contract Item stored the JC Cost Code record. I'm unsure whether you could then use the ASUM function to accumulate a specific total from the JC Transactions sorted by the CN Contract and CN Contract Item to then further use another LOOKUP function to pull amounts from the CN Contract Item file to include on your report.

  • 0 in reply to Art Minds

    I have an HVAC division and a plumbing division both performing work on one contract.  Instead of setting up separate job numbers for each division on this contract I am attempting to set up one job number and separate the billings and costs into these divisions based on the division prefix associated with the contract items and cost codes.

  • 0 in reply to jtmcbrayer

    Are you setting up your Sage 300 system for the first time? Some of these factors are really setup decisions.  You're Consultant or Sage Business Partner assisting with the setup would be most qualified to discuss the nuances of how your setup decisions affect your reporting options going forward.