Calculations in reports

As its been a while, i thought id better return! I have based a report of production order line in order to show any differences there is between planned and actual. I started the report to look at the remaining quanitity and filter <>0 so this gave everything not completed. Although working fine, there are some situations where we actaully overmake, and in these circumstances rather than being a - value, it is recorded as 0. (this is in the body, not footer) So i changed the report to a math box to calculate the remaining qty, and this does work ok (ie shows a minus etc), however, i am only interested in the report showing where the math field <>0. Under normal circumstances i would place a field on the request box, but of course this is not available. Is there anyway i can get the report to filter on this box? Also, is what will the link be in order to show the sales order number for the corresponding production order? thanks

Hi Mdma You may want to try the developer forum with this question. However, can you not set this filter on the dataitem section of the report? With an answer as poor as that you can see why you should ask developers! Also the link from production to the sales order will depend upon how you process it - do you create them back to back so the relationship exists in order tracking? I think you will need to look at the reservation entry table 337. That was a good non-answer [:D]

Hi Madma, and now the development answer, which do not take into account the functional recommendations by Steven [;)] There are 2 possibilities 1) you calculate your “math value” in the OnAfterGetRecord trigger of that specific dataitem and do a SKIP if the value is 0, this will leave the current record out of your report. IF math field = 0 THEN CurrReport.SKIP 2) You can add similar code to the OnPreSection trigger of the body section, to avoid printing lines with Math field = 0 CurrReport.SHOWOUTPUT(Math Field <> 0) I would recommend using solution 1, in the end the effect will be the same, though doing the SKIP as early as possible will improve the execution time. Saludos Nils

thanks for your replies! i was thinking about the currReport.SKIP, but i have only done that when the field is in a footer, rather than body. and as for reservation…grrr i hate that table (yes we do do order tracking)!!! but i have a look tomorrow at these. my current problem with this table is, that we have a number of items which we are “relabelling” (ie the same product but sold as different products!) As the product is already made, we are changing the components on the production order to use the product already made - which is fine. However, when we post the consumption we get a dreaded reservation entry problem (mainly bin number does not exist). I presume it is due to us trying to consume an item which isnt classed as a raw material! Also open orders / orders held on credit check etc over a Regen will ulitmately have a reservation error too - something that is usually picked up by the shipping dept (at 5am! :frowning: ) :smiley: