Skip to Content

when the user prompts any month like aug/sep, the output should be display from past 5 months of data?

Hi all,

when the user select/prompt any month like aug/sep, the output should be display from past 5 months of data?

how we can do in crystal reports???

please help me...

thanks in advance..

cheers,

kiran

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jun 13, 2012 at 01:00 PM

    Hello Kiran,

    The easiest is to create a prompt that just requests the last month for input, and you put that prompt in the report selection formula of the report where you have it return prompt - xx days (example november - 120 days (4 months).

    Note: you would have to use the correct date function offcourse as the above is not the exact correct function expression.

    regards,

    Duncan

    Add a comment
    10|10000 characters needed characters exceeded

    • You would use the dateadd function

      Example:

      DateAdd ("m", -5, #6/13/2012#)

      the m stands for Month, But you could use d for days as well

      the -5 stands for substract 5 months from date.

      And offcourse #6/13/2012# is the actually date time you want to use that you can substitute with the prompt/parameter value.

      You offcourse might have to tweak this somewhat depending on what the format of your prompt/parameter is. So in other words, if your prompt only asks for month (like June), you would have to transform that value first into last day of June, 2012 etc (06/30/2012).

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.