Post Author: Aman
CA Forum: Crystal Reports
Hello All,
I'm using CR 9 and I need to pull a QTY sold for current date - 100 days (Note-if today to past 100 days doesn't work, I can use a date range and manually input the from date and to date) and insert this formula field into a report that is using a INVENTORY Table and has the following fields: INVENTORY.PARTNUMBER, DESCRIPTION, QTY OH (Qty on-hand) etc... Therefore, I can not sort this report by date. However, I have to use the HISTORY table in order to get the qty sold information.
Here are fields i need to work with in this formula field.
The table is call HISTORY table and fields are QTY(Qty Sold), TransactionDate, TrancactionTYPE,
It need it to pull the QTY sold between current date-100 days or it could be date range and I can manually input the from date - to date. Next, the TransactionTYPE has to = "PRO" which means procurments (or sold or used).
I have tried every formula I can think of and it does not work.
I hope you can help me...
Thank you,
Aman
Post Author: yangster
CA Forum: Crystal Reports
lets go with the assumption you are putting in a parameter for the end date you want so your selection would be a simpledate_field in dateadd("d", -100, {?end_date}) to {?end_date}this will give you 100 days worth of data from some specified end dateyou can chanbe the end date to currentdate if you are only after that
Post Author: Aman
CA Forum: Crystal Reports
Thank you for your response Yangster.
However, the below formula did not work, it gives me a message that "this field name is not known" {?end_date}.
date_field in dateadd("d", -100, {?end_date}) to {?end_date}
Am I not inputing this right? or do need a different formula/method?
Please help...
Thank you,
Add a comment