Retrieve filters entered on a dialog box

In AX2009 for standard reports, we can filter the report via Select button and passing the required values.

I want to display those values on my report. How do I retrieve them ?

use ssrs report and give the parameter and filter criteria in that

We dont have SSRS installed, so i am left with standard report :slight_smile:

then you can use dialog at the time of report generation …

got it

this.queryRun().query().dataSourceTable(tableNum()).findRange(fieldNum(, <Your_Division_FieldName>)).value()

You can get the query by simply calling element.query() in your report. By the way, look at printQueryRanges() method in LedgerBalanceSheetDimPrint report.


i tried element.query().toString()

it returns "Query Query Object " how do i get that value on a display method ?

Why don’t you simple look to the method I mentioned? It’s all already there.

void printQueryRanges(
    Query   _query,
    boolean _showEmpty = true
    TmpSysQuery             tmpSysQuery;
    int                     dataSourceCnt;
    int                     i;
    int                     j;
    int                     rangeCnt;
    QueryBuildDataSource    queryBuildDataSource;
    QueryBuildRange         queryBuildRange;

    dataSourceCnt   = _query.dataSourceCount();
    for(i = 1; i <= dataSourceCnt; i++)
        queryBuildDataSource = _query.dataSourceNo(i);
        rangeCnt             = queryBuildDataSource.rangeCount();
        for(j=1; j <= rangeCnt; j++)
            queryBuildRange                         = queryBuildDataSource.range(j);

            tmpSysQuery.Tablelabel                  =  TmpSysTableField::tableLabel(queryBuildDataSource.table());
            tmpSysQuery.FieldLabel                  =  TmpSysTableField::fieldLabel(queryBuildDataSource.table(),queryBuildRange.field());
            tmpSysQuery.RangeValue                  =  queryBuildRange.value();

            if (_showEmpty || tmpSysQuery.RangeValue != '')