Coding problem on report

Hello,

I have created an ‘Item Type’ ‘field in Item Journal Line’ table with data type OptionString. Then I hv created a Report. Now I add this Item Type field in my report.There are several options for ‘Item Type’ field eg. Ink, Plate, Film, Chemical, Paper Roll, Scrap etc. But I need to show only Paper Roll and Scrap in my report. I hv already written a code within OnPreReport() trigger. I.e.

RecIJL.RESET;

RecIJL.SETFILTER(RecIJL.“Item Type”, ‘%1…’, RecIJL.“Item Type”::Paper Roll);

But I didn’t get the desired result. Can somebody help me??

Hi Rajat,

Change your code like below and check once.

RecIJL.SETFILTER(RecIJL.“Item Type”, ‘%1|%2’, RecIJL.“Item Type”::Paper Roll,RecIJL.“Item Type”::Scrap);

Thank You

Mahesh U

Raja,

Write your code on the OnPreDataItem instead of OnPreReport.

RecIJL.SETFILTER(“Item Type”, ‘%1|%2’, RecIJL.“Item Type”::Paper Roll,RecIJL.“Item Type”::Scrap);

Rajat,

Did this helped you or still having trouble on this?
Please let us know