I'm having the same issue (this has just come to light as we populated the Warranty fields last week).
The SQL query is
Select Top 1000000 tsysDevicetypes.ItemTypeIcon10 As icon, tblCustDevices.Displayname As [Device name], tblCustDevices.Model As [Device Model], tblCustDevices.Vendor As [Device Vendor], tblCustDevices.Location, tblCustDevices.Ipaddress, tblCustDevices.LastSeen, tblCustDevices.DeviceKey, tblCustDevices.Warrantydate From tblCustDevices Inner Join tsysDevicetypes On tsysDevicetypes.ItemType = tblCustDevices.Devicetype Where (tblCustDevices.Warrantydate < GetDate() + 30 And tblCustDevices.Warrantydate > GetDate()) And tblCustDevices.State = 1 Order By tblCustDevices.Displayname
This is from the "Device: Out of warranty in 30 days" report.
Screenshot of custom fields page attached
Thanks
Trevor