report / dataitem layout

i am trying to work out a report, but having trouble :slight_smile: basically, what i need is a report on sales by salesperson. this i found can easily be achieved by looking a the value entries table. however, the salesperson in the value entries table is that recorded at point of sale. i need the report to show sales by current salesperson (ie to give an overall annual figure); so this would mean starting at the customer level and linking to the value entries - ok this appears to work, as i can select the customers with salesperson 1 and their value entries. The difficulty i am then faced with, is that we want the report for certain items (a field which can be chosen from the item table), however i am not sure as to how to bring this in? I presume i need to allocate the item table as a dataitem; (which i have done as level 3 indent) but i think that this is being called too late. Ideally i think, my layout would be customer > item > value entries but i can not link the item to the customer… is there way to do this, or will this be a job for the NSC?

I am NOT quite sure what you are looking for, but if you need to pass the item filter from the customer table to the value entry table, than you can create a new flow filter filed in the customer table. This field will have the table relation to the Item Table. In the report when you are linking your customer Table with the Value Entry Table, add one more filter for Item No. from the Value Entry with Item Filter. Now when you run the report, user can put there item filter and since this Item filter is linked with your value entry item, report will filter out for those item filters. Do you have the license to add a field to the table? (Do you have license for table designer?) if so than add a field in this 50000 range. If you do NOT have the license than its a job for NSC.

thanks for your reply. to summarise what i am actually after, is to report item sales by saleperson, but the report needs only to select a certain type of item (which we have classified in the item table) Looking at your reply, if i was to set this flow filter, then this would only enable the item no to be filtered? What i am actaully wanting to get at, is getting at a filter looking at the item card.

Hi What you can do is have ‘Item’ as the first Dataitem on the report with “No.” as a ReqFilterField. On the OnPreDataItem trigger you would have one line of code CurrReport.Break; This way the dataitem is only used for collecting any filters. Then on the “Value Entry”.OnPreDataItem a filter coded as such SETFILTER(“Item No.”,Item.GETFILTER(“No.”); This should help you on your way.

Hmm, “Item Sales by Salesperson”… To make all the links work in properties instead of code, you might want to consider this:

  • Salesperson
  • → Item(where Item has correct category; only print if detail…)
  • ----> Customer (where Salesperson Code = Code)
  • ------> Value Entries (where Item = No. and Customer = No.)

thanks for your comments. the less use of code the better i say (at my level!) :smiley: so going for Fritz ideas : set up the four data items as i require, but rather than linking the top to the second item, i add salesperson as a dataitem, but do not link it to anything. i indent “Item” by two places, and then link “as normal” have i understood this correctly. (its friday evening, so i cant try atm) thanks