Can you programatically change an RDL's datasource to an ADO.NET dataset???
I'm new to SQL reports so bare with me :) I was able to create an RDLC report file, set it's dataset via code to an ADO dataset and display the report in the report viewer. Yay! All was well until I noticed the RDLC file would not interpret HTML tags. So after some research, I resolved to the fact that I needed to create a server report, RDL file, if I wanted the HTML tags to be interpreted. (If this is incorrect, please set me straight. I'm pulling my hair out over here) So I created the RDL file, pointed it to a local server dataset and got my report. Now I want to use that report in a VB.NET Web application. I need to be able to filter the report source based on operator input. I can not figure out how to set the datasource of the RDL file at runtime. Is this possible? Any help will be greatly appreciated!!!
April 12th, 2011 10:20am

Hi Karin3299, You could also create several parameters on the RDL report, then select the parameter to filter the dataset. For more information about How to: Add a Filter (Reporting Services), please see: http://msdn.microsoft.com/en-us/library/ms156270.aspx If you want to pass the parameter from web application into server report, you should make use of SetParameters method in code-behind, for more information, please see: http://www.codeproject.com/KB/reporting-services/ReportViewer2005.aspx Hope this helps. Thanks, Challen Fu Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Free Windows Admin Tool Kit Click here and download it now
April 18th, 2011 2:58am

Thank you for your response. After pulling my hair out for several days I finally resolved my issue. Unfortunately my issue was not RDLC vs RDL related. It was an issue around Visual Studio 2008 (which is what my customer has specified so I have to use VS2008). The report viewer control in VS2008 allowed me to create RDLC files, set data sources and show reports as expected. But when I needed to have the report interpret HTML, things went south. You must create a "placeholder" so HTML can be interpreted. "Place Holders" are not available in VS2008. So then I started down the RDL path only to find out after MANY hours that the report viewer control in VS2008 does not work with report server RDL files. My solution was to use the VS2010 report viewer in my VS2008 web application. Once I did that, all works as expected. I'm glad I finally got this working but MAN it took way too long to figure out this solution :(
April 18th, 2011 8:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics