Link to home
Start Free TrialLog in
Avatar of Metalteck
MetalteckFlag for United States of America

asked on

Six months Date question in Crystal Report

I have a crystal report and need it to run for the first 6 months of the year.
For example, if I run the report on 2/1/10, I only want the data from 2/1/09 - 7/31/09.
I need this to be automated, so I can run it twice a year without any parameter prompts.
Avatar of Shiv
Shiv
Flag of United States of America image

report menu > selection formula > record
and place this formula
{Orders.Ship Date} in dateadd("YYYY",-1,currentdate) to dateadd("m",6,dateadd("YYYY",-1,currentdate))
if you want from today to next 6 months use this..

{Orders.Ship Date} in currentdate to dateadd("m",6,currentdate)

and also change the currentdate to reportrundate or whatever
the first comment is for this

 "if I run the report on 2/1/10, I only want the data from 2/1/09 - 7/31/09"

you reduced 1 year from report run date ..to accomplish this use first comment
ASKER CERTIFIED SOLUTION
Avatar of Shiv
Shiv
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Metalteck

ASKER

I will need this report to run twice, once in Feb, then again in August. How can I do that?
well it works if you run the report in feb or august.....

to accomplish this

1. To run manually in feb or aug ................i know you don't want this

2 .you can schedule this report in crystal enterprise to run on these specific dates...what r u using ??  enterprise or any third party scheduler ??----this is automatic
Avatar of Mike McCracken
Mike McCracken

To automate the running of a report you need a report scheduling tool.
There are several scheduling tools listed here.
http://www.kenhamady.com/bookmarks.html

mlmcc