Solved

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

Posted on 2011-02-23
4
797 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 100

Accepted Solution

by:
mlmcc earned 500 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

820 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