report 405 - necessary documentation

In this report, we have necessary documentation description. i dont know whether necessary document for items is a standard feature or a customization. the problem i face is that when i am taking this report, the necessary documentation for all of the items is printing ie: the link between item and doc is not taken into account.

the report 405 has necessary documentation as the last data item: with the following properties:

dataitemtable: necessary documentation item

dataitemtable view: sorting(itemno, necessary doc)

dataitemlinkreference : page loop

dataitemlink: undefined

and in the section: necessary documentation item body 2: the text box link to descripton of neccssary document table.

i think the link is absent between item and necessary documents, hence necessary documentation for all items is printing.

can anybody advice how to solve this.

amer ms,

Are you able to go to the Form where you enter the Necessary Documentation details. If so, go to that Form, and press “Shift+F8” this will open a small window listing the keys (sort order) for the record. Fomr this figure out what is the very first key. (Scroll to the top of the window).

Now look at this in relation to the data you see on the screen, and see if those fields make up a unique identifier. If not then look at other keys till you can see how to make the “Necessary Docuemnts” unique to the particular order. My guess is that its either by Itme No or by Order number.

What is happening here, is that in your report, you are not telling Navsion which “Necessary Docuemntation” lines need to be printed. This is becuase of two mistakes in the report:

1/ You are linking the Necessary Documentation" loop to the wrong Parent, you are linking to page counter, and it shoudl be either Sales Header or Sales Line, and
2/ You are not able to link and filter the correct lines because of 1/ above.

So lets solve 1, then look at 2.

i got your point, i was also thinking in the same direction . but your suggestions dont work. can you explain a bit more.

Not really [:(] I have absolutely no idea what “Necessary Documentation” is. Unless I know that, I can’t realy help you to put it on a report. Is it ralated to the items, or the customers, or the Sales Orders etc. How do you enter that data.

You could start by going to the object designer, adn look for the Necessary Documentation table, and see if its standard, a localization, an add on, or a customization. that would get us started.

It is really difficult to understand your question. Is Necessary Documentation a table you have added to the report? Can you be more specific in describing the actual data item names or give the table number.

Would be easy to help if it was more descriptive.

Thanks

i really dont know necessary documentation is a standard feature of navision or not. anyway, i will explain the situation:

  1. items are linked to necessary documentation texts. there are two tables related to necessary documenation:

nec doc (no, description)

nec doc item( itemno, no, descripton, created by , date)

in this way, each items is linked to certain documents. when we have a Purchase Order, these list of necessary documentation should be printed at the end of PO so that the vendor deliver these documents along with the item.

2 .now in the report 405: we nec doc item table as data item. the properties are:

dataitemtable: nec doc item

dataitemtableview : sorting(itemno, no)

dataitemlinkreference

dataitemlink : undefined.

dataitemvarname: nec doc item

  1. the OnAfterGetRecord of round loop code is as follows.
    IF (“Purchase Line”.Type = “Purchase Line”.Type::Item) THEN BEGIN
    rItem.GET(“Purchase Line”.“No.”);
    rNecessaryDoc.SETRANGE(rNecessaryDoc.“Item No.”,“Purchase Line”.“No.”);
    IF rNecessaryDoc.FIND(’-’) THEN
    REPEAT
    TempnecessaryDoc := rNecessaryDoc;
    TempnecessaryDoc.SETRANGE(TempnecessaryDoc.“Necessary doc.”,rNecessaryDoc.“Necessary doc.”);
    IF NOT TempnecessaryDoc.FIND(’-’) THEN
    TempnecessaryDoc.INSERT;
    TempnecessaryDoc.SETRANGE(TempnecessaryDoc.“Necessary doc.”);
    UNTIL rNecessaryDoc.NEXT = 0;

  2. the result of all this is that, when i print the PO the necessary documentation of all items is printed even though there is only one item in PO.

no help yet ! you guys can atleast give me idea on how to link the purchase line item to another table record which has a filed itemno. and display on the screen.

The ID number of the tables “nec doc” and “nec doc item” would tell. Anyway, by the look of the code I’d dare to say it’s customization.

How are the necessary documents entered in the system? Through the Item card? Or in the Purchase Order form? Can you see the necessary documents related to a PO line?

Is there any code in the OnPreDataItem trigger of this dataitem?

Is there any section for it?

Here I would add a line like this:

TempnecessaryDoc.SETRANGE(TempnecessaryDoc.“Item No.”,rNecessaryDoc.“Item No.”);

but I’m not sure this would solve your problem; actually I’m almost sure it would not.
You didn’t tell us on which table the variables TempnecessaryDoc and rNecessaryDoc are based (menu Show → C/AL Globals).

We need more information to even try to help you here. [:)]