﻿<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" DoublePass="true" ReportInfo.Created="09/27/2013 16:01:23" ReportInfo.Modified="06/09/2015 10:32:29" ReportInfo.CreatorVersion="1.6.57.0">
  <ScriptText>using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Data;
using FastReport;
using FastReport.Data;
using FastReport.Dialog;
using FastReport.Barcode;
using FastReport.Table;
using FastReport.Utils;

namespace FastReport
{
  public class ReportScript
  {
    
    private void PageHeader1_AfterData(object sender, EventArgs e)
    {
      //Print the SalesRep
      if (Report.GetColumnValue(&quot;trans.SalesRep&quot;).ToString().Length == 0)
        txtSalesRep2.Visible = false;  
      
    }
    
    

    
  }
}
</ScriptText>
  <Dictionary>
    <MySqlDataConnection Name="Connection" ConnectionString="rijcmlqvPT/uGtq7mDUOjqaWuhGg+L4M6JSzK6kmKcze5kxuKHd01n+NCUMF5bzQTKxV8yuYsuHNxpzF2pHC5nqnuwPf6tlysTiCgH5DPuC4RqFfbc=">
      <TableDataSource Name="clients" DataType="System.Int32" Enabled="true" TableName="clients" SelectCommand="SELECT * FROM clients WHERE ID = 1">
        <Column Name="ID" DataType="System.UInt32"/>
        <Column Name="Name" DataType="System.String"/>
        <Column Name="Email" DataType="System.String"/>
        <Column Name="BillingAddress" DataType="System.String"/>
        <Column Name="ContactNo" DataType="System.String"/>
      </TableDataSource>
      <TableDataSource Name="companies" DataType="System.Int32" Enabled="true" TableName="companies" SelectCommand="select * from companies where ID = 4">
        <Column Name="ID" DataType="System.UInt32"/>
        <Column Name="Name" DataType="System.String"/>
        <Column Name="Email" DataType="System.String"/>
        <Column Name="Address" DataType="System.String"/>
        <Column Name="RegNo" DataType="System.String"/>
        <Column Name="VATno" DataType="System.String"/>
        <Column Name="ContactNo" DataType="System.String"/>
        <Column Name="AltNo" DataType="System.String"/>
        <Column Name="FaxNo" DataType="System.String"/>
        <Column Name="CellNo" DataType="System.String"/>
        <Column Name="LogoPath" DataType="System.String"/>
        <Column Name="InvoiceSize" DataType="System.String"/>
        <Column Name="InvoiceStylePath" DataType="System.String"/>
        <Column Name="VATrate" DataType="System.String"/>
        <Column Name="BankingDetails" DataType="System.String"/>
      </TableDataSource>
      <TableDataSource Name="trans" DataType="System.Int32" PropName="cash_sales" Enabled="true" TableName="trans" SelectCommand="select * from payouts">
        <Column Name="ID" DataType="System.UInt32"/>
        <Column Name="CompanyID" DataType="System.UInt32"/>
        <Column Name="Date" DataType="System.DateTime"/>
        <Column Name="SalesRep" DataType="System.String"/>
        <Column Name="TransID" DataType="System.UInt32"/>
        <Column Name="Reason" DataType="System.String"/>
        <Column Name="AmountPaid" DataType="System.Decimal"/>
        <Column Name="PaymentMethod" DataType="System.String"/>
        <Column Name="RelatedNo" DataType="System.String"/>
        <Column Name="VATamount" DataType="System.Decimal"/>
      </TableDataSource>
    </MySqlDataConnection>
    <Relation Name="sales_sales_items" ParentDataSource="null" ChildDataSource="null" ParentColumns="ID" ChildColumns="SalesID" Enabled="true"/>
    <Relation Name="sales_companies" ParentDataSource="null" ChildDataSource="null" ParentColumns="CompanyID" ChildColumns="ID" Enabled="true"/>
    <Parameter Name="CompanyID" DataType="System.Int32"/>
  </Dictionary>
  <ReportPage Name="Page1" PaperWidth="110" PaperHeight="1000" LeftMargin="3" RightMargin="3" FirstPageSource="15" OtherPagesSource="15">
    <PageHeaderBand Name="PageHeader1" Width="393.12" Height="292.95" CanGrow="true" CanShrink="true" AfterDataEvent="PageHeader1_AfterData">
      <TextObject Name="Text2" Top="47.25" Width="321.3" Height="18.9" CanGrow="true" CanShrink="true" Text="Date: [trans.Date]" Format="Custom" Format.Format="yyyy-MM-dd HH:mm" HorzAlign="Center" Font="Courier New, 8pt"/>
      <TextObject Name="Text14" Top="103.95" Width="321.3" Height="18.9" CanGrow="true" CanShrink="true" Text="[companies.Name]" HorzAlign="Center" WordWrap="false" Font="Courier New, 8pt, style=Bold" TextFill.Color="DimGray" Clip="false"/>
      <TextObject Name="txtInvoice" Top="9.45" Width="321.3" Height="18.9" Border.Shadow="true" Border.ShadowColor="Transparent" CanGrow="true" CanShrink="true" Text="Payout" HorzAlign="Center" Font="Courier New, 8pt, style=Bold" TextFill.Color="DimGray"/>
      <TextObject Name="txtSalesRep2" Top="66.15" Width="321.3" Height="18.9" CanGrow="true" CanShrink="true" Text="Sales Rep: [trans.SalesRep]" HorzAlign="Center" Font="Courier New, 8pt"/>
      <TextObject Name="Text44" Top="198.45" Width="321.3" Height="18.9" CanGrow="true" CanShrink="true" Text="Reg. No: [companies.RegNo]" HorzAlign="Center" Font="Courier New, 8pt"/>
      <TextObject Name="Text45" Top="236.25" Width="321.3" Height="18.9" CanGrow="true" CanShrink="true" Text="Vat No: [companies.VATno]" HorzAlign="Center" Font="Courier New, 8pt"/>
      <TextObject Name="Text46" Top="255.15" Width="321.3" Height="18.9" CanGrow="true" CanShrink="true" Text="Alt. No: [companies.AltNo]" HorzAlign="Center" Font="Courier New, 8pt"/>
      <TextObject Name="Text52" Top="274.05" Width="321.3" Height="18.9" CanGrow="true" CanShrink="true" Text="Email: [companies.Email]" HorzAlign="Center" Font="Courier New, 8pt"/>
      <TextObject Name="Text55" Top="217.35" Width="321.3" Height="18.9" CanGrow="true" CanShrink="true" Text="Tel. No: [companies.ContactNo]" HorzAlign="Center" Font="Courier New, 8pt"/>
      <TextObject Name="txtInvoiceNumber" Top="28.35" Width="321.3" Height="18.9" CanGrow="true" CanShrink="true" Text="# [trans.TransID]" HorzAlign="Center" Font="Courier New, 8pt"/>
      <TextObject Name="Text1" Top="122.85" Width="321.3" Height="18.9" CanGrow="true" CanShrink="true" BreakTo="Text17" Text="[companies.Address]" HorzAlign="Center" Font="Courier New, 8pt"/>
      <TextObject Name="Text17" Top="141.75" Width="321.3" Height="18.9" CanGrow="true" CanShrink="true" BreakTo="Text72" HorzAlign="Center" Font="Courier New, 8pt"/>
      <TextObject Name="Text72" Top="160.65" Width="321.3" Height="18.9" CanGrow="true" CanShrink="true" BreakTo="Text73" HorzAlign="Center" Font="Courier New, 8pt"/>
      <TextObject Name="Text73" Top="179.55" Width="321.3" Height="18.9" CanGrow="true" CanShrink="true" HorzAlign="Center" Font="Courier New, 8pt"/>
      <TextObject Name="Text110" Top="85.05" Width="321.3" Height="18.9" CanGrow="true" CanShrink="true" Text=" " Font="Courier New, 8pt"/>
      <ChildBand Name="Child4" Top="296.95" Width="393.12" Height="56.7">
        <TextObject Name="Text63" Top="37.8" Width="274.05" Height="18.9" Text="--------------------------------------" Font="Courier New, 8pt"/>
        <TextObject Name="Text15" Left="226.8" Top="18.9" Width="113.4" Height="18.9" Text="Total" HorzAlign="Right" Font="Courier New, 8pt"/>
        <TextObject Name="Text10" Top="18.9" Width="207.9" Height="18.9" Text="Reason for Payout" Font="Courier New, 8pt"/>
        <TextObject Name="Text65" Width="274.05" Height="18.9" Text="--------------------------------------" Font="Courier New, 8pt"/>
      </ChildBand>
    </PageHeaderBand>
    <DataBand Name="Data1" Top="357.65" Width="393.12" Height="37.8" CanGrow="true" CanShrink="true" KeepTogether="true" KeepDetail="true">
      <TextObject Name="Text24" Left="236.25" Width="103.95" Height="18.9" Text="[trans.AmountPaid]" HideZeros="true" Format="Number" Format.UseLocale="false" Format.DecimalDigits="2" Format.DecimalSeparator="." Format.GroupSeparator=" " Format.NegativePattern="1" HorzAlign="Right" WordWrap="false" Font="Courier New, 8pt" Trimming="EllipsisCharacter"/>
      <TextObject Name="Text71" Width="226.8" Height="18.9" CanGrow="true" CanShrink="true" BreakTo="Text111" Text="[trans.Reason]" Font="Courier New, 8pt"/>
      <TextObject Name="Text111" Top="18.9" Width="226.8" Height="18.9" CanGrow="true" CanShrink="true" Font="Courier New, 8pt"/>
    </DataBand>
    <DataBand Name="Data2" Top="399.45" Width="393.12" Height="207.9" CanGrow="true" CanShrink="true">
      <TextObject Name="Text64" Width="274.05" Height="18.9" Text="--------------------------------------" Font="Courier New, 8pt"/>
      <TextObject Name="Text5" Left="198.45" Top="37.8" Width="141.75" Height="18.9" Text="[trans.AmountPaid]" Format="Number" Format.UseLocale="false" Format.DecimalDigits="2" Format.DecimalSeparator="." Format.GroupSeparator=" " Format.NegativePattern="1" HorzAlign="Right" WordWrap="false" Font="Courier New, 8pt" Trimming="EllipsisCharacter"/>
      <TextObject Name="Text29" Left="56.7" Top="37.8" Width="94.5" Height="18.9" Text="Total:" Font="Courier New, 8pt, style=Bold" TextFill.Color="DimGray"/>
      <TextObject Name="Text74" Left="56.7" Top="56.7" Width="94.5" Height="18.9" Text="Related No:" Font="Courier New, 8pt, style=Bold" TextFill.Color="DimGray"/>
      <TextObject Name="Text75" Left="198.45" Top="56.7" Width="141.75" Height="18.9" Text="[trans.RelatedNo]" Format="Number" Format.UseLocale="true" HorzAlign="Right" WordWrap="false" Font="Courier New, 8pt" Trimming="EllipsisCharacter"/>
      <TextObject Name="Text67" Top="189" Width="274.05" Height="18.9" Text="--------------------------------------" Font="Courier New, 8pt"/>
      <TextObject Name="Text68" Top="75.6" Width="274.05" Height="18.9" Text="--------------------------------------" Font="Courier New, 8pt"/>
      <TextObject Name="Text112" Left="198.45" Top="18.9" Width="141.75" Height="18.9" Text="[trans.VATamount]" Format="Number" Format.UseLocale="false" Format.DecimalDigits="2" Format.DecimalSeparator="." Format.GroupSeparator=" " Format.NegativePattern="1" HorzAlign="Right" WordWrap="false" Font="Courier New, 8pt" Trimming="EllipsisCharacter"/>
      <TextObject Name="Text113" Left="56.7" Top="18.9" Width="94.5" Height="18.9" Text="VAT:" Font="Courier New, 8pt, style=Bold" TextFill.Color="DimGray"/>
    </DataBand>
  </ReportPage>
</Report>
