Skip to main content
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 83

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:
  • Komi Siabi Profile Picture
    12,946 Most Valuable Professional on at
    No Data Showing in SSRS Report Using Temp Table in D365 F&O
    You have a contract class SalesReportContract and I can't see you using any of its parameters in processReport().
  • Suggested answer
    udaY-ch Profile Picture
    5,042 on at
    No Data Showing in SSRS Report Using Temp Table in D365 F&O
    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
     
  • Martin Dráb Profile Picture
    234,712 Most Valuable Professional on at
    No Data Showing in SSRS Report Using Temp Table in D365 F&O
    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.

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

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

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

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 565

#2
Martin Dráb Profile Picture

Martin Dráb 536 Most Valuable Professional

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 402 Super User 2025 Season 1

Product updates

Dynamics 365 release plans