How to get last 36 months data in crystal report

Hi all,

I have Created connection to BI System. It contains 10 years data with monthly basis. now, I need to get last 36 months data from that in crystal report . how to acheive this.

Regards,
Shanthakumar.


shanthakumar :india: (BOB member since 2009-06-17)

Do you need 36 months rolling?

Or just the last 3 years worth od data?


ABILtd :uk: (BOB member since 2006-02-08)

Hi,

I need 36 months rolling data. how to do that in crystal report

Regards,
Shanthakumar.


shanthakumar :india: (BOB member since 2009-06-17)

The solution depends on what database your using - kinda as there are some good database functions you could use.

However, regardless of the database, you could probably achieve this using the dateadd() functions and subtracting 36 months from one of the date fields you have then then using this in a selection formula. You might need some extra stuff if you need to do it from the first day of the month in the starting month.


ABILtd :uk: (BOB member since 2006-02-08)

Hi,

Thanks for the answer. if i need last 3 years data(36 months). what should i do in crystal report.

Regards,
Shanthakumar.


shanthakumar :india: (BOB member since 2009-06-17)

Thats what I just told you in the first post. I can`t give you a complete solution, just ideas and pointers coz;

A - I don`t know your database tables or environment.
B - My time aint free :o


ABILtd :uk: (BOB member since 2006-02-08)

Change the selection formula to query the last three years. Use some dateadd function to get the last three years.

-JB


Jayabal :india: (BOB member since 2009-01-05)