Passing value to XMLPort

mo_x
mo_x Member Posts: 50
Hi,

I'm trying to pass a date value to xmlport from a report. But the value is null when it reaches to the xmlport. I created a funktion setDate and populates it from the report. am i missing something?

Answers

  • lubost
    lubost Member Posts: 633
    What's your code in function in XMLPort and Report to pass date?
  • mo_x
    mo_x Member Posts: 50
    I have a setDate(localdate) function in XMLpor: SetDate(Date): GlobalDate = localDate. And i use globaldate on oninitXMLport. But the value is empty/null. on Report i just call myReport.setDate(Date) before xmlport starts. Do i need to do more?
  • lubost
    lubost Member Posts: 633
    OnInit trigger is called when XMLPort variable is instantiated, before you call SetDate function. If you really need date in OnInit trigger, you have to use singleinstance codeunit to store your date and xmlport should read this date (by calling function) ftom there.