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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

No Data Showing in SSRS Report Using Temp Table in D365 F&O

(2) ShareShare
ReportReport
Posted on by 196

Hi all,

 

I'm creating a custom SSRS report in Dynamics 365 Finance and Operations, and my problem is that no data is showing when I run the report, even though the logic seems fine.

[SRSReportParameterAttribute(classStr(SalesReportContract))]
class SalesReportDP extends SRSReportDataProviderBase
{
    SalesReportTmp salesTmp;
    [SRSReportDataSetAttribute(tableStr(SalesReportTmp))]
    public SalesReportTmp getSalesTmp()
    {
        select salesTmp;
        return salesTmp;
    }
    public void processReport()
    {
        SalesTable salesTable;
        SalesLine salesLine;
        CustTable custTable;
        InventTable inventTable;
        while select salesTable
            join salesLine where salesLine.SalesId == salesTable.SalesId
            join custTable where custTable.AccountNum == salesTable.CustAccount
            join inventTable where inventTable.ItemId == salesLine.ItemId
        {
            salesTmp.clear();
            salesTmp.SalesId      = salesTable.SalesId;
            salesTmp.CustAccount  = salesTable.CustAccount;
            salesTmp.CustName     = custTable.name();
            salesTmp.ItemId       = salesLine.ItemId;
            salesTmp.Name         = inventTable.itemName();
            salesTmp.Qty          = salesLine.SalesQty;
            salesTmp.LineAmount   = salesLine.LineAmount;
            salesTmp.insert();
        }
    }
}
 
[DataContract]
class SalesReportContract
{
    TransDate fromDate, toDate;
    [DataMember]
    public TransDate parmFromDate(TransDate _fromDate = fromDate)
    {
        fromDate = _fromDate;
        return fromDate;
    }
    [DataMember]
    public TransDate parmToDate(TransDate _toDate = toDate)
    {
        toDate = _toDate;
        return toDate;
    }
}
Categories:
I have the same question (0)
  • Martin Dráb Profile Picture
    237,965 Most Valuable Professional on at
    You need to do some work on the bug isolation. Your code looks correct to me, but you still should verify that it inserts data to the table. Maybe you run it in a company with no orders.
     
    Then check the other possible reason: the data is generated just fine but the problem is in the report design.
  • Suggested answer
    udaY-ch Profile Picture
    5,133 on at
    Hi 
     
    These are the below steps i would do to validate the report data logic,
     
    1. Set the table property to 'Regular' - Changing the table’s property to Regular to check if the data is being stored correctly.
    2. Use hardcoded values for testing - Set hardcoded values both in the report design and during data insertion to verify that static values are printed correctly.
    3. Recreate the report design (if needed) - If the data is stored properly, consider recreating the report design to rule out any issues related to the layout or binding
     
    Thanks
    Uday
     
  • Komi Siabi Profile Picture
    13,109 Most Valuable Professional on at
    You have a contract class SalesReportContract and I can't see you using any of its parameters in processReport().

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 451 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 428 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 239 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans