Can't open a report in a new window, without using url
Sounds simple but here is what I need. I have an aspx webform that asks the user for 19 parameters that my report requires. I need to validate the form and have a button that the user can click and have the report open in a new window. Like I said the report has 19 parameters and we would like to avoid passing the parameters in the url. Here is what I’ve tried:
Using cross-page postback I can pass the parameters captured in the Getparameters webform to the viewreport webpage but it opens on the same window. I can use a regular button or a linkbutton and added “onclick” attributes to run clientside validation before submitting a form. The viewreport webpage has a reportviewer control. I just need to open the report in a new window.
Lastly I’m trying to use SOAP and running render method for button on_click but I keep getting the error report path not valid report path needs to be less than 260 characters and must start with slash. Here is the code that I’m using for render method:
Dim rs As New RSWebReference.ReportingService
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim result As Byte = Nothing
Dim reportPath As String = "/Sales/MonthlySales"
Dim format As String = "PDF"
Dim historyID As String = Nothing
Dim devInfo As String = “<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>"
'Prepare report Parameters
Dim parameters(0) As RSWebReference.ParameterValue
parameters(0) = New RSWebReference.ParameterValue
parameters(0).Name = "Date"
parameters(0).Value = "09/10/2006"
Dim credentials() As RSWebReference.DataSourceCredentials = Nothing
Dim showhidetoggle As String = Nothing
Dim encoding As String = ""
Dim mimeType As String = ""
Dim warnings() As RSWebReference.Warning = Nothing
Dim reportHistoryParameters As RSWebReference.ParameterValue() = Nothing
Dim streamID As String() = Nothing
rs.Render("MonthlySales", "PDF", historyID, devInfo, parameters, credentials, showhidetoggle, encoding, mimeType, reportHistoryParameters, warnings, streamID)
I just want to know if what I want to accomplish is even posible because I’ve been at this for over a week, going Crazy!
I thought maybe the report needed credentials set instead of nothing, but don’t know how to do that.
Any help is immensely appreciated!