Passing Dates in a report

stevo_300stevo_300 Member Posts: 7
Hello All,

I am trying to pass the 'Date filter' Field from the Item table into a SETFILTER record variable of the Sales Line table.

Is this possible?

Basically I am trying to dynamically specify a date range on the filters for the record variable (field - "Shipment Date") but am having trouble as I don't really want to create a Sales Line section when I can do the job cleanly using a record variable.

I tried

Sales.SETFILTER("Shipment Date",'Item."Date Filter"')

and also

Sales.SETFILTER("Shipment Date",Item."Date Filter")

However both don't work. I'm thinking that possibly trying to pass the Date Filter could be the wrong way around this problem however has been the way I have been looking.

Kind Regards

Steve

Comments

  • SPost29SPost29 Member Posts: 148
    check out copyfilter in the help

    Copies the filter that has been set for one field and applies it to another field.


    Record.COPYFILTER(FromField, ToRecord.ToField)



    steve
  • sendohsendoh Member Posts: 207
    use the getfilter

    Sales.setfilter("Shipment Date",Item.getfilter("Date filter");
    Sendoh
    be smart before being a clever.
  • stevo_300stevo_300 Member Posts: 7
    sendoh wrote:
    use the getfilter

    Sales.setfilter("Shipment Date",Item.getfilter("Date filter");

    Thankyou, This worked perfectly
Sign In or Register to comment.