Skip to main content

Hi, 

I am trying to do a GI get Month-To-Date, Year-To-Dae & Prior-Year Sales totals for an inventory item. 
There are multiple warhouses setup. 
I am using the INTran table, with a condition of the item & the TranType of Invoice. 

If I sort the results in Site Order (SIteID), the results do show in Site order. 
However, if I set the grouping to be by SiteID, results are totaled correctly by do not appear in Site Order.
Is there a way to sort by the grouping conditions?

No grouping:

With Grouping:

 




 

 

Hi @wfilipiak67 If possible, can you please share the above Generic Inquiry?

 


Here is the XML of the Inquiry. 
It has the Grouping checked

Thank you for any assistance.


Hi @wfilipiak67  I have done slight modifications to your Generic Inquiry and grouping is working as expected. Attached GI here, please verify.


Hi @wfilipiak67 ,

Although the INTran data access class is configured to display the SiteCD when you add the SiteID to the result grid, your GI is actually sorting based on the SiteID field.  You can see this by looking at the SQL trace after viewing the GI.  I would suggest that you add the INSite DAC and sort on the SiteCD, which it looks like is what @Naveen B has already done in his revised XML :)

...
WHERE ( WINTran].ICompanyID] = 2) AND  ( INTran]. BranchID] IS NULL  OR INTran].OBranchID] IN ( 22, 16, 20, 17, 21)) AND ( INTran]. InventoryID] = @P0 AND ]INTran].NTranType] = 'INV')
GROUP BY INTran].BSiteID]
ORDER BY INTran].BSiteID] OPTION(OPTIMIZE FOR UNKNOWN)


Thank you both! 
That worked great! 

 


Reply