[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 885
  • Last Modified:

How to pass parameters programmatically to a .net report viewer control



When I add a report that calls a business object to reportviewer the follow code is gererated.

I need to pass a prameter to the method that load an object list.  How can I do this?


    // TODO: This line of code loads data into the 'VoyagedbDataSet1.Events' table. You can move, or remove it, as needed.
 
      this.EventsTableAdapter.Fill(this.VoyagedbDataSet1.Events);

      this.reportViewer1.RefreshReport();
0
lswarcz
Asked:
lswarcz
1 Solution
 
SriVaddadiCommented:
You have to use SetParameters method of ServerReport object.

this.reportViewer1.ServerReport.SetParameters(<Your parameter list>)

See the below articles for better understanding

http://www.sqlservercentral.com/articles/Reporting+Services+(SSRS)/62158/
http://msdn.microsoft.com/en-us/library/aa337091.aspx
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now