Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

How to use Query Parameter based RDP report for Multi Join Query

$
0
0

Hi All,

I am trying to create a multiple data source queryattribute based RDP report. I have created query with two Data source SalesTable and CustInvoiceJour and I need to give selection range fromdate and Todate for CustInvoiceJour.InvoiceDate field.

For same I have created Contract class with fromdate and Todate Parm methods.

my question is that how can i add logic for CustInvoiceJour in Processreport method for range fromdate and two date. The dummy code is as below.

1) This is the query that i have created using multiple data source.

2)  The logic i have written in Process report is below :

public void processReport()
{
QueryRun queryRun;
Query query;

MZKRTGSContract contractSSRS;
AccountNum accountNum;
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;
query = this.parmQuery();

contractSSRS = this.parmDataContract() as MZKRTGSContract;
accountNum = contractSSRS.parmAccountNum();
// Add parameters to the query.
queryBuildDataSource = query.dataSourceTable(tablenum(SalesTable));
if(accountNum)
{
queryBuildRange = queryBuildDataSource.findRange(fieldnum(SalesTable, MZKAccountNum));
if (!queryBuildRange)
{
queryBuildRange = queryBuildDataSource.addRange(fieldnum(SalesTable, MZKAccountNum));
}
// If an account number has not been set, then use the parameter value to set it.
if(!queryBuildRange.value())
{
queryBuildRange.value(accountNum);
}
queryRun = new QueryRun(query);
while(queryRun.next())
{
rtgsTable = queryRun.get(tableNum(SalesTable));
this.insertIntoTemp(SalesTable,accountNum);
}
}
}

can anyone just write logic for the same.


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>