Show records, that are not present in related table

michalkmichalk Member Posts: 43
Hello dear Mibusers ;)
I have table X which contains few document numbers which are (lets say) "confirmed"
Now I want to create list of documents which are not present in table X but are present in table Y (so the output should be these records from Y which are not present in X).
Is that possible to create such report without C/AL coding?

Regards
Michał

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Lets say

    Table A
    Doc X
    Doc Y
    Doc Z

    Table B
    Doc X

    Report result should be Doc Y and Doc Z..

    Is it?

    If yes, it is possible
    before that what you have tied so far?
  • michalkmichalk Member Posts: 43
    Hello - thank You for answer. It's exactly what I want.

    I was fooling around with setting dataitems and PRINT ONLY IF DETAIL option but with no luck

    Table A (PrintOnlyIfDetail=Yes)
    Table B (DataItemLinkReference = Table A/Document No.)

    It gives me PERFECT output but oposite to what I want ;)

    Now I'm trying to skip records which are found in both tables but it is with C/AL and I'm looking for most simple soultion possible.
  • mohana_cse06mohana_cse06 Member Posts: 5,504
    michalk wrote:
    Now I'm trying to skip records which are found in both tables but it is with C/AL and I'm looking for most simple soultion possible.
    this is possible with this only

    Something like
    Table B - OnAfterGetrecord
      TableA.RESET;
      TableA.SETRANGE("Document No.",TableB."Document No.");
      IF NOT TableA.ISEMPTY THEN
        CurrReport.SKIP;
    
  • michalkmichalk Member Posts: 43
    Thank You a lot for efford!

    Have nice day
    Michał
  • David_SingletonDavid_Singleton Member Posts: 5,479
    michalk wrote:
    Now I'm trying to skip records which are found in both tables but it is with C/AL and I'm looking for most simple soultion possible.
    this is possible with this only

    Something like
    Table B - OnAfterGetrecord
      TableA.RESET;
      TableA.SETRANGE("Document No.",TableB."Document No.");
      IF NOT TableA.ISEMPTY THEN
        CurrReport.SKIP;
    


    Why so complex? Why not just use a flowfield?
    David Singleton
Sign In or Register to comment.