I am trying to produce a report which has a number of entries from a related table listed down the page. It should look something like this;
Field1 SubItem1 Field2 Field3
SubItem2
SubItem3
Field1 SubItem1 Field2 Field3
SubItem2
I have used a DataRange within the main data template to list the SubItems. This all works except that the subsequent fields after the sub items start at the same level as the last sub item. The report I get looks like this;
Field1 SubItem1
SubItem2
SubItem3 Field2 Field3
Field1 SubItem1
SubItem2 Field2 Field3
This looks very odd and is not how I would like it layed out. I have experimented with using the UseDesignOrder propertry and this does resolve the problem if there is only one set of Sub Items but it does not work where there are many sets of sub items.
I have created a sample project to demonstrate the issue. Here is an example of the code;
<r:Page>
<r:DataRange DataSource="{Binding Matters}" Size="100%,1" Background="LightBlue">
<r:DataRange.ItemTemplate>
<DataTemplate>
<r:ItemContainer VerticalAlignment="Top" UseDesignOrder="False">
<r:Label Location="0,0" Size="5%,5" Text="[Ref]" VerticalAlignment="Top"/>
<r:DataRange Location="5%,0" Size="20%,1%" DataSource="{Binding Customer}" Background="LightGray">
<r:DataRange.ItemTemplate>
<DataTemplate>
<r:ItemContainer>
<r:Label Location="0,0" Size="20%, 5" Text="[Ref]"/>
<r:Label Location="20%,0" Size="80%, 5" Text="[Name]"/>
</r:ItemContainer>
</DataTemplate>
</r:DataRange.ItemTemplate>
</r:DataRange>
<r:Label Text="[Bal3]" Size="5%,5" Location="25%,0"/>
<r:DataRange Location="30%,0" Size="25%,1%" DataSource="{Binding Staff}" Background="LightSkyBlue">
<r:DataRange.ItemTemplate>
<DataTemplate>
<r:ItemContainer>
<r:Label Location="0,0" Size="20%, 5" Text=" [code]" />
<r:Label Location="20%,0" Size="80%, 5" Text="[Name]"/>
</r:ItemContainer>
</DataTemplate>
</r:DataRange.ItemTemplate>
</r:DataRange>
<r:Label Text="[Bal1]" Location="55%,0" Size="10%,5" />
<r:Label Text="[Bal2]" Location="65%,0" Size="10%,5" />
<r:Label Text="{Binding Bal3}" Location="75%,0" Size="10%,5" />
</r:ItemContainer>
</DataTemplate>
</r:DataRange.ItemTemplate>
</r:DataRange>
</r:Page>
I can email the entire project over to you if that would help.
Thanks for your help.
Tim.