Set a date range crystal reports
After selecting the fields to go into the report place the cursor on the report and
Right click the mouse. Select REPORTS then select REPORT OPTIONS
In report options in the CONVERT DATE-TIME FIELD box choose TO DATE.
Now create a parameter for startdate name it what you will and enter some text to prompt the user.
For the value type choose DATE, then choose discreet values
In the set default value box set the default date to a date earlier
Than the earliest date in the table.
Now create a parameter for enddate name it what you will and enter some text to prompt the user.
For the value type choose DATE, then choose discreet values
In the set default value box set the default date to a date perhaps
10 or 15 years in the future.
Now go to the select expert ,choose the date field you are working with
And select GREATER TO OR EQUAL TO and then in the dropdown
Box choose (?startdate) or whatver it is that you named the parameter.
Now right click on the report again choose report then choose edit selection formula
And then choose records.
The formula should look like this
{TABLE.date} >= {?start}
Edit it to look like this:
{TABLE.date} >= {?start} and
{TABLE.date} <= {?end}
Good luck it should work, mine does
After selecting the fields to go into the report place the cursor on the report and
Right click the mouse. Select REPORTS then select REPORT OPTIONS
In report options in the CONVERT DATE-TIME FIELD box choose TO DATE.
Now create a parameter for startdate name it what you will and enter some text to prompt the user.
For the value type choose DATE, then choose discreet values
In the set default value box set the default date to a date earlier
Than the earliest date in the table.
Now create a parameter for enddate name it what you will and enter some text to prompt the user.
For the value type choose DATE, then choose discreet values
In the set default value box set the default date to a date perhaps
10 or 15 years in the future.
Now go to the select expert ,choose the date field you are working with
And select GREATER TO OR EQUAL TO and then in the dropdown
Box choose (?startdate) or whatver it is that you named the parameter.
Now right click on the report again choose report then choose edit selection formula
And then choose records.
The formula should look like this
{TABLE.date} >= {?start}
Edit it to look like this:
{TABLE.date} >= {?start} and
{TABLE.date} <= {?end}
Good luck it should work, mine does