Hey Dude
First you have to fetch the records using Runnable class then map those field in your Electronic Report Mapping. Hope you understand. Have a look and if satisfied, mark this YES :
class RunnableClass1
{
public static void main(Args _args)
{
LegalEntity legalEntity = CompanyInfo::findRecId(CompanyInfo::current()).RecId;
info(strFmt("%1",legalEntity));
TaxRegistration taxRegistration;
TaxRegistrationType taxRegistrationType;
DirPartyTable dirPartyTable;
DirPartyLocation dirPartyLocation;
select * from dirPartyTable
where dirPartyTable.RecId == legalEntity;
select * from dirPartyLocation
where dirPartyLocation.Party == dirPartyTable.RecId;
while select taxRegistration
join taxRegistrationType
where taxRegistration.RecId ==taxRegistrationType.RecId && taxRegistration.dirPartyLocation == dirPartyLocation.RecId
{
info(strFmt("Registration Type: %1 and Registration Number: %2",taxRegistrationType.TaxRegstrationType,taxRegistration.RegistrationNumber));
}
}
}