As part of a development task i have created a SSRS Report to create labels for a car key tag. In my project i have created the Contract Class, the Data Provider Class and the Controller class. Additionally, i have created the Temp table with all the necessary fields for the label. Then i created the report and added the dataset coming from the Data Provider class. This dataset contains 5 fields that will be displayed on my report for each record chosen on the UI. I created then the below precision design with a static field and 5 fields coming from the DP class. I don't have any row groups or column groups.

Then i built the project and deployed the report on my DEV environment. I tested it but i am facing a problem which i am unable to fix. Basically, if on F&O i select only 1 record the report is printed correctly on PDF and Word as below:

However, if i select more than 1 record i am still getting the same result of only showing 1 record (sometimes it's the first one and others it's the last one).
Do you have any idea of how i can surpass this issue and print in separate pages the Tag for each selected record?
Example:

Please find my DP class below:
/// <summary>
/// HERPrintLabelKeyTagDP
/// </summary>
[
SRSReportQueryAttribute(queryStr(HERPrintLabelKeyTag)),
SRSReportParameterAttribute(classStr(HERPrintLabelKeyTagContract))
]
public class HERPrintLabelKeyTagDP extends SrsReportDataProviderPreProcess
//SrsReportDataProviderBase
{
HERPrintLabelKeyTagContract contract;
public HERPrintLabelKeyTagTmp printLabelKeyTag;
/// <summary>
/// HERPrintLabelKeyTagTmp
/// </summary>
/// <returns>HERPrintLabelKeyTagTmp</returns>
[SRSReportDataSetAttribute(tablestr(HERPrintLabelKeyTagTmp))]
public HERPrintLabelKeyTagTmp getTmpTable()
{
select printLabelKeyTag;
return printLabelKeyTag;
}
/// <summary>
/// insertTmpTable
/// </summary>
/// <param name = "_amDeviceId">_amDeviceIds</param>
private void insertTmpTable(AMDeviceId _amDeviceId)
{
AMDeviceTable amDeviceTable;
AMDeviceTableMaster amDeviceTableMaster;
AMRentDevice amRentDevice;
AMDeviceFuel amDeviceFuel;
AMDeviceTransmission amDeviceTransmission;
//HERPrintLabelKeyTagTmp printLabelKeyTag;
select firstonly amDeviceTable
where amDeviceTable.DeviceId == _amDeviceId
join amDeviceTableMaster
where amDeviceTableMaster.MasterId == amDeviceTable.MasterId;
if (amDeviceTable)
{
select firstonly amRentDevice
where amRentDevice.DeviceId == amDeviceTable.DeviceId;
}
if (amDeviceTableMaster)
{
select firstonly amDeviceFuel
where amDeviceFuel.FuelId == amDeviceTableMaster.FuelId;
select firstonly amDeviceTransmission
where amDeviceTransmission.TransmissionId == amDeviceTableMaster.TransmissionId;
}
ttsbegin;
printLabelKeyTag.clear();
printLabelKeyTag.UnitNumber = amDeviceTable.HERUnitNumber;
printLabelKeyTag.ModelId = amDeviceTableMaster.DeviceName;
printLabelKeyTag.FuellDescription = amDeviceFuel.Description;
printLabelKeyTag.DriveTrainId = amDeviceTableMaster.DriveTrainId;
printLabelKeyTag.TransmissionDescription = amDeviceTransmission.Description;
printLabelKeyTag.RegistrationNumber = amDeviceTableMaster.RegistrationNumber;
printLabelKeyTag.Colour = amDeviceTableMaster.ExteriorId;
printLabelKeyTag.BrandId = amDeviceTableMaster.BrandId;
printLabelKeyTag.ClassId = amRentDevice.ClassId;
printLabelKeyTag.HERSnowSock = amDeviceTableMaster.HERSnowSock;
printLabelKeyTag.insert();
ttscommit;
}
public void setTableConnections()
{
printLabelKeyTag.setConnection(this.parmUserConnection());
}
/// <summary>
/// Process report data.
/// </summary>
public void processReport()
{
AMDeviceTable amdeviceTable;
List list = new List(Types::String);
Query queryDeviceId;
QueryRun queryRunDeviceId;
QueryBuildDataSource qbdsDeviceId;
ListIterator deviceIdListIterator;
contract = this.parmDataContract() as HERPrintLabelKeyTagContract;
list = contract.parmDeviceId();
if(list != null)
{
deviceIdListIterator = new ListIterator(list);
queryDeviceId = new Query(queryStr(HERPrintLabelKeyTag));
qbdsDeviceId = queryDeviceId.dataSourceTable(tableNum(AMDeviceTable));
while(deviceIdListIterator.more())
{
//qbdsDeviceId.clearRanges();
qbdsDeviceId.addRange(fieldNum(AMDeviceTable, DeviceId)).value(deviceIdListIterator.value());
deviceIdListIterator.next();
}
queryRunDeviceId = new QueryRun(queryDeviceId);
while(queryRunDeviceId.next())
{
amdeviceTable = queryRunDeviceId.get(tableNum(AMDeviceTable));
this.insertTmpTable(amdeviceTable.deviceId);
}
}
}
}