Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-02-23
4
Medium Priority
?
807 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

705 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