locked
ASP.NET ReportViewer / Non-String parameters RRS feed

  • Question

  • I am displaying a local report in a ReportViewer control on an asp.net web page.  My report contains non-string parameters. How can i set a non-string parameter value on a local report?
    Wednesday, March 22, 2006 5:28 PM

All replies

  • You will need to call .ToString() on your value to set it on ReportParameter.
    Thursday, March 23, 2006 3:22 AM
  • That would result in a string being passed to the report.  I want to pass a float or a datetime to the report.

    The only way i've been able to get this to work is to create a typed dataset with the "parameters" i want sent and then use aggregation functions (first,sum, etc...) to get to the data into the report.  That is a big workaround in order to get a few simple floats and times into my report.  Has anyone been able to get this done using another method?
    Thursday, March 23, 2006 3:31 PM
  • If the data type of the parameter is set to integer/float, you can do these operations.  And you can always convert between types in a report expression.
    Friday, March 24, 2006 7:04 AM