June 30, 2008 at 6:16 pm
I have a report that takes one parameter and works fine using Report Manager and in VS 2005, however when I try to access it via a report viewer control in an aspx page I have problems.
The parameter is an integer (1-52 for weeks), the available values of the prompt are populated via a query (of an integer field), and the default value is set at null.
The page loads, shows the report viewer, and drop down prompt. However, when a value is chosen and the View Report button clicked nothing happens. When I hard code a default value such as 1 the report will run fine, but then when I go to choose another value from the drop down and click View Report, it just renders the report based on the value 1 again. My code behind is super basic:
[font="Courier New"]Imports Microsoft.Reporting.WebForms
Imports Microsoft.ReportingServices.ReportProcessing
Imports Microsoft.ReportingServices
Partial Class secure_manager_reports
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
ReportViewer1.ServerReport.ReportServerCredentials = New ReportServerCredentials()
End Sub
End Class[/font]
Anyone know what's going wrong here?
July 1, 2008 at 6:57 am
are you checking if the page is PostBack?
July 1, 2008 at 12:11 pm
Checking for postback did it. I am not sure why I needed that but that just goes to show what a newbie I am. Thanks.
July 2, 2008 at 12:40 am
not a problem!
You are welcome.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply