Report to search from two table

sbillysbilly Member Posts: 231
I have two table "Archived Sales Header" and "Sales Header".
And I have an Order No, what I want that when I enter the Order No in the request form,the report will display if it is archived or not.
Thanks for help

Comments

  • vijay_gvijay_g Member Posts: 884
    Then what problem you are facing to achieve it?
  • sbillysbilly Member Posts: 231
    The problem I faced, is that I can do it only for the archived order or for the current Ordr but for both I can't.
    I don't how to setrange the Order No. in the sales Header and in the archived sales header.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    You can have both tables in the dataset of your report and based on where it is (Archived ot not) show the appropriate sections.

    Another solution is to create a "facade" report that is only catching the filters. If the order is archived you can move it back to a temporary instance of the sales header and Always use one report layout.

    Many ways to Rome...
  • AndwianAndwian Member Posts: 627
    To see if it has archived version:
    SalesHeader.CALCSUM("No. of Archived Version");
    IF SalesHeader."No. of Archived Version" > 0 THEN MESSAGE('has archives');
    
    Regards,
    Andwian
  • matttraxmatttrax Member Posts: 2,309
    Anwian is correct here.

    If you are looking for a solution to the filtering problem, though, there are at least two options. One is to use the GETFILTER command. It returns the filter that is set on a field in a table. You can use that return value as the filter for another field.

    You could also just create a global variable and put it on the request form of the report. Use that variable's value to set your filters.
Sign In or Register to comment.