Crystal Reports XI Date Range Parameter Format

I am trying to display a report on a user control with a CrystalReportViewer. It expects two parameters, a string and a DateTime range value. I have successfully got the string passed to the rpt, but I have not been able to do so for the DateTime range and get this error: Value does not fall within the expected range. The value is coming from an AJAX Calendar Extender. I have tried using a DateTime array and an ArrayList to pass in the parameter. Please advise on how to correctly pass in the DateTime range parameter. Thanks in advance for any help.

ReportDocument report = new ReportDocument();
report.SetParameterValue("pTransmitter_List", "10099");            //DateTime[] dateRange = new DateTime[2];
//dateRange[0] = (Convert.ToDateTime(txtStartDateRange.Text));            //dateRange[1] = (Convert.ToDateTime(txtEndDateRange.Text));
ArrayList dateRange = new ArrayList();            dateRange.Add(Convert.ToDateTime(txtStartDateRange.Text));            dateRange.Add(Convert.ToDateTime(txtEndDateRange.Text));            report.SetParameterValue("pDateRange", dateRange);            crvReport.ReportSource = report;

Open in new window

augiesarmyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mlmccCommented:
Check this document starting on page 40.  It shows how to add a date range parameter for a subreport.
http://www.businessobjects.com/global/pdf/dev_zone/VS2005_Walkthroughs.pdf

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
augiesarmyAuthor Commented:
Thanks for your help. That was just what I needed, I hadn't see the ParameterRangeValue.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.