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

Notifications

Announcements

Community site session details

Community site session details

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

Matrix report values are disturbed when I run report with a blank parameter. How to fix?

(0) ShareShare
ReportReport
Posted on by 226
Hi everyone,
I have been working on a report recently with a two parameters /Quotation id/ from quotation table and /Warehouse/ from warehouse from Invent sum with range of (0 or 1) either with a value or null value.
 
So getting o the point reports works fine when i run it on //quotation id / parameter. when i run it with the /Warehouse/ parameter with a value (w6001)in it it works fine the /available physical quantity in warehouse (w6001) from invent sum is calculated accurate / but when i pass null value to /warehouse/ the available physical amount is disturbed.
in simple when I run report for a specific warehouse it is working fine.
I am using this code logic through which available physical quantity is being filled up.
​//This is used to store available physical from inventsum on basis of warehouse.   while   select   * from inventSum     where   inventSum.ItemId            == stockQuotationTmp.ItemId     && inventSum.InventLocationId       == stockQuotationTmp.WareHouse          {           stockQuotationTmp.NetAmount      += inventSum.AvailPhysical;       }​
 
for you reference i have attached visuals.
this is working fine with quantity:
//////
this is not working fine when i pass null (which means available physical from all the warehouses should be displayed) you can have refrence from warehouse /w6001/
//////
any guidence?
 
 
 
I have the same question (0)
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,765 Super User 2026 Season 1 on at
    Hi
     
    you can use a query
    e.g.
            Query                               query = new Query();
            QueryBuildDataSource                qbds;
            QueryBuildRange                     qbrItem, qbrWareHouse;
    
            qbds                                = query.addDataSource(tableNum(inventSum));
            if(stockQuotationTmp.ItemId  )
            {
                qbrItem                             = qbds.addRange(fieldNum(inventSum, ItemId));
                qbrItem.value(SysQuery::value(stockQuotationTmp.ItemId));
            }
            if(stockQuotationTmp.WareHouse)
            {
                qbrWareHouse                        = qbds.addRange(fieldNum(inventSum, InventLocationId));
                qbrWareHouse.value(SysQuery::value(stockQuotationTmp.WareHouse));
            }
    
            queryRun = new QueryRun(query);
            queryRun.saveUserSetup(true);
    Best regards,
    Mohamed Amine Mahmoudi
  • JJDunaid Profile Picture
    226 on at
    Hi Mohamed,
    you didn't got my point , i think you have suggested me query range  for  the parameters ! i have tried it also , it doesn't work .
    I have debugged my code in debugging it is calculating correct physical quantity for all warehouses  but when data on report is displayed the results are different.

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…

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 679 Super User 2026 Season 1

#2
Abhilash Warrier Profile Picture

Abhilash Warrier 332 Super User 2026 Season 1

#3
Martin Dráb Profile Picture

Martin Dráb 238 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans