Dynamic Variable Record Parameter

EL_TORRESEL_TORRES Member Posts: 4
edited 2009-02-20 in Navision Financials
How can I assign a subType value in runtime to a variable of DataType record I want to pass it as parameter value i want to use REPORT.RUNMODAL(Number,FALSE,TRUE,DataType Record with the name of the table i put in the parameter value)


example:

Function Codigo (_ReportID:Integer,Var TableNameID:Integer)
Var TableRecord DataType Record
Tablerecord SubType=TableName

Comments

  • ara3nara3n Member Posts: 9,256
    Oh, I wish that was possible. [-o<
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ara3nara3n Member Posts: 9,256
    Here is the closest that I've gotten.

    RunReport(ReportID : Integer;TableID : Integer)
    case TableID of
      27: myVariant := Item;
      //Add Huge case statement for all the tables.
    end;
    myRecordref.OPEN(TAbleID);
    myRecordref.SETRECFILTER;  //Add other filters using fieldRef
    myRecordref.SETTABLE(myVariant);
    REPORT.RUNMODAL(ReportID,false,false,myVariant);
    
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • BeliasBelias Member Posts: 2,998
    it's not possible with older versions of nav, recordref does not exist in financials..
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
Sign In or Register to comment.