Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
135
Bind Parameters in Code Behind (or any alternative)
posted

I have an ASP.NET WebForms project that uses .NET Framework 4.0 in VS 2013. I'm using Infragistics 14.1.

I've added an Infragistics Report and Report Service. I've also added a data source to the report (via the designer), which queries a view in SQL Server. I followed this tutorial: http://help.infragistics.com/Help/Doc/Reporting/2012.2/CLR4.0/HTML/How%20to%20Bind%20Parameters%20Through%20the%20HTML5%20Report%20Viewer.html  So far, so good.

I have dynamic parameters, but at the moment they do nothing and don't affect the query. I want to be able to set the parameters at runtime (to filter the query). I think I could change the Javascript in my .aspx page to pull parameters from the code behind, but I don't want users to be able to generate new reports by changing the Javascript. The report is based on the logged-in user's data and should be generated completely server-side.

I added a Report Data Source Provider (http://help.infragistics.com/Help/Doc/Reporting/2012.2/CLR4.0/HTML/How_to_Change_the_Data_Sources_at_Run_Time_Using_IReportDataSourceProvider.html), but the XML throws errors in my web.config.

Is this even the correct approach? How can I dynamically modify the query in the code behind?