Hello everyone,
I am working on a SSRS report, data is from a copy of the query CustAccountStatement_FR and I have a colum named MainAccount which must display the main account of the transaction based on the SummaryLedgerDimension of the corresponding PostingProfile setup and I have a parameter named Main Account to filter the data.
In other terms, based on the posting profile of the transaction, I must get the SummaryLedgerDimension of CustLedgerAccounts.
if the parameter is not null, query must be updated with adding dataSources + links to reach this but I cannot seem be able to do it.
My report is not displaying any data...
Below is a screenshot for the original query (I just added a new range in my query)

this is the code I wrote :
qbds = queryRun.query().dataSourceTable(tablenum(CustTrans)).addDataSource(tablenum(CustLedgerAccounts));
qbds.addLink(fieldNum(CustTrans, PostingProfile), fieldNum(CustLedgerAccounts, PostingProfile));
qbds1 = queryRun.query().dataSourceTable(tablenum(CustLedgerAccounts)).addDataSource(tablenum(CustTable));
qbds1.addLink(fieldNum(CustTable, CustGroup), fieldNum(CustLedgerAccounts, Num));
qbds2 = queryRun.query().dataSourceTable(tablenum(CustLedgerAccounts)).addDataSource(tablenum(DimensionAttributeValueCombination));
qbds2.addLink(fieldNum(DimensionAttributeValueCombination, RecId), fieldNum(CustLedgerAccounts, SummaryLedgerDimension));
queryRun.query().dataSourceTable(tablenum(DimensionAttributeValueCombination)).addRange(fieldNum(DimensionAttributeValueCombination,DisplayValue)).value(mainAccountIdparam);
Thanks in advance!