on 02-24-2009 11:34 AM
I have a report template which has a field of type Date. It has the following settings-
Allow Custom Values=true
Allow Multiple Values = true
Allow Discrete Values=true
Allow Range Values=true
I set the range value using the code as following-
ReportParameters reportParameters = report.ReportParameters;
foreach (ReportParameter reportParameter in reportParameters)
{
ReportParameterRangeValue reportParameterRangeValue = reportParameter.CreateRangeValue();
ReportParameterSingleValue fromParameter = reportParameterRangeValue.FromValue;
fromParameter.Value = "2009-12-31";
}
However, this throws the foll. exception at the line fromParameter.Value = "2009-12-31";-
"One or more arguments are invalid."
" at CrystalDecisions.Enterprise.Desktop.ISReportParameterSingleValue.set_Value(String pbstrVal)\r\n at CrystalDecisions.Enterprise.Desktop.ReportParameterSingleValue.set_Value(String value)
Any ideas why? I am really perplexed as to why this should throw an exception. Is there another way to set Date type params?
Is it a Date type? If so, why not use a Date type? Like "Date(2005,02,04)".
Sincerely,
Ted Ueda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.