<FlowDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:xrd="clr-namespace:CodeReason.Reports.Document;assembly=CodeReason.Reports" 
              PageHeight="29.7cm" PageWidth="21cm" ColumnWidth="21cm">
    <xrd:ReportProperties>
        <!--<xrd:ReportProperties.ReportName>LoadingSheet</xrd:ReportProperties.ReportName>
        <xrd:ReportProperties.ReportTitle>Van Statement</xrd:ReportProperties.ReportTitle>-->
    </xrd:ReportProperties>
    <xrd:SectionReportHeader PageHeaderHeight="15" Padding="10,10,10,0" FontSize="12">
        <Table Name="PageHeaders" CellSpacing="0">
            <Table.Columns>
                <TableColumn Width="*" />
                <TableColumn Width="*" />
            </Table.Columns>
            <TableRowGroup>
                <TableRow>
                    <TableCell FontSize="12"  FontFamily="Arial">
                        <Paragraph>Horizon Technology Solutions</Paragraph>
                    </TableCell>
                    <TableCell FontSize="12"  FontFamily="Arial">
                        <Paragraph TextAlignment="Right" FontFamily="Arial">
                            <xrd:InlineDocumentValue PropertyName="PrintDate" Format="dd.MM.yyyy HH:mm:ss"/>
                        </Paragraph>
                    </TableCell>
                </TableRow>
            </TableRowGroup>
        </Table>
        <Table Name="FirmDet" CellSpacing="0">
            <Table.Columns>
                <TableColumn Width="*" />
            </Table.Columns>
            <TableRowGroup>
                <TableRow>
                    <TableCell FontSize="20" FontFamily="Arial" TextAlignment="Center">
                        <Paragraph>
                            <xrd:InlineDocumentValue PropertyName="FirmName" />
                        </Paragraph>
                    </TableCell>
                </TableRow>
                <TableRow>
                    <TableCell FontSize="14" FontFamily="Arial" TextAlignment="Center">
                        <Paragraph>
                            <xrd:InlineDocumentValue PropertyName="DoorNo" /> ,
                            <xrd:InlineDocumentValue PropertyName="Street" /> ,
                            <xrd:InlineDocumentValue PropertyName="City" /> ,
                            <xrd:InlineDocumentValue PropertyName="District" /> ,
                        </Paragraph>
                    </TableCell>
                </TableRow>
                <TableRow>
                    <TableCell FontSize="14" FontFamily="Arial" TextAlignment="Center">
                        <Paragraph>Phone :
                            <xrd:InlineDocumentValue PropertyName="Phone1" /> ,
                            <xrd:InlineDocumentValue PropertyName="Phone2" /> ,
                            <xrd:InlineDocumentValue PropertyName="Phone3" /> ,
                        </Paragraph>
                    </TableCell>
                </TableRow>
                <TableRow>
                    <TableCell FontSize="12" FontFamily="Arial" TextAlignment="Center">
                        <Paragraph>E-mail :
                            <xrd:InlineDocumentValue PropertyName="Email" /> ,
                        </Paragraph>
                    </TableCell>
                </TableRow>
                <TableRow>
                    <TableCell FontSize="12" FontFamily="Arial" TextAlignment="Center">
                        <Paragraph>Web site :
                            <xrd:InlineDocumentValue PropertyName="Website" /> ,
                        </Paragraph>
                    </TableCell>
                </TableRow>
            </TableRowGroup>
        </Table>
        <Table Name="ReportDet" CellSpacing="0">
            <Table.Columns>
                <TableColumn Width="*" />
            </Table.Columns>
            <TableRowGroup>
                <TableRow>
                    <TableCell FontSize="16" FontFamily="Arial" TextAlignment="Center">
                        <Paragraph TextDecorations="Underline">
                            <xrd:InlineDocumentValue PropertyName="ReportName"/>
                        </Paragraph>
                    </TableCell>
                </TableRow>
                <TableRow>
                    <TableCell FontSize="14" FontFamily="Arial" TextAlignment="Center">
                        <Paragraph>Delivery Man :
                            <xrd:InlineDocumentValue PropertyName="DeliveryMan" /> Delivery Date :
                            <xrd:InlineDocumentValue PropertyName="DeliveryDate" Format="dd/MM/yyyy"/>
                        </Paragraph>
                    </TableCell>
                </TableRow>
            </TableRowGroup>
        </Table>
    </xrd:SectionReportHeader>
    <xrd:SectionReportFooter PageFooterHeight="5" Padding="10,0,10,10" FontSize="12">
        <Table Name="PageFooter" CellSpacing="0">
            <Table.Columns>
                <TableColumn Width="*" />
                <TableColumn Width="*" />
            </Table.Columns>
            <TableRowGroup>
                <TableRow>
                    <TableCell>
                        <Paragraph>Horizon Technology Solutions
                            <!--<Image Tag="dpd.jpg" Height="0.5cm" />-->
                        </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Right">
                            Page
                            <xrd:InlineContextValue PropertyName="PageNumber" FontWeight="Bold" /> of
                            <xrd:InlineContextValue PropertyName="PageCount" FontWeight="Bold" />
                        </Paragraph>
                    </TableCell>
                </TableRow>
            </TableRowGroup>
        </Table>
    </xrd:SectionReportFooter>
    <Section Padding="0,0,0,0" FontSize="12">
        <!--<Paragraph FontSize="24" FontWeight="Bold">
            <xrd:InlineContextValue PropertyName="ReportTitle" />
        </Paragraph>-->
        <xrd:SectionDataGroup DataGroupName="VanStatement">
            <Table CellSpacing="0" BorderBrush="Black" BorderThickness="0.02cm">
                <Table.Resources>
                    <!-- Style for header/footer rows. -->
                    <Style x:Key="headerFooterRowStyle" TargetType="{x:Type TableRowGroup}">
                        <Setter Property="FontFamily" Value="Arial"/>
                        <Setter Property="FontWeight" Value="DemiBold"/>
                        <Setter Property="FontSize" Value="10"/>
                    </Style>

                    <!-- Style for data rows. -->
                    <Style x:Key="dataRowStyle" TargetType="{x:Type TableRowGroup}">
                        <Setter Property="FontSize" Value="10"/>
                        <Setter Property="FontFamily" Value="Arial"/>
                    </Style>

                    <!-- Style for data cells. -->
                    <Style TargetType="{x:Type TableCell}">
                        <Setter Property="FontFamily" Value="Arial"/>
                        <Setter Property="Padding" Value="0.1cm"/>
                        <Setter Property="BorderBrush" Value="Black"/>
                        <Setter Property="BorderThickness" Value="0.01cm"/>
                    </Style>
                </Table.Resources>

                <Table.Columns>
                    <TableColumn Width="1.0*" />
                    <TableColumn Width="1.0*" />
                    <TableColumn Width="1.0*" />
                    <TableColumn Width="1.0*" />
                    <TableColumn Width="1.0*" />
                    <TableColumn Width="1.0*" />
                    <TableColumn Width="1.0*" />
                    <TableColumn Width="1.0*" />
                    <TableColumn Width="1.0*" />
                </Table.Columns>
                <TableRowGroup Style="{StaticResource headerFooterRowStyle}">
                    <TableRow>
                        <TableCell>
                            <Paragraph TextAlignment="Center">
                                <Bold>Invoice Date</Bold>
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Center">
                                <Bold>Party Name</Bold>
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Center">
                                <Bold>E-wayBillNo</Bold>
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Center">
                                <Bold>VchNo</Bold>
                            </Paragraph>
                        </TableCell>                        
                        <TableCell>
                            <Paragraph TextAlignment="Center">
                                <Bold>Cash</Bold>
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Center">
                                <Bold>Credit</Bold>
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Center">
                                <Bold>Tax Total</Bold>
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Center">
                                <Bold>Amount</Bold>
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph TextAlignment="Center">
                                <Bold>Outstanding</Bold>
                            </Paragraph>
                        </TableCell>                        
                    </TableRow>
                </TableRowGroup>
                <TableRowGroup Style="{StaticResource dataRowStyle}">
                    <xrd:TableRowForDataTable TableName="VanStatement">
                        <TableCell>
                            <Paragraph>
                                <xrd:InlineTableCellValue PropertyName="BillDate" />
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph>
                                <xrd:InlineTableCellValue PropertyName="LedgerName" />
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph>
                                <xrd:InlineTableCellValue PropertyName="EwayBillNo"/>
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph>
                                <xrd:InlineTableCellValue PropertyName="VchNo"/>
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph>
                                <xrd:InlineTableCellValue PropertyName="Cash" AggregateGroup="Cash"/>
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph>
                                <xrd:InlineTableCellValue PropertyName="Credit" AggregateGroup="Credit"/>
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph>
                                <xrd:InlineTableCellValue PropertyName="TaxTotal" AggregateGroup="TaxTotal"/>
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph>
                                <xrd:InlineTableCellValue PropertyName="Amount" AggregateGroup="Amount"/>
                            </Paragraph>
                        </TableCell>
                        <TableCell>
                            <Paragraph>
                                <xrd:InlineTableCellValue PropertyName="Outstanding" AggregateGroup="Outstanding"/>
                            </Paragraph>
                        </TableCell>
                    </xrd:TableRowForDataTable>
                </TableRowGroup>
            </Table>
             <Table Name="ItemTotals" Margin="0,0,20,0" CellSpacing="0" BorderBrush="Black" BorderThickness="0,0,0,1">
            <Table.Columns>
            <TableColumn Width="50" />
            <TableColumn Width="350" />
            <TableColumn Width="110" />
                <TableColumn Width="70" />
                <TableColumn Width="80" />
		            <TableColumn Width="95" />
		            
            </Table.Columns>
            <TableRowGroup>
                <TableRow FontWeight="bold">
                 <TableCell>
                            <Paragraph TextAlignment="Right" FontSize="15" FontFamily="Draft 10cpi">Total :
                                
                            </Paragraph>
                    </TableCell>
                  
                   <TableCell>
                            <Paragraph TextAlignment="Right" FontSize="15" FontFamily="Draft 10cpi">
                                <xrd:InlineAggregateValue AggregateGroup="Cash" AggregateValueType="Sum" EmptyValue="0"  />
                            </Paragraph>
                    </TableCell>
                    <TableCell>
                            <Paragraph TextAlignment="Right" FontSize="15" FontFamily="Draft 10cpi">
                                <xrd:InlineAggregateValue AggregateGroup="Credit" AggregateValueType="Sum" EmptyValue="0" />
                            </Paragraph>
                    </TableCell>
                     <TableCell>
                            <Paragraph TextAlignment="Right" FontSize="15" FontFamily="Draft 10cpi">
                            <xrd:InlineAggregateValue AggregateGroup="TaxTotal" AggregateValueType="Sum" EmptyValue="0"/>
                            </Paragraph>
                    </TableCell>
                    <TableCell>
                        <Paragraph TextAlignment="Right" FontSize="15" FontFamily="Draft 10cpi"> 
                           <xrd:InlineAggregateValue AggregateGroup="Amount" AggregateValueType="Sum" EmptyValue="0"  />

                        </Paragraph>
                    </TableCell>
		   <TableCell>
                        <Paragraph TextAlignment="Right" FontSize="15" FontFamily="Draft 10cpi"> 
                           <xrd:InlineAggregateValue AggregateGroup="Outstanding" AggregateValueType="Sum" EmptyValue="0"  />

                        </Paragraph>
                    </TableCell>
		   
                </TableRow>
            </TableRowGroup>
        </Table>
        </xrd:SectionDataGroup>
    </Section>
</FlowDocument>
