Axapta Report: when i click select button on dialog and select ledger account number in query ,how to get that value in report so that i can apply filter depending on that value.

Hi

I want to create report ,for that i have created dialog ,in that dialog select button appears ,

When i click select button and when i select account number in that query window that number appears in dialog ,

now i want to display data related with that account number only.

So how to do that?

Thanks…

Hi Sunny,

first u need to add that field into the range then u can fetch record according to parameter.

Hi Sunny,

In Fetch method, you need to add the query, then add the datasource in querybuilddatasource and give the range in querybuildrange…

Hi EnriqueKevin06,

Thanks for reply ,

yes its working with the way you said…

thanks…

In fetch method i write following code…

Thats give me required result.

QueryRun queryRunCopy;

;

queryRunCopy = new QueryRun(this);

while (queryRunCopy.next())

{

if (SysReportRun::changed(queryRunCopy,tablenum(LedgerTable)))

{

ledgerTable = queryRunCopy.get(tablenum(LedgerTable));

}

}

Thanks to all who gave me help by replying

Hi,

Thank you for the reply Sunny…:slight_smile:

Regards,

Kevin

Hi Sunny, in my report From Date and To Date are added as DialogFields for which GetFromDialog etc etc are written for that and the code is running fine.

But like yours report i added some fields into Ranges in DataSources in report and tried to filter by selecting … but the report is not getting filtered.

Even i followed the same code you posted but failed to filter,where i had done the mistake ?

Please suggest me …

QueryRun queryRunCopy;

while (queryRunCopy.next())

{

ledgerTable = queryRunCopy.get(tablenum(LedgerTable));

while select LedgerTable order by LedgerTable .Date

where LedgerTable .Date >= fromDate && LedgerTable .Date <= toDate

{

if(! element.send(LedgerTable ))

{ return true; }

}

}

return true

}

Hi Satya ,

How are you dude. Can u just briefly explain what is ur query …

Regards,

Enrique (UBZ) Kevin