Groups | Blog | Home
all groups > sql server reporting services > august 2004 >

sql server reporting services : SetReportDatasource ?



Jim Ciotuszynski
8/2/2004 4:15:56 PM
Can someone give me some guidence? I am trying to set a report datasource
to a existing datasource and I keep getting an error of:
rsMissingElement 400
The required field DataSource is missing from the input structure.

http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings.resources.Strings&EvtID=rsMissingElement&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=8.00
Microsoft SQL Server Reporting Services
8.00.878.00
127
OsIndependent
1033
ReportingServicesLibrary
The required field DataSource is missing from the input structure.

-------------------------CODE-------------------------------
Dim reference As New jrcsrv1.DataSourceReference
reference.Reference = "1001"
Dim dsd As jrcsrv1.DataSourceDefinition
Dim dataSources(1) As jrcsrv1.DataSource
Dim ds As New jrcsrv1.DataSource
ds.Item = CType(reference, jrcsrv1.DataSourceDefinitionOrReference)
ds.Name = "1001"
dataSources(0) = ds
Try
rs.SetReportDataSources("/claims/ClaimHistory", dataSources)
Console.WriteLine("New reference set for the report.")
Catch e As SoapException
Console.WriteLine(e.Detail.InnerXml.ToString())
End Try


-------------------------CODE-------------------------------

Dmitry Vasilevsky [MSFT]
8/2/2004 8:08:06 PM
[quoted text, click to view]

should be

[quoted text, click to view]

The first one declares array of two elements one of which you leave
unassigned. Hence the missing element exception.

--
Dmitry Vasilevsky, SQL Server Reporting Services Developer
This posting is provided "AS IS" with no warranties, and confers no rights.
--

----------------------------------------
[quoted text, click to view]

AddThis Social Bookmark Button