Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

RDP Class not working

(0) ShareShare
ReportReport
Posted on by 220

Hello,

So I have written the logic for getting all invoice line amount of all item IDs of a particular group for each day and displaying it in the SSRS. Please check the below code and advise where i went wrong as it is not throwing any error but the report is not even displaying the column names.

Please advise.

While (queryrun.next())
{
_TM_GLTable.clear();
_CustInvoiceTrans = queryrun.get(tableNum(CustInvoiceTrans));

_date = _FromDate;
_noOFDayes = _ToDate - _FromDate;
_totalamt =0;

for(i=1;i>=_noOfDayes;i++)

{

while select * from _inventItemGroupItem where _inventItemGroupItem.ItemGroupId == _ItemGroupId
{
select sum(LineAmount) from _custInvoiceTrans where _custInvoiceTrans.ItemId == _inventItemGroupItem.ItemId
&& _custInvoiceTrans.InvoiceDate == _date ;
_totalAmt += _custInvoiceTrans.LineAmount;

}
_TM_GLTable.initValue();
_TM_GLTable.InvoiceDate = _date;
_TM_GLTable.LineAmount= _totalAmt;
_TM_GLTable.insert();
_date = _date+1;

}


}

*This post is locked for comments

  • Suggested answer
    Dan Emreus Profile Picture
    1,162 on at
    RE: RDP Class not working

    Hi again,

    I think you should be able to achieve this.

    Create the query and then use it in Visual Studio. For the design create a new one and use the design of type Matrix. In Column grouping use ItemGroupid and for row grouping use invoice date.

    Done!

    Hope this helps.

    /Dan

  • Sherwin Profile Picture
    220 on at
    RE: RDP Class not working

    Hi Dan,

    yes that is the first option I had in my mind as well but my client doesnt want to include all line amounts and sum it up. He only wants the total invoice amount for all item IDs of an item group . So for each date only the aggregated amount must be shown as below. 

    6404.Capture1.PNG

  • Suggested answer
    Dan Emreus Profile Picture
    1,162 on at
    RE: RDP Class not working

    Hi Sherwin,

    If I should do such a report I am not sure that I would even use a rdp-class. I would simply create a new query where I joined CustInvoiceTrans with InventItemGroupItem and than use that query in the ssrs report. In Visual Studio you can create the grouping needed and and also add your totals.

    /Dan

  • Mea_ Profile Picture
    60,278 on at
    RE: RDP Class not working

    No one really knows what query are you using, if any data exists that meet selection criteria except you. 

    You probably need to debug this method and see where exactly your selects returns no data and try to figure out a reason.

  • Sherwin Profile Picture
    220 on at
    RE: RDP Class not working

    Hi ievgen,

    Thanks!

    Now it is displaying but the amount values are all zero

  • Verified answer
    Mea_ Profile Picture
    60,278 on at
    RE: RDP Class not working

    Did you try to debug ?

    Because this line 

    for(i=1;i>=_noOfDayes;i++)

    does not make sense for me, maybe you wanted to do

    for( i=1; i <= _noOfDayes; i++)  

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
shanawaz davood basha Profile Picture

shanawaz davood basha 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans