Get first record selected from multiselect grid and pass it to a report

Hi all,

I need to get the record i selected first from a multiselect grid of form.

Ex: from Transfer order form i select say TO: 18,20,21,19 in this order. Then i require to get TO:18 and its corr details.

I tried using InventTransferTable_ds.getFirst(1);

However it return the TO19 ie: one i selected latest. i want the first one.

Also i need to pass this TO no from form to class and to report. this report is called from class that extends RunBaseReport class.

Please guide for the same.

Thanks !

hi …

this is the code for multiselected records …

void clicked()
{
MultiselectProject Multiselect;
real i;
;

Multiselect = MultiselectProject_ds.getFirst(1,true);

while (Multiselect)
{
i += Multiselect.marks;
Multiselect = MultiselectProject_ds.getNext();
}
info(strfmt(“You selected student %1”,i));
}

Hi ,

Thanks for your reply but this does not give me the records in the order of my selection of records in the grid :frowning:

Hi ,

Override the “Enter” method of Grid and write the logic using Multiple flag ,where one flag is used at form level and other at table level using Table_ds.cursor() .

Verify if the solution meets your requirement.

:slight_smile: