Exporting specific records in xml file using xmlport

Dear All,

I have a requirement wherein I have to generate an xml file while running quarterly excise report. Meaning whatever information is provided in the report request form only that data must get exported in the xml file via xmlport. Currently when I am calling the codeunit which creates the xml file through a report the xml file contains all the records from the table though the report shows only the filtered records. Please suggest a way to get the same records in the xml file as displayed on report.

Thanks in advance

Naval.

Hi Navel,

You can either set the SourceTableView property in the XmlPort or use the SETTABLEVIEW command when calling the XmlPort

Thanks DaveT,

For your suggestion. But when I went through the reference guide the syntax of the command suggested that the SETTABLEVIEW command is used only in forms,Reports and dataports. Moreover I am using Nav 5.0

regards,

Naval

Hi Navel,

It works fine. Declare your XMLPORT as a variable and then use

MyXmlPort.SETTABLEVIEW(MyFilteredRec);