hi pro , i created model project with .net 2005 after that , create report with reportbuilder that it use this model. it s ok.
i have project and i want to change datasource (connection string ) in runtime when User click on report ,i use sqlReportingService2005 class :
Dim rs As New ReportingService2005()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim definition As New DataSourceDefinition()
definition.CredentialRetrieval = CredentialRetrievalEnum.Integrated
definition.ConnectString = "Data Source=" & serverName & ";Initial Catalog=" & DataBaseName & ";Integrated Security=True"
definition.Enabled = True
definition.EnabledSpecified = True
definition.Extension = "SQL"
definition.ImpersonateUser = False
definition.ImpersonateUserSpecified = False ' True
definition.Prompt = Nothing
definition.WindowsCredentials = True ' False
Try
rs.SetDataSourceContents("/Data Sources/" & DataSourceName, definition)
Catch ex As SoapException
Console.WriteLine(ex.Detail.OuterXml)
End Try
End Sub
error "An unhandled exception of type 'System.Net.WebException' occurred in System.Web.Services.dll
Additional information: The request failed with HTTP status 404: Object Not Found." happend
( i checked Enable Unmanged code debugging =true)
please help me
tanks
This error occurs only when the report server URL is given wrong or does not exists. Do check your report server URL assigned to the rs.Url property.
tanks for reply. i was forgotten to say : i have 2 machin ,the first one uses Windows 2003 Server and i installed sql server on it , another machin uses windows a xp and i run project on it( it s like client). when i take project on sql server 2005 it s work nice but when i run project on xp it dosent work.
Are you able to open the report server url in browser?
No comments:
Post a Comment