Adding a date filter before running XML port

aliennavaliennav Member Posts: 449
Can anyone tell me that how we can add a date filter before exporting the data through XML Port?


I want to export only records based on certain date and I dont want to hard code it.

Comments

  • aliennavaliennav Member Posts: 449
    In other ways how to take input from the user?
    and then process the port according to that input.
  • joeymansonjoeymanson Member Posts: 13
    I have the same exact problem

    Hope someone will help us.. :mrgreen:

    Regards.
  • ara3nara3n Member Posts: 9,256
    Create a report and add the table that the user will filter on.

    Onprereport trigger copy the filter to a different variable and
    call
    xmlport.settableview(NewVariablewithFilters);
    xmlport.export
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • aliennavaliennav Member Posts: 449
    ara3n wrote:
    Create a report and add the table that the user will filter on.

    Onprereport trigger copy the filter to a different variable and
    call
    xmlport.settableview(NewVariablewithFilters);
    xmlport.export

    Thanx
  • ayansinhaayansinha Member Posts: 3
    I wrote this code to pass filters on aftergetrecord on the report:


    EFilingXMLPort.SETDESTINATION(TestStream);
    FIlterVendID := Vendid;
    EFilingXMLPort.InitVariables(FIlterVendID,ReturnPeriod,BranchCode,PayeeBranchCode);
    EFilingXMLPort.EXPORT;

    InitVariables is a function on my XMLPort(Var - EFilingXMLPort). Its a simple pass by reference where filters are passed on to XMLport, filters are applied, then that instance of xmlport is run.

    It Works fine. used SETTABLEVIEW - it didnt work!!
Sign In or Register to comment.