Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Date Range parameter not working

Hi All,

I am passing the following parameters to my report:

Protected Sub display_report()

CrystalReportViewer1.ParameterFieldInfo.Clear()

report.Load("c:\a.rpt")

parameterField = report.ParameterFields("Group")

parameterField2 = report.ParameterFields("Date")

For Each li As ListItem In Me.ListBox1.Items

If li.Selected = True Then

' Add all parameters value here

parameterField.CurrentValues.AddValue(li.Value)

End If

Next

parameterField2.CurrentValues.AddRange(#4/16/2009#, #4/20/2009#, RangeBoundType.BoundExclusive, RangeBoundType.BoundExclusive)

However, my report comes blank. The date parameter in my report is a static date range value. Ultimately, I want to pass textbox1.value and textbox2.value as the date range (these values come from an AJAX calendar.

The report itself works properly when I run it in CR 2008.

Can anyone shed some light on what I am doing wrong?

Thank you in advance.

Former Member
Not what you were looking for? View more on this topic or Ask a question