I am using SQL Reporting services to hit a WCF web service.
My query is:
<Query>
<Method Name="GetADTHistory" Namespace="http://tempuri.org/">
<Parameters>
<Parameter Name="personId"><DefaultValue>7885323F-DE8D-47E5-907D-2991C838FF3E</DefaultValue></Parameter>
</Parameters>
</Method>
<SoapAction>
http://tempuri.org/IResidentServiceFrontEnd/GetADTHistory
</SoapAction>
</Query>
My implementation is
public List<ResidentDataTypes.Person> GetADTHistory(Guid personId)
{
using (ResidentDataTypes.MyEntities entity = new ResidentDataTypes.MyEntities ())
{
var person = (from a in entity.People.Include("ResidentAdts")
where a.PersonId == personId
select a);
if (person.Count() > 0)
{
return person.ToList();
}
else
{
return new List<Person>();
}
}
}
This works fine if there are 2 or more ADT records. Reporting services correctly sees all the fields in the database. However if there is only 1 ADT record reporting services sees the 'Person' columns but none of the ADT records. Any ideas?