Custom Report - POs From The Past Year

Custom Report - POs From The Past Year

Good Morning,

I'm looking to create a report based on Purchase Orders that will show purchase orders of any status from the current year (January 1st to current day of the current year) put in by specific users.  Here is what I have so far:

  1. SELECT pos.STATUSNAME "PO Status",po.POCUSTOMID "PO Number",po.PONAME "PO Name",longtodate(po.DATEORDERED) "Ordered Date",longtodate(po.DATEREQUIRED) "Required Date",poa.FIRST_NAME "Requester",pos.STATUSNAME "PO Status",paao.NAME "Vendor Name",po.TOTALPRICE "Total Price" FROM PurchaseOrder po LEFT JOIN POStatus pos ON po.STATUSID=pos.STATUSID LEFT JOIN VendorDefinition pvd ON po.VENDORID=pvd.VENDORID LEFT JOIN SDOrganization paao ON pvd.VENDORID=paao.ORG_ID LEFT JOIN AaaUser poa ON po.REQUESTERID=poa.USER_ID WHERE (poa.FIRST_NAME = N'User One' OR poa.FIRST_NAME = N'User Two') ORDER BY 1

I tried seeing how the custom report wizard does "last quarter" and "last week", but it's nothing pretty.  It looks like it just takes the system time and subtracts whatever is equal to 7 days in system time and puts it in a >= relationship.  This report will be generated weekly, so it needs to be a little more dynamic than that.  Thanks for your help!

~James Murphy
ServiceDesk 8.0.0 Build 8000








                  New to ADSelfService Plus?