Argument Passing REPORT.

I have created a form which will pass the table buffer as a argument to the report. The code i have written is as follows both the code on the form and the code on report init method.

The problem is that when i click the button the report opens with only 1 item where as there are more items with in this selected category why the report prints only first record can some one tell me the issue so that i can fix it.

Thanks.

FORM BUTTON CLICK METHOD:

select rboInventItemLabel where RBOInventItemLabel.CATEGORY == ‘Item Barcode’

if (rboInventItemLabel)
{
args.caller(element);
args.record(rboInventItemLabel);

CreateReportForLabelsMen.run(args);
}

REPORT INIT METHOD:

public void init()
{
super();

if(element.args().dataset() == tablenum(RBOInventItemLabel))
{
_rboInventItemLabel = element.args().record();

}
else
{
throw error("@RBO1364");
}
}

Hello,

I am not sure if it is possible to pass as parameter multimple records, but what I would do is pass the Item Barcode as prameter the and then do the query in the init method

FORM BUTTON CLICK METHOD:

if (rboInventItemLabel)
{
args.caller(element);
args.parm(Item Barcode);

CreateReportForLabelsMen.run(args);
}

REPORT INIT METHOD:

public void init()
{
super();

if(element.args().dataset() == tablenum(RBOInventItemLabel))
{

select _rboInventItemLabel where RBOInventItemLabel.CATEGORY == element.args().parm();

}
else
{
throw error("@RBO1364");
}
}

Regards!