report @selection_criteria parameter ignored in versions 2017-2018

SOLVED

Hi everyone:

I have a macro that prints invoices to preview destination ; in past versions I was selecting  what invoices are printed by changing the @Selection_criteria parameter and was able to print a particular invoice, group of invoices not in a range, invoices belonging to a particular customer , selection based on date etc.

In versions 2017-2018 the selection criteria parameter is ignored and it only prints based on the SORTFROM and SORTTO parameters.

However, if I record a macro the @SELECTION_CRITERIA line records .

In the example enclosed I expect that invoice IN0000000000058 will be printed as per the selection criteria but it prints IN0000000000058 to IN0000000000061 ( as per sort from - sort to)

Any suggestions? Any known changes to the way this parameter works in the new versions?

Thank you.

rpt.SetParam "SORTFROM", "IN0000000000058" ' Report parameter: 2
rpt.SetParam "SORTTO", "IN0000000000061" ' Report parameter: 3
rpt.SetParam "SWDELMETHOD", "3" ' Report parameter: 10
rpt.SetParam "SERIALLOTNUMBERS", "0" ' Report parameter: 14
rpt.SetParam "PRINTKIT", "0" ' Report parameter: 11
rpt.SetParam "PRINTBOM", "0" ' Report parameter: 12
rpt.SetParam "RETAINAGE", "0" ' Report parameter: 13
rpt.SetParam "@SELECTION_CRITERIA", "(({OEINVH.INVNUMBER} >= ""IN0000000000058"") AND ({OEINVH.INVNUMBER} <= ""IN0000000000058""))" ' Report parameter: 0