locked
ReportViewer - parameter is missing a value RRS feed

  • Question

  • Here's my situation.  I've got a report with some report parameters defined.  These parameters get their available and default values from a query.  I've got a Dataset and respective fields selected.  The dataset in question is sort of a "headings" dataset, which only ever has one row.  Now this works just fine when I'm previewing the report in designer, grabs the value, uses it as I'd expect.  The problem is occuring when I'm using the WinForms ReportViewer control to view my report.

    I'm not deploying this report, but running it client-side in the WinForms ReportViewer control.  I'm providing it with the relevant datasets, bound appropriately (I can pull data from the fields directly in the report just fine), but when I try and view the report I get "The 'xyz' parameter is missing a value".

    What's going on here?  The definition seems acceptable as it works fine in designer, and my execution using the WinForms ReportViewer also seems to be correct, as I can use the fields otherwise.  It just falls apart on the parameter default value from a query.
    Friday, January 11, 2008 12:59 AM

Answers

  • I've found a reason this won't work.  I've been creating my reports as online / connected reports.  That is to say, .rdl files that connect directly to a SQL Server data source, and then using those definitions as local processing mode reports.  I've just noted that when created an rdlc from scratch (not converting an rdl to an rdlc), that it won't let you query a DataSet for parameter values or defaults.  I guess in their infinite wisdom, MS decided that nobody would ever want to do that.  Much like they figured nobody would ever want to put field data in a report header / footer, or a table in the footer / header (even just for the sake of formatting the layout of my text, please!!)

    I have at least found a way to work around this issue with the parameters though.  Since I'm working in a WinForms app I just get the app to do the query processing and pass those parameters into the report itself.
    Sunday, January 13, 2008 10:49 PM

All replies

  • Hi

    I think you have to give some dummy value for that report parameter when you pass to report viewer.

    Try otherwise let us know.

     

    Regards,

    Senthil

     

    Friday, January 11, 2008 1:45 PM
  • I've found a reason this won't work.  I've been creating my reports as online / connected reports.  That is to say, .rdl files that connect directly to a SQL Server data source, and then using those definitions as local processing mode reports.  I've just noted that when created an rdlc from scratch (not converting an rdl to an rdlc), that it won't let you query a DataSet for parameter values or defaults.  I guess in their infinite wisdom, MS decided that nobody would ever want to do that.  Much like they figured nobody would ever want to put field data in a report header / footer, or a table in the footer / header (even just for the sake of formatting the layout of my text, please!!)

    I have at least found a way to work around this issue with the parameters though.  Since I'm working in a WinForms app I just get the app to do the query processing and pass those parameters into the report itself.
    Sunday, January 13, 2008 10:49 PM