Solved

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

Posted on 2011-02-23
4
793 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Would have appreciated more detailed instructions but the quick response was worth the 500 points.
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

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. …
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now