Hi,
I want to run the inventory valuation report with predefined filters, i have created a table to store the filters of the report then created list page and kept one action button, which calls report with predefined report filters.
Item.SETRANGE("Item Category Code","Item Category Code");
Item.SETRANGE("Inventory Posting Group","Inventory Posting Group");
Item.SETRANGE("Replenishment System","Replenishment System");
REPORT.RUN(10139,TRUE,FALSE,Item);
The problem is Item Category code filter has more than 10 chars, like this
<>A1&<>A2&<>A3&<>A4&<>MA&<>MB&<>MF&<>EA&<>EE&<>EG&<>EH&<>EI&<>EK&<>EL&<>EU&<>EV&<>RP&<>CN
when i call the report i stuck with this error message
Microsoft Dynamics NAV
The length of the string is 89, but it must be less than or equal to 10 characters. Value: <>A1&<>A2&<>A3&<>A4&<>MA&<>MB&<>MF&<>EA&<>EE&<>EG&<>EH&<>EI&<>EK&<>EL&<>EU&<>EV&<>RP&<>CN
OK
I have able to run this report with this filter on the Request page directly, but how to handle this in code.
Can anybody help us on this.
Thanks,
Shyam Kumar N
Regards,
N.Shyam Kumar
0
Answers
Have you tried the follwing syntax (using SETFILTER and not SETRANGE) ?