Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to Create a Date Range Parameter in Crystal Reports XI?

Posted on 2011-02-23
4
Medium Priority
?
811 Views
Last Modified: 2012-05-11
Hi Everyone,

I couldn't find a similar answer for the question I have so I thought I would just ask.  Does anyone know how to create a date range parameter in Crystal XI?

Specifically, I have a date field (invoice_date) that I would like to use to select the records for the report I created. I would like to have a parameter that will allow the user to input a "From" date range and a "To" date range.

So, the questions I have are:
1.  Would I need to create two parameters (one for the "from" and one for the "To")?
2.  What type of a parameter would this be?  Dynamic, static?
3.  How do I specifically set this up so that I can pull in only records that meet the criteria enetered.  The date range should include the date being entered.

Thanks!
0
Comment
Question by:PMinIT
  • 2
4 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 1500 total points
ID: 34962229
You can do it 2 ways.

1.  Use 2 parameters setup as From and To or Start and End
2.  Create 1 parameter and set it as a range parameter

They would both be STATIC unless you wanted to use the dates from the database as the values then you could use dynamic for case 1.  I don't think a dynamic parameter can be a range.

Use the SELECT EXPERT to setup a filter
1.   {YourDateField} >= {?FromDate} AND {YourDateField} <= {?ToDate}

2.  {YourDateField} IN {?DateRange}

mlmcc
0
 

Author Comment

by:PMinIT
ID: 34972910
Hi mlmcc!

I was able to get your suggestion to work (I chose the second option).  Thanks for the quick response!

0
 
LVL 4

Expert Comment

by:musalman
ID: 35015186
Dear mlmcc,
If we add Date Range, we are unable to show it on report Header as Input Params.

Dear PMinIT
Better to use, 1st Option by mlmcc OR ELSE if you are using Data base Object (Like SP etc,) so you can add Date Params there... and can Filter the Data on Database side.
0
 

Author Closing Comment

by:PMinIT
ID: 35083847
Would have appreciated more detailed instructions but the quick response was worth the 500 points.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question