<UserControl x:Class="OrderEntrySystem.ReportView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <FlowDocument>
        <BlockUIContainer>
            <ItemsControl ItemsSource="{Binding CustomerOrders}">
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <StackPanel>
                            <TextBlock Text="{Binding Name}" />
                            <ListView ItemsSource="{Binding Orders}">
                                <ListView.View>
                                    <GridView>
                                        <GridViewColumn Header="Status" DisplayMemberBinding="{Binding Status}" />
                                        <GridViewColumn Header="Subtotal" DisplayMemberBinding="{Binding ProductTotal}" />
                                        <GridViewColumn Header="Tax" DisplayMemberBinding="{Binding TaxTotal}" />
                                        <GridViewColumn Header="Total" DisplayMemberBinding="{Binding Total}" />
                                    </GridView>
                                </ListView.View>
                            </ListView>
                            <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
                                <TextBlock Text="Total possible spending: $" />
                                <TextBlock Text="{Binding TotalToBeSpent}" />
                            </StackPanel>
                            <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
                                <TextBlock Text="Actual total spent: $" />
                                <TextBlock Text="{Binding TotalSpent}" />
                            </StackPanel>
                        </StackPanel>
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </BlockUIContainer>
    </FlowDocument>
</UserControl>