Solved

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

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

Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

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…
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…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

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