Report Selection

Hi,

In Report selection table I’m adding 2 new options in Usage field. And for this new option im selecting a report .

And in the CodeUnit Document print, in PrintSalesOrder funtion ,Im adding the following code

CASE Usage OF
Usage::“Order Confirmation”:
BEGIN
ReportSelection.SETRANGE(Usage,ReportSelection.Usage::“S.Order”);
MESSAGE(’%1’,ReportSelection.Usage);
END;
Usage::Item:
BEGIN
ReportSelection.SETRANGE(Usage,ReportSelection.Usage::“I.label2”);

END;

Usage::“Work Order”:
ReportSelection.SETRANGE(Usage,ReportSelection.Usage::“S.Work Order”);

;

In Sales order,Im adding a new menu Item in print and calling the above 1.

But Im getting the error there is no report selections within the filter.

But if i select any one of the existing options in the usage fields im getting the report.

Kindly Help.

I think after the filters there is no if condition

ReportSelection.FIND(’-’);

If you didnt have proper line existing in report selection table the above error message will come

Did you actually go to the Report Selection table and enter a record with the new Usage and Report ID? Did you fix the forms as well to go along with the new Usages?