Notifications
Announcements
No record found.
I made a query based report n which the report should run for selected record only like P.O. confirmation report or invoice report..
Please suggest solution .
Regards
Nakul
*This post is locked for comments
Hi Nakul,
Seems impossible. You'd probably need to use RDP instead of AOT query as datasource.
Regards,
Dominic Lee
Hi Nakul
If a report have a query as datasource, you can override the method prePromptModifyContract of the controller class and handle the selected record like :
SalesTable salesTable;
QueryBuildDataSource qbdsTable;
salesTable = this.parmArgs().record() as SalesTable;
if (salesTable)
{
qbdsTable = this.getFirstQuery().dataSourceTable(tableNum(SalesTable));
qbdsTable.clearRanges();
SysQuery::findOrCreateRange(qbdsTable, fieldNum(SalesTable, SalesId)).value(queryValue(salesTable.SalesId));
}
You can also condition the "showQuerySelectButton" method as well.
You can return false if you have a selected record to avoid that user can changed the query.
Obviously, when you click the Output button compare a dialog form where you can set the print destination.
That's it!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Martin Dráb 4 Most Valuable Professional
Priya_K 4
MyDynamicsNAV 2