Showing posts with label ReportServer. Show all posts
Showing posts with label ReportServer. Show all posts

Wednesday, January 30, 2008

Adding dynamic text to RDLC in Code Behind + VB.net

Sometimes you want to display text in report viewer but you need to be able to populate the value from the code behind.

1. Create a parameter in the Report (.rdlc file)



2. Add a texbox to the report – right click properties.
Click on the first tab “General” click the “formula” button.



3. Add code to code behind where you have added the RDLC to the page.



Dim p As New ReportParameter("getDate", DateTime.Now())
Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter() {p})
Me.ReportViewer1.LocalReport.Refresh()

Tuesday, November 27, 2007

RDLC + Page is blank + Vista

Today I ran into an issue with the report viewer control and the rendering of some RDLC reports. If I ran the application user localhost then the report would render correctly. As soon as I change from it from localhost to my computer name (http://mycomputer/report.aspx) the report control would show but the report itself would render as blank.

After hours of playing around with IIS and searching google the answer was to change the application to use the classic.asp Application pool and also set impersonation to true.

Hope this helps someone out in the future!