M
Mike
I have a report within another report. How can I tell the report within to
only show the last few records?
A customer has 50 orders, I want to only show the last 5 orders for that
customer within the report. By default the reports shows all the orders. I
ca not seem to find a way to only show the last 5 records.
I tried using the TOP 5 but it might only show 1 record when there are
actually 1000 records.
SELECT TOP 5 ProductCodes.ProductCode, TankInfo.TankNumber,
ProductCodes.ProductShortDescr, ProductCodes.ProductLongDescr,
ProductCodes.SpecificGravity, TankInfo.TankID, TankInventory.MeasuredDate,
TankInventory.MeasuredHeightFT, TankInventory.MeasuredHeightIN,
TankInventory.Temperature, TankInventory.Dept, TankInventory.Gravity
FROM TankInfo INNER JOIN (ProductCodes INNER JOIN TankInventory ON
ProductCodes.ProductCodeID = TankInventory.ProductCodeID) ON TankInfo.TankID
= TankInventory.TankID
ORDER BY TankInventory.MeasuredDate DESC;
Thank you in advance for your help.
Mike
only show the last few records?
A customer has 50 orders, I want to only show the last 5 orders for that
customer within the report. By default the reports shows all the orders. I
ca not seem to find a way to only show the last 5 records.
I tried using the TOP 5 but it might only show 1 record when there are
actually 1000 records.
SELECT TOP 5 ProductCodes.ProductCode, TankInfo.TankNumber,
ProductCodes.ProductShortDescr, ProductCodes.ProductLongDescr,
ProductCodes.SpecificGravity, TankInfo.TankID, TankInventory.MeasuredDate,
TankInventory.MeasuredHeightFT, TankInventory.MeasuredHeightIN,
TankInventory.Temperature, TankInventory.Dept, TankInventory.Gravity
FROM TankInfo INNER JOIN (ProductCodes INNER JOIN TankInventory ON
ProductCodes.ProductCodeID = TankInventory.ProductCodeID) ON TankInfo.TankID
= TankInventory.TankID
ORDER BY TankInventory.MeasuredDate DESC;
Thank you in advance for your help.
Mike