getting data from different companies and show in one form

hacihaci Member Posts: 4
Hi All,
Can any body help me with this problem.

I must to do the following issue..

I must getting the info(data) from FORM (101) of each company and show in one FORM.

Is this possible in navision?
so yes, how?

](*,) greetings ](*,)

Comments

  • garakgarak Member Posts: 3,263
    I'm at home and i dont now wich table is the base for form 101 (not jet :-) ).

    For your problem:
    Variables:
    Company Record Company
    BaseTableofForm101 Record  BaseTableofForm101
    TempTab Record ---- a Table with an easy PK (fore example some entries)
    i Integer
    
    ----
    Company.reset;
    if company.find('-')  then begin //findset is sql (4.01)
      i := 0;  
      repeat
        BaseTableofForm101.reset;
        BaseTableofForm101.changecompany(Company.Name);
        BaseTableofForm101.setcurrentkey(Your fields if you need a special order);
        BaseTableofForm101.setrange(Your filters, if you need some);
        if BaseTableofForm101.find('-') then begin //findset if SQL (4.01)
          repeat
            i += 1;
            TempTab.init;
            TempTab."Primary Key field" := i;
            TempTab."An Text Field" := Company.Name;
            TempTab."Other Fields with the same Type you need" := "Your Fields from BaseTableofForm101";
            TempTab.insert;   
          until BaseTableofForm101.nexe = 0;
        end;
      until Company.next = 0;
    end;
    

    Than make a new Form based on TempTab. Input the Fields you have filled.

    Regards
    Do you make it right, it works too!
  • DenSterDenSter Member Posts: 8,307
    Form 101 is the Journal Templates form.

    The problem with that code (although it seems to do the trick of at least displaying the information) is that you have the data in a temp table, and you'd have to develop it further to make modification and data entry possible.
Sign In or Register to comment.