Skip to Content
author's profile photo Former Member
Former Member

Error "One or more arguments are invalid." when setting range parameter val

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?

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Feb 24, 2009 at 03:50 PM

    Is it a Date type? If so, why not use a Date type? Like "Date(2005,02,04)".


    Ted Ueda

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.