web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

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

(0) ShareShare
ReportReport
Posted on by 1,010

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.

2047.Query.PNG

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.

*This post is locked for comments

I have the same question (0)

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 39

#2
Michel ROY Profile Picture

Michel ROY 14

#3
imran ul haq Profile Picture

imran ul haq 8

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans