This is possible through the use of an embedded DataRange object. The following code illustrates the modified report:
<r:Report x:Name="plannerReport">
<r:Page>
<r:Label Text="Scheduling Report" AutoSize="True" FontSize="20" />
<r:DataRange Location="0,60" Size="100%,20" AlternatingBackground="AliceBlue">
<r:DataRange.HeaderTemplate>
<DataTemplate>
<r:ItemContainer Size="100%,20" Background="LightSteelBlue" r:Report.FontWeight="Bold">
<r:Label Location="0,0" Size="10%,20" Text="#" />
<r:Label Location="10%,0" Size="30%,20" Text="Subject" />
<r:Label Location="40%,0" Size="20%,20" Text="Start Time" />
<r:Label Location="60%,0" Size="20%,20" Text="End Time" />
<r:Label Location="80%,0" Size="20%,20" Text="Tanning bed" />
</r:ItemContainer>
</DataTemplate>
</r:DataRange.HeaderTemplate>
<r:DataRange.ItemTemplate>
<DataTemplate>
<r:ItemContainer>
<r:Label Location="0,0" Size="10%,20" Text="[RangeItemCurrent()]" UseDesignOrder="True" />
<r:Label Location="10%,0" Size="30%,20" Text="[HeaderText]" UseDesignOrder="True" />
<r:Label Location="40%,0" Size="20%,20" Text="[StartTime]" TextFormat="{}{0:dddd, MMMM dd}" UseDesignOrder="True" />
<r:Label Location="60%,0" Size="20%,20" Text="[EndTime]" TextFormat="{}{0:dddd, MMMM dd}" UseDesignOrder="True" />
<r:DataRange r:Name="ResourceRange" Location="80%,0" Size="20%,20" UseDesignOrder="True">
<r:DataRange.ItemTemplate>
<DataTemplate>
<r:ItemContainer>
<r:Label Location="0,0" Size="100%,20" Text="[Name]" />
</r:ItemContainer>
</DataTemplate>
</r:DataRange.ItemTemplate>
</r:DataRange>
</r:ItemContainer>
</DataTemplate>
</r:DataRange.ItemTemplate>
</r:DataRange>
</r:Page>
</r:Report>
To provide details for the embedded data range, handle the QueryDetails event and use the following as content of the event handler:
var range = s as DataRange;
if (range != null)
{
if (range.Name == "ResourceRange")
{
Item master = args.MasterRow as Item;
args.Details = master.Resources;
}
}
Let me know if this works.
Regards,
Meppy