SQL보고 서비스 데이터 연결 업데이트
-
03-07-2019 - |
문제
게시 된 SQL보고 서비스 보고서의 연결 문자열을 변경할 수 있습니까? Reportserver 데이터베이스에서 DataSource라는 바이너리 필드를 볼 수 있지만 이진으로 저장되므로 쉽게 업데이트 할 수 없다고 생각합니다.
올바른 데이터 소스로 보고서를 다시 게시해야합니까? VS2003을 설치하고 싶지 않기 때문에 기대하지 않습니다.
편집 : 클라이언트는 모든 서비스 팩이 설치된 상태에서 SQL Server 2000보고 서비스를 실행하고 있습니다.
해결책
SQL Reporting Services 2000에는 [웹 서비스]가 있습니다.http://msdn.microsoft.com/en-us/library/aa274396(sql.80).aspx) 데이터 소스를 변경하는 데 사용할 수 있습니다. 이를 감안할 때 다음은 데이터 소스를 공유 데이터 소스로 변경할 수 있습니다. 이것은 [MSDN에서 조정] (http://msdn.microsoft.com/en-us/library/aa225896(sql.80).aspx).
// Create our reporting services class
ReportingService theRS = new ReportingService();
theRS.Credentials = System.Net.CredentialCache.DefaultCredentials;
// We need to setup a data source reference to an existing shared data source
DataSourceReference theDSRef = new DataSourceReference();
theDSRef.Reference = "/Path/To/ExistingSharedDataSource";
DataSource[] theDSArray = new DataSource[1];
DataSource theDS = new DataSource();
theDS.Item = (DataSourceReference)theDSRef;
theDS.Name = "NameOfSharedDataSource";
theDSArray[0] = theDS;
try
{
// Attempt to change the data source of the report
theRS.SetReportDataSources("/Path/To/ReportName", theDSArray);
Console.Out.WriteLine("We have changed the data source");
}
catch (System.Web.Services.Protocols.SoapException e)
{
Console.Out.WriteLine(e.Message);
Console.Out.WriteLine(e.Detail.InnerXml.ToString());
}
이 예에서 보고 서비스 클래스는 웹 서비스와 대화하기 위해 생성 한 프록시 클래스에서 가져 왔습니다.http://msdn.microsoft.com/en-us/library/aa256607(sql.80).aspx).
이것이 도움이되기를 바랍니다. 다른 것을 찾고 있다면 알려주세요.
제휴하지 않습니다 StackOverflow