Skip to Content
author's profile photo Former Member
Former Member

Qty sold by a date range in a formula field- HELP!

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

asangha@gracosupply.com

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 30, 2007 at 09:55 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2007 at 04:31 PM

    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
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 08:17 AM

    Post Author: maximus85

    CA Forum: Crystal Reports

    yangster formula seems working though....

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.