I started off with the ReportCatalog used in the CSharp.ReportExamples.VS2010 solution from which reports hosted in an asp.net class library are loaded. I went ahead and created a custom parameter UI above my Silverlight reportviewer, but i cannot seem to get the target report (using the Navigate to Report action) to receive the passed parameters from the custom ui. I can navigate to the reports but only the default parameter values set for the reports are used. I have tried using the RenderBegin method but it seems the passed parameters are being ignored. I have read a number of blogs on this, but somehow, things are not working.
How can I wire up the parameters from my Silverlight application to the reports?
Below are snippets of my code:
"XXX.ReportsLibrary.ReportCatalog, XXX.ReportsLibrary, Version=18.104.22.168, Culture=neutral, PublicKeyToken=null"
In the code behind of the page hosting the reportviewer, I have:
void rptViewer_RenderBegin(object sender, RenderBeginEventArgs args)
args.ParameterValues["dateStart"] = rdpStart.SelectedDate;
args.ParameterValues["dateEnd"] = rdpEnd.SelectedDate;
One thing I noticed is that the sender is ALWAYS the ReportCatalog. I was expecting that after navigating to ReportX the Sender would be ReportX. So is it that I am trying to apply parameters to the wrong report?
My last option would be to abandon the idea of custom parameters UI.