i have created a report which will display company info along with account number.
i want to display account number from different company grouped by account number and dimension.
so i write following query in fetch method but it showing data from only one company .
please help me to solve this. the query i have written is as follows
container company = [‘ceu’,‘cee’,‘cec’,‘dat’,‘ppt’,‘tst’]; //(define your list of companies)
while select crossCompany:company * from ledgerTrans group by AccountNum, Dimension
info(strfmt(’%1 - %2 - %3 - %4 %5’, ledgerTrans.dataAreaId, ledgerTrans.AccountNum, ledgerTrans.Dimension, ledgerTrans.Dimension, ledgerTrans.Dimension));
any help would be appreciated…
Have you tried by changing the query property Allow Cross Company to Yes…
thanks for reply
yes i have already made allowcrosscompany property to yes
but still its not showing data from only one company.
can you please help me…
Try by using the below code example
public boolean fetch()
QueryRun qr = new QueryRun(this);
QueryBuildDataSource qbds = qr.query().dataSourceTable(tablenum(LedgerTrans));
ledgerTrans = qr.getNo(1);
thanks for reply and code.
I tried with code you have given but still its not working.
I add more companies in range as follows
it is showing data from only current company not from cross companies.
It works for me, try to debug the code…
Thanks for reply.
I tried using following code.
its working for following code.
while select crosscompany ledgerTrans order by dataAreaId
group by accountnum,dimension,dimension,dimension,dataAreaId
I think problem was with dimension. so i tried dimension,dimension,dimension.
then it worked…
thanks for reply…