Link fields of the same table

MarkReedaMarkReeda Member Posts: 12
Good morning everybody,

I'm developing a RDLC report (a Sale) and I'm stuck in linking rows of the same order: I will explain it more in details. I have a particular "function" that for specific articles in an order, will generate two additional rows connected to that line. For instance, let's call the article "article1"; when I insert this in an order, they are generated two rows (artDetails1 and artDetails2) linked to "article1".How could I reference the article? Simply with a field called "linked to line number". In substance, I have written this piece of code:


Tax.RESET;
Tax.SETRANGE(Tax."No.","Sales Line"."No.");
Tax.SETRANGE(Tax."Linked to Line No.","Sales Line"."Line No.");
IF Tax.FIND THEN;


Where "TAX" is the "Record Variable" that refers to Sales Line table. I'm trying to "link to the same table", I think the approach could be correct. Anyway, I cannot see any result.
What I would like to obtain is a report in which for all the lines of the "Sale Order" I have the article with its relative description contained in the rows "artDetails1 and artDetails2) .

Is anyone able to explain me how to proceed?


Thanks in advance

Best Answer

Answers

  • Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    It looks like you have duplicated the standard Extended Text functionality pretty much.

    The Extended text works by inserting sales lines with Type = '' after the line with the item for which extended text is generated. This way the extra description lines are visible naturally on all pages and reports.

    If your solution is different as it needs to keep some other details than just a description then you need to modify the report dataitem structure, insert your table a level down from the Sales Line, and link both tables there
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • MarkReedaMarkReeda Member Posts: 12
    Unfortunately I don't need simply a description, I should take some other "parameters" in the future. Then I cannot do what you suggested, 'cause I have the DataItem Sales Line, then at the same level an "Integer for the Loop" with all the fields. Where can I insert this new item? If you put this one level down the "loop" you'll receive the message that "the father should be a DataItem and not a Column"
  • MarkReedaMarkReeda Member Posts: 12
    Great Sir!! It works! Thank you very much!
  • krikikriki Member, Moderator Posts: 9,112
    [Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]

    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.