<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="05/21/2013 10:46:50" ReportInfo.Modified="12/21/2016 17:13:41" ReportInfo.CreatorVersion="2016.4.12.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
  {     
    public decimal cdec(string v)
    {
      try
      {
        return Convert.ToDecimal(v);
      }
      catch{ return 0;}      
    }
    public bool IsNumeric(string v)
    {
      decimal o=0;
      if(string.IsNullOrEmpty(v))return false;
      else return decimal.TryParse(v,out o);
    }
  }
}
</ScriptText>
  <Styles>
    <Style Name="HeaderFooter" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" TextFill.Color="Navy" ApplyFont="false"/>
    <Style Name="HeaderFooter2" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="192, 192, 255" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" TextFill.Color="Navy" ApplyFont="false"/>
    <Style Name="HeaderFooterVert" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Gray" Fill.EndColor="Black" Fill.Angle="0" Fill.Focus="0.5" Fill.Contrast="1" TextFill.Color="White" ApplyFont="false"/>
    <Style Name="TableRadif" Border.Lines="All" Border.Color="DimGray" Border.Style="Dash" Border.Width="0.5" ApplyFill="false" ApplyFont="false"/>
  </Styles>
  <Dictionary>
    <OleDbDataConnection Name="Connection" ConnectionString="rijcmlqoDWEBRlB24atBGpA/h9/NcJd7NSF1v8voegt4ZjxrkxkE4cNqgQ25xWd0yMXGhBO97LNc/abzlAaiS6uRX8hdwR9eSLNDWv0TiX1Kn1cnDK2/sLVSWF1Wvex+FBBSaRoNYk3UR6V7FuiNAhwRlsp0o+OwH4O1zsxK/tanhgwGGL0xrpRZssw9Xzjusp0mbcoTngAUqwg+WbjK4DOn8QBeYHIChZdbGAiK1EgmWeqx2o=">
      <TableDataSource Name="Table" Alias="ViewFullAnalyze" DataType="System.Int32" Enabled="true" SelectCommand="SELECT A.ID, A.Tarikh, A.IDKala, A.NameKala, A.Tonage, A.Rasmi, A.Dakheli, A.StandardID, A.StandardName, A.Tozihat, A.Operator, A1.Radif, A1.IDElement, A1.NameElement, A1.TypeElement, A1.StandardValue, A1.Meghdar&#13;&#10;FROM [Analyze] A INNER JOIN [AnalyzeData] A1 ON A.ID = A1.ID &#13;&#10;">
        <Column Name="ID" DataType="System.Int32"/>
        <Column Name="Tarikh" DataType="System.String"/>
        <Column Name="IDKala" DataType="System.Int32"/>
        <Column Name="NameKala" DataType="System.String"/>
        <Column Name="Tonage" DataType="System.Decimal"/>
        <Column Name="Rasmi" DataType="System.Boolean" BindableControl="CheckBox"/>
        <Column Name="Dakheli" DataType="System.Boolean" BindableControl="CheckBox"/>
        <Column Name="StandardID" DataType="System.Int32"/>
        <Column Name="StandardName" DataType="System.String"/>
        <Column Name="Tozihat" DataType="System.String"/>
        <Column Name="Operator" DataType="System.String"/>
        <Column Name="Radif" DataType="System.Int32"/>
        <Column Name="IDElement" DataType="System.String"/>
        <Column Name="NameElement" DataType="System.String"/>
        <Column Name="TypeElement" DataType="System.String"/>
        <Column Name="StandardValue" DataType="System.String"/>
        <Column Name="Meghdar" DataType="System.String"/>
      </TableDataSource>
    </OleDbDataConnection>
    <Relation Name="Analyze_AnalyzeData" ParentDataSource="null" ChildDataSource="null" ParentColumns="ID" ChildColumns="ID" Enabled="true"/>
    <Parameter Name="Tarikh" DataType="System.String"/>
    <Parameter Name="CoName" DataType="System.String"/>
    <Parameter Name="Condition" DataType="System.String"/>
    <Parameter Name="Title" DataType="System.String"/>
    <Total Name="TotalVazn" Expression="[ViewFullAnalyze.Tonage]" Evaluator="Data1"/>
    <Total Name="SumMeghVazn" Expression="cdec([ViewFullAnalyze.Meghdar])*[ViewFullAnalyze.Tonage]" Evaluator="Data1" EvaluateCondition="IsNumeric([ViewFullAnalyze.Meghdar])"/>
    <Total Name="TotalVaznForAvg" Expression="[ViewFullAnalyze.Tonage]" Evaluator="Data1" EvaluateCondition="IsNumeric([ViewFullAnalyze.Meghdar])"/>
  </Dictionary>
  <ReportPage Name="Page1">
    <PageHeaderBand Name="PageHeader1" Width="718.2" Height="56.7">
      <PictureObject Name="pctLogo" Left="680.4" Width="37.8" Height="37.8" Image="[encoded data, 6068 characters]"/>
      <TextObject Name="txtCoName" Left="425.25" Width="255.15" Height="37.8" Fill="LinearGradient" Fill.StartColor="255, 128, 0" Fill.EndColor="White" Fill.Angle="180" Fill.Focus="1" Fill.Contrast="1" Text="[CoName]" VertAlign="Center" RightToLeft="true" Font="B Titr, 11pt, style=Bold"/>
      <TableObject Name="Table2" Top="37.8" Width="717.75" Height="18.9">
        <TableColumn Name="Column27" Width="91.1"/>
        <TableColumn Name="Column26" Width="100.55"/>
        <TableColumn Name="Column15" Width="91.09"/>
        <TableColumn Name="Column25" Width="100.79"/>
        <TableColumn Name="Column24" Width="183.89"/>
        <TableColumn Name="Column16" Width="73.96"/>
        <TableColumn Name="Column17" Width="38.57"/>
        <TableColumn Name="Column42" Width="37.8"/>
        <TableRow Name="Row3">
          <TableCell Name="Cell64" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Text="مقدار آنالیز" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter"/>
          <TableCell Name="Cell63" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Text="مقدار استاندارد" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter"/>
          <TableCell Name="Cell52" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Text="نام استاندارد" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter"/>
          <TableCell Name="Cell62" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Text="وزن کالا" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter"/>
          <TableCell Name="Cell61" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Text="نام محصول/کالا" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter"/>
          <TableCell Name="Cell53" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Text="تاریخ" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter"/>
          <TableCell Name="Cell54" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Text="سریال" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter"/>
          <TableCell Name="Cell79" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Text="ردیف" Padding="0, 0, 0, 0" HorzAlign="Center" VertAlign="Center" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter"/>
        </TableRow>
      </TableObject>
      <TextObject Name="Text61" Left="151.2" Width="37.8" Height="18.9" Text="تاریخ :" Padding="0, 0, 0, 0" HorzAlign="Right" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold"/>
      <TextObject Name="Text62" Left="75.6" Width="75.6" Height="18.9" Text="[Tarikh]" Padding="0, 0, 0, 0" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold"/>
      <TextObject Name="Text64" Left="189" Top="18.9" Width="255.15" Height="18.9" Text="[Condition]" AutoShrink="FontSize" HorzAlign="Center" RightToLeft="true" Font="hNazanin, 9pt, style=Bold"/>
      <TextObject Name="Text60" Left="189" Width="255.15" Height="18.9" Text="« [Title] »" Padding="0, 0, 0, 0" AutoShrink="FontSize" HorzAlign="Center" VertAlign="Center" Font="B Titr, 12pt, style=Bold"/>
      <TextObject Name="Text65" Left="18.9" Top="18.9" Width="132.3" Height="18.9" Text="[ViewFullAnalyze.NameElement]" Padding="0, 0, 0, 0" AutoShrink="FontSize" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold"/>
      <TextObject Name="Text66" Left="151.2" Top="18.9" Width="37.8" Height="18.9" Text="مولفه :" Padding="0, 0, 0, 0" HorzAlign="Right" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold"/>
      <TableObject Name="Table7" Width="18.9" Height="37.74" Border.Lines="All" Border.Style="DashDot" Border.Width="0.5">
        <TableColumn Name="Column113" Width="18.9"/>
        <TableRow Name="Row22" Height="6.29">
          <TableCell Name="CellHasebAdv" Border.Lines="All" Border.Style="Dot" Border.Width="0.5" Text="سیستم جامع&#13;&#10;آزمایشـگاه" Padding="0, -3, -8, 0" HorzAlign="Center" VertAlign="Center" Angle="90" Font="B Titr, 6pt, style=Bold" TextFill.Color="128, 128, 255" LineHeight="8.32" RowSpan="6"/>
        </TableRow>
        <TableRow Name="Row23" Height="6.29">
          <TableCell Name="Cell182" Padding="0, 0, 0, 0"/>
        </TableRow>
        <TableRow Name="Row24" Height="6.29">
          <TableCell Name="Cell183" Padding="0, 0, 0, 0"/>
        </TableRow>
        <TableRow Name="Row25" Height="6.29">
          <TableCell Name="Cell184" Padding="0, 0, 0, 0"/>
        </TableRow>
        <TableRow Name="Row26" Height="6.29">
          <TableCell Name="Cell185" Padding="0, 0, 0, 0"/>
        </TableRow>
        <TableRow Name="Row27" Height="6.29">
          <TableCell Name="Cell186" Padding="0, 0, 0, 0"/>
        </TableRow>
      </TableObject>
    </PageHeaderBand>
    <DataBand Name="Data1" Top="58.66" Width="718.2" Height="18.9" DataSource="Table">
      <TableObject Name="Table1" Width="717.75" Height="18.9">
        <TableColumn Name="Column28" Width="91.1"/>
        <TableColumn Name="Column29" Width="100.55"/>
        <TableColumn Name="Column30" Width="91.09"/>
        <TableColumn Name="Column31" Width="100.79"/>
        <TableColumn Name="Column32" Width="183.89"/>
        <TableColumn Name="Column33" Width="73.96"/>
        <TableColumn Name="Column34" Width="38.57"/>
        <TableColumn Name="Column43" Width="37.8"/>
        <TableRow Name="Row4">
          <TableCell Name="Cell65" Border.Lines="All" Border.Color="DimGray" Border.Style="Dash" Border.Width="0.5" Text="[ViewFullAnalyze.Meghdar]" Padding="0, 0, 0, 0" AutoShrink="FontSize" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" Style="TableRadif"/>
          <TableCell Name="Cell66" Border.Lines="All" Border.Color="DimGray" Border.Style="Dash" Border.Width="0.5" Text="[ViewFullAnalyze.StandardValue]" Padding="0, 0, 0, 0" AutoShrink="FontSize" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" Style="TableRadif"/>
          <TableCell Name="Cell67" Border.Lines="All" Border.Color="DimGray" Border.Style="Dash" Border.Width="0.5" Text="[ViewFullAnalyze.StandardName]" Padding="0, 0, 0, 0" AutoShrink="FontSize" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" Style="TableRadif"/>
          <TableCell Name="Cell68" Border.Lines="All" Border.Color="DimGray" Border.Style="Dash" Border.Width="0.5" Text="[ViewFullAnalyze.Tonage]" Padding="0, 0, 0, 0" Format="Custom" Format.Format="###,###,##0.####;###,###,##0.####-" AutoShrink="FontSize" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" Style="TableRadif"/>
          <TableCell Name="Cell69" Border.Lines="All" Border.Color="DimGray" Border.Style="Dash" Border.Width="0.5" Text="[ViewFullAnalyze.NameKala]" Padding="0, 0, 0, 0" AutoShrink="FontSize" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" Style="TableRadif"/>
          <TableCell Name="Cell70" Border.Lines="All" Border.Color="DimGray" Border.Style="Dash" Border.Width="0.5" Text="[ViewFullAnalyze.Tarikh]" Padding="0, 0, 0, 0" AutoShrink="FontSize" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" Style="TableRadif"/>
          <TableCell Name="Cell71" Border.Lines="All" Border.Color="DimGray" Border.Style="Dash" Border.Width="0.5" Text="[ViewFullAnalyze.ID]" Padding="0, 0, 0, 0" AutoShrink="FontSize" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" Style="TableRadif"/>
          <TableCell Name="Cell80" Border.Lines="All" Border.Color="DimGray" Border.Style="Dash" Border.Width="0.5" Text="[Row#]" Padding="0, 0, 0, 0" AutoShrink="FontSize" HorzAlign="Center" VertAlign="Center" WordWrap="false" Font="hNazanin, 10pt, style=Bold" Style="TableRadif"/>
        </TableRow>
      </TableObject>
    </DataBand>
    <ReportSummaryBand Name="ReportSummary1" Top="79.52" Width="718.2" Height="236.25">
      <PictureObject Name="Chart" Top="18.9" Width="718.2" Height="160.65" SizeMode="StretchImage"/>
      <TableObject Name="Table1" Width="717.75" Height="18.9">
        <TableColumn Name="Column35" Width="91.1"/>
        <TableColumn Name="Column36" Width="100.55"/>
        <TableColumn Name="Column37" Width="91.09"/>
        <TableColumn Name="Column38" Width="100.79"/>
        <TableColumn Name="Column39" Width="221.69"/>
        <TableColumn Name="Column40" Width="73.96"/>
        <TableColumn Name="Column41" Width="38.57"/>
        <TableRow Name="Row5">
          <TableCell Name="Cell72" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Text="[IIf([TotalVaznForAvg]==0,0,[SumMeghVazn]/[TotalVaznForAvg])]" Padding="0, 0, 0, 0" HideZeros="true" Format="Custom" Format.Format="###,###,##0.####;###,###,##0.####-" AutoShrink="FontSize" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter"/>
          <TableCell Name="Cell73" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Padding="0, 0, 0, 0" AutoShrink="FontSize" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter"/>
          <TableCell Name="Cell74" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Padding="0, 0, 0, 0" AutoShrink="FontSize" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter"/>
          <TableCell Name="Cell75" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Text="[TotalVazn]" Padding="0, 0, 0, 0" Format="Custom" Format.Format="###,###,##0.####;###,###,##0.####-" AutoShrink="FontSize" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter"/>
          <TableCell Name="Cell76" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Text="مجموع / میانگین موزون :" Padding="0, 0, 0, 0" AutoShrink="FontSize" HorzAlign="Right" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter" ColSpan="3"/>
          <TableCell Name="Cell77" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Padding="0, 0, 0, 0" AutoShrink="FontSize" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter"/>
          <TableCell Name="Cell78" Border.Lines="All" Border.Color="DimGray" Border.Style="Dot" Border.Width="0.5" Fill="LinearGradient" Fill.StartColor="Silver" Fill.EndColor="Gainsboro" Fill.Angle="90" Fill.Focus="0.5" Fill.Contrast="0.76" Padding="0, 0, 0, 0" AutoShrink="FontSize" HorzAlign="Center" VertAlign="Center" RightToLeft="true" WordWrap="false" Font="hNazanin, 10pt, style=Bold" TextFill.Color="Navy" Style="HeaderFooter"/>
        </TableRow>
      </TableObject>
      <TextObject Name="Text58" Left="406.35" Top="189" Width="245.7" Height="47.25" Text="امضا تایید کننده" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="P Mitra, 10pt, style=Bold" TextFill.Color="Gray"/>
      <TextObject Name="Text59" Left="94.5" Top="189" Width="245.7" Height="47.25" Text="امضا تهیه کننده" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="P Mitra, 10pt, style=Bold" TextFill.Color="Gray"/>
    </ReportSummaryBand>
  </ReportPage>
</Report>
