Report design help

hairyjimhairyjim Member Posts: 99
edited 2004-02-23 in Navision Attain
Hi all,

*If it was not for this forum I'd be lost*

...to the point.

I need to create a report that details item sales by salesperson.

The general requirement is for a report that when run will show the quantities of individual items a saleperson has sold in a given time period (User defined).

Could people point me in the right direction with this please.

Thanks for all help that is given.
Give a man a fish and he will eat for a day, teach a man to fish and he will drink beer allday.

Comments

  • eromeineromein Member Posts: 589
    You could say this is a bit of a female dog...

    You will need to loop your Item Ledger Entries but as you maybe saw already, you don't have the saleperson in the Item Ledge entries.

    I would say, you'll have to create the field and transfer the right value. As you maybe know.

    Every Item ledge entry is made in codeunit 22. Codeunit 22 needs a record based on table 83. This record is create from codeunit 80 and 90. And probably from a lot of other places as well.

    To do so you will need to:

    Add the field to table 32
    Add the field to table 83
    Fill the new field in table 83 in the function "PostItemJnlLine" in Codeunit 80
    Fill the new field in table 32 in the function "InitItemLedgEntry" in Codeunit 22

    This should solve the missing field issue.

    Then create a new key in table 32 which contains the saleseprson field.

    Create a new report using the wizard, select the new key, set the grouping based on salesperson (and other fields you need to group on) and you should have the report you want.
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
  • hairyjimhairyjim Member Posts: 99
    I don't have access to the code units :(

    Hmmm - this does seem a female dog.
    Give a man a fish and he will eat for a day, teach a man to fish and he will drink beer allday.
  • eromeineromein Member Posts: 589
    Especially considering the time I spend posting the answer above. You should ask you solution center to make the field or buy a developers license.
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
  • hairyjimhairyjim Member Posts: 99
    Sorry Eromein,

    I did not realise it would require such work to complete what I thought to be a straight forward report.

    Jim
    Give a man a fish and he will eat for a day, teach a man to fish and he will drink beer allday.
  • Dean_AxonDean_Axon Member Posts: 193
    I Agree with emeil, that would be the IDEAL solution and your solution centre should be able to provide that for you quite easily, the only sticking point could be updating your historical data.....

    However, what about creating a flowfield ???

    Add the field "Salesperson" to the Item Ledger Entries Table (Table 32) and have it lookup to the customer table (table 18 ). the link for this is where the "Source No." in t32 is the same as the "No." in t18.

    You will more than likely need to filter on "Entry Type"=Sale and possibly create a new key with these fields defined in them otherwise the report will run FOREVER.

    Personally, I would go for the Solution centre option (but then I work for one so I'm baised :wink: )
    Remember: Keep it simple
  • hairyjimhairyjim Member Posts: 99
    Yeah the solution centre option would be my preferred option, but when we are charged a minimum of 1/2 day work it gets expensive for something I know would take 10 minutes.

    I keep a log of these things so in the next financial year I could try and justify the cost of the application developers license and perhaps a training course chucked in also ;)

    Jim
    Give a man a fish and he will eat for a day, teach a man to fish and he will drink beer allday.
  • eromeineromein Member Posts: 589
    Plus...

    You can not include flowfields in keys. So this means you can not group on flowfields using the standard Navision methode. You should program the group yourself.
    IF Previous Group <> Current Group THEN
      Print Group Headers  
      Print Group Totals
      Reset Group Totals
      Ect..
    End;
    
    Previous Group := Current Group;
    

    Np, of that previous post. I don't mind helping others. :lol:

    Btw, Dean Axon, You almost got my name right! :wink:
    "Real programmers don't comment their code.
    If it was hard to write, it should be hard to understand."
  • Dean_AxonDean_Axon Member Posts: 193
    Yeah the solution centre option would be my preferred option, but when we are charged a minimum of 1/2 day work it gets expensive for something I know would take 10 minutes

    I would estimate that the fix by Emiel would take about 1/2 a day anyway, and thats not me sticking up for another NSC. Try asking how much for the mod, update of the historical data AND the writing of the report. That MAY just help you justify the cost. :D
    Remember: Keep it simple
  • wonmowonmo Member Posts: 139
    The Sales Invoice Header table has a salesperson code already in it. Assuming that you are using the Sales Header table when taking sales all you have to do is create a report using the Salesperson/Purchaser table and link it then to the Sales Invoice Header which then links to the Sales Invoice Line tables. You don't need to restructure anything.

    Hope this helps.
  • hairyjimhairyjim Member Posts: 99
    I did it using the Item and value entry tables.

    The report looks right anyway. If the figures are wrong I am sure there will be a sales person or financial director knocking at my desk.

    Thanks guys.
    Give a man a fish and he will eat for a day, teach a man to fish and he will drink beer allday.
Sign In or Register to comment.