﻿<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" StartReportEvent="_StartReport" ReportInfo.Created="12/24/2022 12:43:35" ReportInfo.Modified="10/20/2024 10:16:46" ReportInfo.CreatorVersion="2021.4.3.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
  {
    void _StartReport(object sender, EventArgs e)
    {
 
      GroupHeader1.KeepTogether=true;                  
      if(((String)Report.GetParameterValue(&quot;ShowAccAge&quot;)) != &quot;1&quot;)
      {
        MessageBox.Show( &quot;الرجاء اختيار تصميم آخر&quot;);
        // TfrxReport( Sender).Terminated = true;
      }     
      else    
      {
        Per1.Visible = false;
        Per2.Visible = false;
        Per3.Visible = false;
        Per4.Visible = false;
        per5.Visible = false;
        per6.Visible = false;

        P11.Visible = false;
        P12.Visible = false;
        P13.Visible = false;
        P14.Visible = false;
        P15.Visible = false;
        P16.Visible = false;
      
        if(Convert.ToInt32((String)Report.GetParameterValue(&quot;PeriodCnt&quot;)) == 1)      
        {
          
       
          
          
          Per1.Visible = true;
          P11.Visible = true;
          Pe11.Visible = true; 
        
          P1.Text = &quot;اكثر من &quot;  +  &quot;( يوم&quot; +((String)Report.GetParameterValue(&quot;PeriodLen&quot;))+&quot;  )&quot;;
          P11.Text = &quot;اكثر من &quot;  +  &quot;( يوم&quot; + ((String)Report.GetParameterValue(&quot;PeriodLen&quot;)) + &quot;  )&quot;;
          
          Per4.Visible = false;
          P4.Visible = false;
          P14.Visible = false;
          Pe14.Visible = false;   
          Per4.AllowExpressions = false;
          P4.AllowExpressions = false;
          P14.AllowExpressions = false;
          Pe14.AllowExpressions = false;  
        
          per5.Visible = false;
          P5.Visible = false;
          P15.Visible = false;
          Pe15.Visible = false;
          per5.AllowExpressions = false;
          P5.AllowExpressions = false;
          P15.AllowExpressions = false;
          Pe15.AllowExpressions = false; 
            
        }
               
        if(Convert.ToInt32((String)Report.GetParameterValue(&quot;PeriodCnt&quot;)) == 2)      
        {
          
          P1.Text = &quot; &quot;  +  &quot;(&quot; +((String)Report.GetParameterValue(&quot;PeriodLen&quot;))+&quot; يوم )&quot;;
          P11.Text = &quot; &quot;  +  &quot;(&quot; + ((String)Report.GetParameterValue(&quot;PeriodLen&quot;)) + &quot; يوم )&quot;;
          
          Per1.Visible = true;
          P11.Visible = true;
          Pe11.Visible = true; 
          
          P2.Visible = true;                
          Per2.Visible = true;
          P12.Visible = true;
          Pe12.Visible = true; 
          
          P2.AllowExpressions = true;
          Per2.AllowExpressions = true;
          P12.AllowExpressions = true;
          Pe12.AllowExpressions = true; 
          
        
          Per1.Visible = true;
          P11.Visible = true;
          Pe11.Visible = true; 
        
          Per4.Visible = false;
          P4.Visible = false;
          P14.Visible = false;
          Pe14.Visible = false;   
          Per4.AllowExpressions = false;
          P4.AllowExpressions = false;
          P14.AllowExpressions = false;
          Pe14.AllowExpressions = false;  
          
          per5.Visible = false;
          P5.Visible = false;
          P15.Visible = false;
          Pe15.Visible = false;
          per5.AllowExpressions = false;
          P5.AllowExpressions = false;
          P15.AllowExpressions = false;
          Pe15.AllowExpressions = false; 
          
          
          Per3.Visible = false;
          P3.Visible = false;
          P13.Visible = false;
          Pe13.Visible = false;
          Per3.AllowExpressions = false;
          P3.AllowExpressions = false;
          P13.AllowExpressions = false;
          Pe13.AllowExpressions = false; 
          
           
        }
        if(Convert.ToInt32((String)Report.GetParameterValue(&quot;PeriodCnt&quot;)) == 3)
        {
          
          
          P1.Text = &quot; &quot;  +  &quot;(&quot; +((String)Report.GetParameterValue(&quot;PeriodLen&quot;))  +&quot; يوم )&quot;;
          P11.Text = &quot; &quot;  +  &quot;(&quot; + ((String)Report.GetParameterValue(&quot;PeriodLen&quot;)) + &quot; يوم )&quot;;
          
          
          P2.Text = &quot; &quot;  +  &quot;(&quot; +ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*2+&quot; يوم )&quot;;
          P12.Text = &quot; &quot;  +  &quot;(&quot; + ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*2 + &quot; يوم )&quot;;
          
          
          Per3.Visible = true;
          P3.Visible = true;
  
          P13.Visible = true;
          Pe13.Visible = true; 
          
          P2.AllowExpressions = true;
          Per2.AllowExpressions = true;
          P12.AllowExpressions = true;
          Pe12.AllowExpressions = true; 
          
          Per3.AllowExpressions = true;
          P3.AllowExpressions = true;
          Pe13.AllowExpressions = true;
          P13.AllowExpressions = true; 
          
          P2.Visible = true;                
          Per2.Visible = true;
          P12.Visible = true;
          Pe12.Visible = true; 
          
          
        
          Per1.Visible = true;
          P11.Visible = true;
          Pe11.Visible = true; 
        
          Per4.Visible = false;
          P4.Visible = false;
          P14.Visible = false;
          Pe14.Visible = false;   
          Per4.AllowExpressions = false;
          P4.AllowExpressions = false;
          P14.AllowExpressions = false;
          Pe14.AllowExpressions = false;  
          
          per5.Visible = false;
          P5.Visible = false;
          P15.Visible = false;
          Pe15.Visible = false;
          per5.AllowExpressions = false;
          P5.AllowExpressions = false;
          P15.AllowExpressions = false;
          Pe15.AllowExpressions = false; 
          
        }
        if(Convert.ToInt32((String)Report.GetParameterValue(&quot;PeriodCnt&quot;)) == 4)
        {   
          
          P1.Text = &quot; &quot;  +  &quot;(&quot; +((String)Report.GetParameterValue(&quot;PeriodLen&quot;))  +&quot; يوم )&quot;;
          P11.Text = &quot; &quot;  +  &quot;(&quot; + ((String)Report.GetParameterValue(&quot;PeriodLen&quot;)) + &quot; يوم )&quot;;
          
          
          P2.Text = &quot; &quot;  +  &quot;(&quot; +ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*2+&quot; يوم )&quot;;
          P12.Text = &quot; &quot;  +  &quot;(&quot; + ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*2 + &quot; يوم )&quot;;
          
          P3.Text = &quot; &quot;  +  &quot;(&quot; +ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*3+&quot; يوم )&quot;;
          P13.Text = &quot; &quot;  +  &quot;(&quot; + ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*3 + &quot; يوم )&quot;;
          
          Per3.Visible = true;
          P3.Visible = true;
  
          P13.Visible = true;
          Pe13.Visible = true;                  
          
          P2.Visible = true;                
          Per2.Visible = true;
          P12.Visible = true;
          Pe12.Visible = true; 
        
          Per1.Visible = true;
          P11.Visible = true;
          Pe11.Visible = true; 
          
          Per4.Visible = true;
          P4.Visible = true;
          P14.Visible = true;
          Pe14.Visible = true;
          Per4.AllowExpressions = true;
          P4.AllowExpressions = true;
          P14.AllowExpressions = true;
          Pe14.AllowExpressions = true;  
           
          P2.AllowExpressions = true;
          Per2.AllowExpressions = true;
          P12.AllowExpressions = true;
          Pe12.AllowExpressions = true; 
          Per3.AllowExpressions = true;
          P3.AllowExpressions = true;
          Pe13.AllowExpressions = true;
          P13.AllowExpressions = true; 
          
          
    
            
        }
        if(Convert.ToInt32((String)Report.GetParameterValue(&quot;PeriodCnt&quot;)) == 5)
        {
          
          
          P1.Text = &quot; &quot;  +  &quot;(&quot; +((String)Report.GetParameterValue(&quot;PeriodLen&quot;))  +&quot; يوم )&quot;;
          P11.Text = &quot; &quot;  +  &quot;(&quot; + ((String)Report.GetParameterValue(&quot;PeriodLen&quot;)) + &quot; يوم )&quot;;
          
          
          P2.Text = &quot; &quot;  +  &quot;(&quot; +ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*2+&quot; يوم )&quot;;
          P12.Text = &quot; &quot;  +  &quot;(&quot; + ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*2 + &quot; يوم )&quot;;
          
          P3.Text = &quot; &quot;  +  &quot;(&quot; +ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*3+&quot; يوم )&quot;;
          P13.Text = &quot; &quot;  +  &quot;(&quot; + ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*3 + &quot; يوم )&quot;;
          
          
          
              
          P4.Text = &quot; &quot;  +  &quot;(&quot; +ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*4+&quot; يوم )&quot;;
          P14.Text = &quot; &quot;  +  &quot;(&quot; + ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*4 + &quot; يوم )&quot;;
          
          
          Per3.Visible = true;
          P3.Visible = true;
  
          P13.Visible = true;
          Pe13.Visible = true;                  
          
          P2.Visible = true;                
          Per2.Visible = true;
          P12.Visible = true;
          Pe12.Visible = true; 
        
          Per1.Visible = true;
          P11.Visible = true;
          Pe11.Visible = true; 
          
           
          P2.AllowExpressions = true;
          Per2.AllowExpressions = true;
          P12.AllowExpressions = true;
          Pe12.AllowExpressions = true; 
          Per3.AllowExpressions = true;
          P3.AllowExpressions = true;
          Pe13.AllowExpressions = true;
          P13.AllowExpressions = true; 
          
          
          per5.Visible = true;
          P5.Visible = true;
          P15.Visible = true;
          Pe15.Visible = true;
          per5.AllowExpressions = true;
          P5.AllowExpressions = true;
          P15.AllowExpressions = true;
          Pe15.AllowExpressions = true; 
          
          Per4.Visible = true;
          P4.Visible = true;
          P14.Visible = true;
          Pe14.Visible = true;
          Per4.AllowExpressions = true;
          P4.AllowExpressions = true;
          P14.AllowExpressions = true;
          Pe14.AllowExpressions = true;   
 
        }
        if(Convert.ToInt32((String)Report.GetParameterValue(&quot;PeriodCnt&quot;)) == 6)
        {
          
           
          P1.Text = &quot; &quot;  +  &quot;(&quot; +((String)Report.GetParameterValue(&quot;PeriodLen&quot;))  +&quot; يوم )&quot;;
          P11.Text = &quot; &quot;  +  &quot;(&quot; + ((String)Report.GetParameterValue(&quot;PeriodLen&quot;)) + &quot; يوم )&quot;;
          
          
          P2.Text = &quot; &quot;  +  &quot;(&quot; +ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*2+&quot; يوم )&quot;;
          P12.Text = &quot; &quot;  +  &quot;(&quot; + ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*2 + &quot; يوم )&quot;;
          
          P3.Text = &quot; &quot;  +  &quot;(&quot; +ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*3+&quot; يوم )&quot;;
          P13.Text = &quot; &quot;  +  &quot;(&quot; + ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*3 + &quot; يوم )&quot;;
          
          
          
              
          P4.Text = &quot; &quot;  +  &quot;(&quot; +ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*4+&quot; يوم )&quot;;
          P14.Text = &quot; &quot;  +  &quot;(&quot; + ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*4 + &quot; يوم )&quot;;
          
               
          P5.Text = &quot; &quot;  +  &quot;(&quot; +ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*5+&quot; يوم )&quot;;
          P15.Text = &quot; &quot;  +  &quot;(&quot; + ToInt32(((String)Report.GetParameterValue(&quot;PeriodLen&quot;)))*5 + &quot; يوم )&quot;;
           
          per6.Visible = true;
          P6.Visible = true;
          P16.Visible = true;
          Pe16.Visible = true; 
          per6.AllowExpressions = true;
          P6.AllowExpressions = true;
          P16.AllowExpressions = true;
          Pe16.AllowExpressions = true; 
          
          Per3.Visible = true;
          P3.Visible = true;
          P13.Visible = true;
          Pe13.Visible = true;                  
          
          P2.Visible = true;                
          Per2.Visible = true;
          P12.Visible = true;
          Pe12.Visible = true; 
        
          Per1.Visible = true;
          P11.Visible = true;
          Pe11.Visible = true; 
              
          P2.AllowExpressions = true;
          Per2.AllowExpressions = true;
          P12.AllowExpressions = true;
          Pe12.AllowExpressions = true; 
          
          Per3.AllowExpressions = true;
          P3.AllowExpressions = true;
          Pe13.AllowExpressions = true;
          P13.AllowExpressions = true; 
          
          
          per5.Visible = true;
          P5.Visible = true;
          P15.Visible = true;
          Pe15.Visible = true;
          per5.AllowExpressions = true;
          P5.AllowExpressions = true;
          P15.AllowExpressions = true;
          Pe15.AllowExpressions = true; 
          
          Per4.Visible = true;
          P4.Visible = true;
          P14.Visible = true;
          Pe14.Visible = true;
          Per4.AllowExpressions = true;
          P4.AllowExpressions = true;
          P14.AllowExpressions = true;
          Pe14.AllowExpressions = true;   
      
        }
      }
                                            
      return ;
    }
    string name =&quot;&quot;;
    void Page1_ManualBuild(object sender, EventArgs e)
    {
      double Sum1 = 0;
      // double Sum3;
      double Sum5 = 0;
      double SumBal = 0;

      double SumDebit = 0 ;
      double SumCredit = 0;
      double count = 0;
      double line = 0;       
      String ty1= &quot;&quot;;
     
      // TfrxDataSet DataSet;
      // DataSet = MasterData1.DataSet;
      // DataSet.First;
      
      DataSourceBase ds= Report.GetDataSource(&quot;Acc_Statement_Report&quot;);
      ds.Init();
      name = ((String)Report.GetColumnValue(&quot;Acc_Statement_Report.TypeName&quot;));
      Engine.ShowBand(GroupHeader1);
       
      ty1  = ((String)Report.GetColumnValue(&quot;Acc_Statement_Report.AccCode&quot;));
      //  Sum3 = 1;                                  
     
      while  (ds.HasMoreRows)// do
      {
        
     
      
        if(((String)Report.GetColumnValue(&quot;Acc_Statement_Report.TypeName&quot;)) != &quot;&quot;)  {
          line++;
        }
        Memo11.Text=ToString(line);
        if(( ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Extra&quot;))&gt; 0)||(((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Disc&quot;)) &gt; 0))
        {
          Sum1=Sum1 + (float)(((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) - ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Credit&quot;)))  ;                                                                
          Memo6.Text=&quot; إجمالي الاضافات / الحسميات&quot;;
          Memo14.Text= Convert.ToString(FormatNumber(Sum1,2));
          Memo6.TextColor = Color.Blue;
        }
        else
        {
          if(((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.RepType&quot;)) == -1)                                  
          {
            Sum1= ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) - ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Credit&quot;));                               
            Memo6.Text=&quot;الرصيد السابق&quot;;
            Memo14.Text=Convert.ToString(FormatNumber(Sum5,2));                        
            Memo6.TextColor = Color.Red;                      
          }
          else
          {
            if(((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.PayType&quot;)) == 0)
            {                                  
              if(((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) &gt; 0)
              {                       
                Memo6.Text=&quot;نقدا&quot;;
                Memo14.Text= ToString(FormatNumber(Sum1,2));
              }
              else
              {
                Memo6.Text=&quot;&quot;;
                Memo14.Text= Convert.ToString(FormatNumber(Sum1 +(float)(((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) - ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Credit&quot;))),2));  //&amp;&amp;&amp;&amp;                                            
              }                               
            }                               
            else
            {
              Memo6.Text=&quot;&quot;;
              Memo14.Text= Convert.ToString(FormatNumber(Sum1 + (float)(((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) - ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Credit&quot;))),2)) ;//****^^^^
              Sum5= Sum1 +  (float)(((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) - ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Credit&quot;)));
              Sum1=0;
              Sum5 = Convert.ToDouble(FormatNumber(Sum5,2));
              Sum1=Sum5;
              Memo6.TextColor = Color.Black;                            
            }
          }                  
        }              
        if (ty1 !=  ((String)Report.GetColumnValue(&quot;Acc_Statement_Report.AccCode&quot;)))
        {
          Sum5=0;                           
          
          Engine.ShowBand(GroupHeader1);
     
          Engine.ShowBand(GroupFooter1);

          ty1 = ((String)Report.GetColumnValue(&quot;Acc_Statement_Report.AccCode&quot;));          
        }
        if(((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.RepType&quot;)) == -1)
        {
          Memo6.Text=&quot;الرصيد السابق&quot;;
          Memo14.Text=(Sum5).ToString();
          Sum5=0;
          Sum5=((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) -((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Credit&quot;)) ;
          Sum5 = Convert.ToDouble(FormatNumber(Sum5,2));
          Memo6.TextColor = Color.Red;                         
        }              
        else
        {
          if(((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.PayType&quot;)) == 0)
          {
            if(((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) &gt; 0)
            {                       
              Memo6.Text=&quot;نقدا&quot;;
              Memo14.Text= ToString(FormatNumber(Sum1,2)) ;
            }
            else
            {                      
              if(((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) &lt; 0)
              {
                Memo6.Text =&quot;&quot;;
                Memo14.Text= Convert.ToString(FormatNumber(Sum1 + (float)(((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) - ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Credit&quot;))),2)) ;                                   
              }
              else
              {                                    
                Memo6.Text=&quot;&quot;;
               Memo14.Text=&quot;&quot;;
                Memo6.TextColor = Color.Black;                                          
              }                                     
            }                                                              
          }
        }
        if(( ((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.HasEntry&quot;))== 1) || (((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.flag&quot;)) == 1) || (((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.flag&quot;))==6) )
        {     
          if((((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.PayType&quot;))==1) || (((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.PayType&quot;)) == 9) )                                               
            SumBal += (((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) - ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Credit&quot;))) ;                                                         
        }
        else if(((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.flag&quot;)) == 5 )
        {
          SumBal += (((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) - ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Credit&quot;))) ;              
        }
     
        if( ((String)Report.GetColumnValue(&quot;Acc_Statement_Report.MatCode&quot;))== &quot;&quot;)                    
        {
                             
        }                     
        else
        {
          Memo14.Text = &quot;&quot;  ;            
        }

        Memo6.Text +=((String)Report.GetColumnValue(&quot;Acc_Statement_Report.Notes&quot;)) ;                                                     
     
        if((((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.RepType&quot;)) == -1)     
          &amp;&amp; ((((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) - ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Credit&quot;)))  &gt;0))  
          SumDebit = SumDebit + ( ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) - ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Credit&quot;)));
        else if(   (((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;)) == 0)  
          &amp;&amp; (((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.RepType&quot;))== 0) 
          &amp;&amp; (((String)Report.GetColumnValue(&quot;Acc_Statement_Report.MatCode&quot;)) == &quot;&quot;)
          &amp;&amp; (((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.PayType&quot;))==0))  
          SumDebit = SumDebit + ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Credit&quot;));  
        else        
          SumDebit = SumDebit+  ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;));    



        if( (((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.HasEntry&quot;)) == 1) 
          || (((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.flag&quot;))==1) 
          || (((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.flag&quot;))==6))
        {                 
          if (((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Credit&quot;))&gt;0)
            SumCredit = SumCredit +   ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Credit&quot;));               
          else if ((((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.flag&quot;))==4) &amp;&amp; (((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.PayType&quot;))==0))  
            SumCredit = SumCredit + ((Double)Report.GetColumnValue(&quot;Acc_Statement_Report.Debit&quot;));  
        }                 
        ty1 = ((String)Report.GetColumnValue(&quot;Acc_Statement_Report.AccCode&quot;));

        if(((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.flag&quot;)) != 3 )                        
          Engine.ShowBand(MasterData1);
           
        ds.Next();
            
        if( (((Int32)Report.GetColumnValue(&quot;Acc_Statement_Report.flag&quot;)) !=6))
          count++;                           
      }

      //Memo32.Text=   FormatNumber(SumBal,2);  
      //Memo112.Text =   FormatNumber(SumDebit,2);
      // Memo113.Text =   FormatNumber(SumCredit,2);
      //Memo112.TextColor = Color.Blue;    
      //Memo30.Text = FormatNumber(count,2) + &quot;حركة&quot;;  
    }


   


   
  }
}
                             

  
   
  

</ScriptText>
  <Dictionary>
    <MsSqlDataConnection Name="ADODatabase" ConnectionString="rijcmlqJUrEa/KIcQqhhcfnlqC6PHTn0L44W7TQfS6RmUJOGDIuc+knUePlrDTYQkz8WhBiSU8bhoXkqFANiL5V4vT9FLgGcGRwY/h37doq7AbQM00xCAZftkAGBfhe5Z2Zrv3PR82qANkxj8AlrG/cphz+56b7ErVPwg3irAuojhpEvroTyIxWszXyADC4JJYUpClnJKADUhAOWodWPNF+UzxoQxXTuiP1aHdZrcFBsgFBZmHXpFUtSgTIfJMIaPTcZwwdw/xAwcj/JElEALcER5+UYKDiITzaBHNQ6wFLwVeQiuXox3os2GYuLwfqigtgH8USH+QRnoXmLFleB0mx38yygTQzLtfw7TK09EHQsGEPVEa5hZI5fru+0xP2nk09GR3f93qDFWJRWiKKhCYw5VXr1aRZFhT3J/lbC0P30ti+D9XVY7/1j3hqa6g61uWxkIS8+Cl9p/kkVsV7xQcPgNdOoCdC3GwThzfukyYdGyblhL6gckEapFXsrVD3b//7Wq5sjidMAU9rBfbMERzS2LB6XYQq6bsA+5bMsLCQCYAm/+Xvi2LyT4kReAVq32+xOR6hzzmcF4ryAresMjcPEfAi4Gty/zqqIpp65JfuhTKHKYblMaLSRl38H5k/2K025A4HFSJ8KjdvXRwvqwCfZ2M22cx61aHgXGypewRCy4BeQci4uM+LUJVsYbjnGDLJtosA41viJUmTiM9ObZRIrRH1Tg==" CommandTimeout="1200">
      <TableDataSource Name="Acc_Statement_Report" DataType="System.Int32" Enabled="true" TableName="Acc_Statement_Report" SelectCommand="exec mnrPrcRepAccStatement5 '{00000000-0000-0000-0000-000000000000}' , '{942265B6-75D5-4882-BCFE-273335F21C67}' , '{00000000-0000-0000-0000-000000000000}' , '{00000000-0000-0000-0000-000000000000}' , '' , '' , '{FDA51FD5-9A66-427b-8D45-732F05A63E9F}' , '{AF2816C3-E77F-41ee-8DCD-32CD78E20AE2}' , '1-1-2024' , '10-20-2024' , '' , '' ,  6  ,	1  ,  0  ,  1  ,  0  ,  2  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  ,  0  , '' , '' , '' ,  1  ,  2  ,  30  , '{00000000-0000-0000-0000-000000000000}','{00000000-0000-0000-0000-000000000000}',0,0,0">
        <Column Name="EID" DataType="System.Guid"/>
        <Column Name="EParentID" DataType="System.Guid"/>
        <Column Name="ETypeID" DataType="System.Guid"/>
        <Column Name="EDate" DataType="System.DateTime"/>
        <Column Name="CustID" DataType="System.Guid"/>
        <Column Name="CustName" DataType="System.String"/>
        <Column Name="CustLatinName" DataType="System.String"/>
        <Column Name="AccID" DataType="System.Guid"/>
        <Column Name="AccCode" DataType="System.String"/>
        <Column Name="AccName" DataType="System.String"/>
        <Column Name="AccLatinName" DataType="System.String"/>
        <Column Name="Debit" DataType="System.Double"/>
        <Column Name="Credit" DataType="System.Double"/>
        <Column Name="DefDebit" DataType="System.Double"/>
        <Column Name="DefCredit" DataType="System.Double"/>
        <Column Name="AccCurrDebit" DataType="System.Double"/>
        <Column Name="AccCurrCredit" DataType="System.Double"/>
        <Column Name="BNID" DataType="System.Guid"/>
        <Column Name="TypeID" DataType="System.Guid"/>
        <Column Name="parentID" DataType="System.Guid"/>
        <Column Name="Number" DataType="System.Int32"/>
        <Column Name="type" DataType="System.Int32"/>
        <Column Name="State" DataType="System.Int32"/>
        <Column Name="Date" DataType="System.DateTime"/>
        <Column Name="DueDate" DataType="System.DateTime"/>
        <Column Name="CollectionDate" DataType="System.DateTime"/>
        <Column Name="TypeName" DataType="System.String"/>
        <Column Name="BNLatinName" DataType="System.String"/>
        <Column Name="InOut" DataType="System.Int32"/>
        <Column Name="PayType" DataType="System.Int32"/>
        <Column Name="CurrencyVal" DataType="System.Int32"/>
        <Column Name="MainCurrencyID" DataType="System.Guid"/>
        <Column Name="bItemNum" DataType="System.Int32"/>
        <Column Name="MatID" DataType="System.Guid"/>
        <Column Name="MatCode" DataType="System.String"/>
        <Column Name="MatName" DataType="System.String"/>
        <Column Name="MatLatinName" DataType="System.String"/>
        <Column Name="ContrastAccID" DataType="System.Guid"/>
        <Column Name="ContrastAccCode" DataType="System.String"/>
        <Column Name="ContrastAccName" DataType="System.String"/>
        <Column Name="ContrastAccLName" DataType="System.String"/>
        <Column Name="Unit" DataType="System.String"/>
        <Column Name="ItemQty" DataType="System.Double"/>
        <Column Name="ItemPrice" DataType="System.Double"/>
        <Column Name="Disc" DataType="System.Double"/>
        <Column Name="Extra" DataType="System.Double"/>
        <Column Name="Vat" DataType="System.Double"/>
        <Column Name="BillTotal" DataType="System.Double"/>
        <Column Name="payment" DataType="System.Double"/>
        <Column Name="Notes" DataType="System.String"/>
        <Column Name="flag" DataType="System.Int32"/>
        <Column Name="Balanced" DataType="System.Int32"/>
        <Column Name="RepType" DataType="System.Int32"/>
        <Column Name="ItemOption" DataType="System.Int32"/>
        <Column Name="HasEntry" DataType="System.Int32"/>
        <Column Name="BNAge" DataType="System.Double"/>
        <Column Name="DocType" DataType="System.Int32"/>
        <Column Name="Vendor" DataType="System.String"/>
        <Column Name="HasPayment" DataType="System.Int32"/>
        <Column Name="txt1" DataType="System.String"/>
        <Column Name="txt2" DataType="System.String"/>
        <Column Name="txt3" DataType="System.String"/>
        <Column Name="txt4" DataType="System.String"/>
        <Column Name="txt5" DataType="System.String"/>
        <Column Name="txt6" DataType="System.String"/>
        <Column Name="Date1" DataType="System.DateTime"/>
        <Column Name="Date2" DataType="System.DateTime"/>
        <Column Name="Date3" DataType="System.DateTime"/>
        <Column Name="OpClass" DataType="System.String"/>
        <Column Name="TTC" DataType="System.Int32"/>
      </TableDataSource>
      <TableDataSource Name="AccAge" DataType="System.Int32" Enabled="true" TableName="AccAge" SelectCommand="exec mnrPrcRepAccAge  '{00000000-0000-0000-0000-000000000000}' , '{942265B6-75D5-4882-BCFE-273335F21C67}' , '{00000000-0000-0000-0000-000000000000}' , '{00000000-0000-0000-0000-000000000000}' , '{AF2816C3-E77F-41ee-8DCD-32CD78E20AE2}' , '10-20-2024' , '' , '' , 0, 2 , 30, 0,0,0,1,0,0,0x0,0x0">
        <Column Name="ID" DataType="System.Guid"/>
        <Column Name="Name" DataType="System.String"/>
        <Column Name="LatinName" DataType="System.String"/>
        <Column Name="DiscRate" DataType="System.Double"/>
        <Column Name="BarCode" DataType="System.String"/>
        <Column Name="Prefix" DataType="System.String"/>
        <Column Name="Suffix" DataType="System.String"/>
        <Column Name="Country" DataType="System.String"/>
        <Column Name="City" DataType="System.String"/>
        <Column Name="Area" DataType="System.String"/>
        <Column Name="Street" DataType="System.String"/>
        <Column Name="Nationality" DataType="System.String"/>
        <Column Name="MailBox" DataType="System.String"/>
        <Column Name="Phone1" DataType="System.String"/>
        <Column Name="Phone2" DataType="System.String"/>
        <Column Name="Mobile" DataType="System.String"/>
        <Column Name="Fax" DataType="System.String"/>
        <Column Name="Email" DataType="System.String"/>
        <Column Name="WebPage" DataType="System.String"/>
        <Column Name="PoBox" DataType="System.String"/>
        <Column Name="Account" DataType="System.Guid"/>
        <Column Name="Balance" DataType="System.Double"/>
        <Column Name="BDebit" DataType="System.Double"/>
        <Column Name="BCredit" DataType="System.Double"/>
        <Column Name="Period1" DataType="System.Double"/>
        <Column Name="Period2" DataType="System.Double"/>
      </TableDataSource>
      <TableDataSource Name="Acc_Statement_Report1" DataType="System.Int32" PropName="Table" Enabled="true">
        <Column Name="AccID" DataType="System.Guid"/>
        <Column Name="Code" DataType="System.String"/>
        <Column Name="Name" DataType="System.String"/>
        <Column Name="LatinName" DataType="System.String"/>
        <Column Name="balance" DataType="System.Double"/>
        <Column Name="BDebit" DataType="System.Double"/>
        <Column Name="BCredit" DataType="System.Double"/>
        <Column Name="Period1" DataType="System.Double"/>
        <Column Name="Period2" DataType="System.Double"/>
      </TableDataSource>
      <TableDataSource Name="AccAgeCredit" DataType="System.Int32" Enabled="true" TableName="AccAgeCredit" SelectCommand="exec mnrPrcRepAccAge  '{00000000-0000-0000-0000-000000000000}' , '{942265B6-75D5-4882-BCFE-273335F21C67}' , '{00000000-0000-0000-0000-000000000000}' , '{00000000-0000-0000-0000-000000000000}' , '{AF2816C3-E77F-41ee-8DCD-32CD78E20AE2}' , '10-20-2024' , '' , '' , 0, 2 , 30, 1,0,0,1,0,0,0x0,0x0">
        <Column Name="ID" DataType="System.Guid"/>
        <Column Name="Name" DataType="System.String"/>
        <Column Name="LatinName" DataType="System.String"/>
        <Column Name="DiscRate" DataType="System.Double"/>
        <Column Name="BarCode" DataType="System.String"/>
        <Column Name="Prefix" DataType="System.String"/>
        <Column Name="Suffix" DataType="System.String"/>
        <Column Name="Country" DataType="System.String"/>
        <Column Name="City" DataType="System.String"/>
        <Column Name="Area" DataType="System.String"/>
        <Column Name="Street" DataType="System.String"/>
        <Column Name="Nationality" DataType="System.String"/>
        <Column Name="MailBox" DataType="System.String"/>
        <Column Name="Phone1" DataType="System.String"/>
        <Column Name="Phone2" DataType="System.String"/>
        <Column Name="Mobile" DataType="System.String"/>
        <Column Name="Fax" DataType="System.String"/>
        <Column Name="Email" DataType="System.String"/>
        <Column Name="WebPage" DataType="System.String"/>
        <Column Name="PoBox" DataType="System.String"/>
        <Column Name="Account" DataType="System.Guid"/>
        <Column Name="Balance" DataType="System.Double"/>
        <Column Name="BDebit" DataType="System.Double"/>
        <Column Name="BCredit" DataType="System.Double"/>
        <Column Name="Period1" DataType="System.Double"/>
        <Column Name="Period2" DataType="System.Double"/>
      </TableDataSource>
      <TableDataSource Name="ExtSecConnection" DataType="System.Int32" Enabled="true" TableName="ExtSecConnection" SelectCommand="exec mnrFrxPrcConnection_Add '{2E84AA1A-6F79-44a5-B019-EDA6D4587FEA}'">
        <Column Name="TmpVal" DataType="System.Int32"/>
      </TableDataSource>
    </MsSqlDataConnection>
    <Parameter Name="ShowAccAge" DataType="System.String" Expression="&quot;1&quot;"/>
    <Parameter Name="FromDate" DataType="System.String" Expression="&quot;1/1/2024&quot;"/>
    <Parameter Name="ToDate" DataType="System.String" Expression="&quot;20/10/2024&quot;"/>
    <Parameter Name="Acc" DataType="System.String" Expression="&quot;&quot;"/>
    <Parameter Name="CurUserID" DataType="System.String" Expression="&quot;{2E84AA1A-6F79-44a5-B019-EDA6D4587FEA}&quot;"/>
    <Parameter Name="Cust" DataType="System.String" Expression="&quot;عادل&quot;"/>
    <Parameter Name="CostJob" DataType="System.String" Expression="&quot;&quot;"/>
    <Parameter Name="SaleMan" DataType="System.String" Expression="&quot;&quot;"/>
    <Parameter Name="Vendor" DataType="System.String" Expression="&quot;&quot;"/>
    <Parameter Name="Class" DataType="System.String" Expression="&quot;&quot;"/>
    <Parameter Name="CurrName" DataType="System.String" Expression="&quot;دولار أمريكي&quot;"/>
    <Parameter Name="PeriodCnt" DataType="System.String" Expression="&quot;2&quot;"/>
    <Parameter Name="PeriodLen" DataType="System.String" Expression="&quot;30&quot;"/>
    <Parameter Name="ShowDueDate" DataType="System.String" Expression="&quot;0&quot;"/>
    <Parameter Name="BillPayType" DataType="System.String" Expression="&quot;1&quot;"/>
    <Total Name="Total" Expression="IIf(([Acc_Statement_Report.HasEntry] == 1) || ([Acc_Statement_Report.flag]==1) || ([Acc_Statement_Report.flag]==6),IIf([Acc_Statement_Report.Debit]&gt;0,[Acc_Statement_Report.Debit],IIf(([Acc_Statement_Report.flag]==4) &amp;&amp; ([Acc_Statement_Report.PayType]==0),[Acc_Statement_Report.Credit],0)),0)" Evaluator="MasterData1"/>
    <Total Name="Total1" Expression="IIf(([Acc_Statement_Report.HasEntry] == 1) || ([Acc_Statement_Report.flag]==1) || ([Acc_Statement_Report.flag]==6),IIf([Acc_Statement_Report.Credit]&gt;0,[Acc_Statement_Report.Credit],IIf(([Acc_Statement_Report.flag]==4) &amp;&amp; ([Acc_Statement_Report.PayType]==0),[Acc_Statement_Report.Debit],0)),0)" Evaluator="MasterData1"/>
    <Total Name="Total2" TotalType="Count" Evaluator="MasterData1"/>
    <Total Name="TotalCredit" Expression="IIf( [Acc_Statement_Report.DocType] == 16 ,   [Acc_Statement_Report.Credit] ,IIf([Acc_Statement_Report.RepType] == (1),IIf(([Acc_Statement_Report.Credit] - [Acc_Statement_Report.Debit] ) &gt;0, [Acc_Statement_Report.Credit] - [Acc_Statement_Report.Debit],null),IIf([Acc_Statement_Report.Credit]== 0,IIf(([Acc_Statement_Report.RepType]==0) &amp;&amp; ([Acc_Statement_Report.MatCode]== &quot;&quot;),IIf([Acc_Statement_Report.PayType]==0,[Acc_Statement_Report.Debit],0),0),[Acc_Statement_Report.Credit])))" Evaluator="MasterData1" PrintOn="ReportSummary1"/>
    <Total Name="TotalDebit" Expression="IIf([Acc_Statement_Report.DocType] == 16 ,[Acc_Statement_Report.Debit],IIf([Acc_Statement_Report.RepType] == (1),IIf(([Acc_Statement_Report.Debit] - [Acc_Statement_Report.Credit] ) &gt;0,[Acc_Statement_Report.Debit] - [Acc_Statement_Report.Credit],0),IIf([Acc_Statement_Report.Debit]== 0,IIf(([Acc_Statement_Report.RepType]== 0) &amp;&amp; ([Acc_Statement_Report.MatCode]== &quot;&quot;),IIf([Acc_Statement_Report.PayType]==0,[Acc_Statement_Report.Credit],0),0),[Acc_Statement_Report.Debit])))" Evaluator="MasterData1" PrintOn="ReportSummary1"/>
  </Dictionary>
  <ReportPage Name="Page1" RawPaperSize="9" LeftMargin="2.5" TopMargin="2.5" RightMargin="2.5" BottomMargin="2.5" Watermark.Font="Arial, 60pt" ManualBuildEvent="Page1_ManualBuild">
    <PageHeaderBand Name="PageHeader1" Width="774.9" Height="178.79">
      <PictureObject Name="COMPANY_LOGO" Left="1.78" Width="772.15" Height="158.74" Fill.Color="White" ImageLocation="C:\Program Files (x86)\Almanara Business Solutions\Bin\Res\Logo.bmp" ImageFormat="Bmp"/>
      <TextObject Name="Memo45" Left="156.84" Top="130.55" Width="432.78" Height="48.24" Text="كشف حساب عميل أو مورد" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Arial, 16pt, style=Bold"/>
    </PageHeaderBand>
    <GroupHeaderBand Name="GroupHeader1" Top="182.79" Width="774.9" Height="166.5" RepeatOnEveryPage="true" Condition="[Acc_Statement_Report.CustID]" KeepTogether="true" ResetPageNumber="true">
      <TextObject Name="Memo21" Left="680.41" Top="75.6" Width="71.81" Height="18.9" Text="من تاريخ : " Padding="2, 1, 2, 1" RightToLeft="true" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo22" Left="525.64" Top="75.6" Width="71.81" Height="18.9" Text="الى تاريخ:" Padding="2, 1, 2, 1" RightToLeft="true" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo26" Left="47.25" Top="43.8" Width="90.71" Height="18.9" Text="[SaleMan]" Padding="2, 1, 2, 1" HorzAlign="Center" Font="Times New Roman, 10pt"/>
      <TextObject Name="Memo36" Left="432.8" Top="75.6" Width="90.71" Height="18.9" Text="[ToDate]" Padding="2, 1, 2, 1" Format="Date" Format.Format="d" HorzAlign="Right" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo37" Left="607.9" Top="75.6" Width="90.71" Height="18.9" Text="[FromDate]" Padding="2, 1, 2, 1" Format="Date" Format.Format="d" HorzAlign="Right" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo50" Left="642.44" Top="121.14" Width="83.91" Height="45.35" Border.Lines="Top, Bottom" Text="التاريخ" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Arial, 11pt, style=Bold"/>
      <TextObject Name="Memo51" Left="181.31" Top="143.82" Width="83.15" Height="22.68" Border.Lines="Top, Bottom" Text="مدين" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Arial, 11pt, style=Bold"/>
      <TextObject Name="Memo52" Left="98.16" Top="143.82" Width="83.15" Height="22.68" Border.Lines="All" Text="دائن" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Arial, 11pt, style=Bold"/>
      <TextObject Name="Memo38" Left="726.76" Top="121.14" Width="43.47" Height="45.35" Border.Lines="All" Text="م." Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Arial, 11pt, style=Bold"/>
      <TextObject Name="Memo39" Left="559.14" Top="121.14" Width="83.15" Height="45.35" Border.Lines="All" Text="المستند" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Arial, 10pt, style=Bold"/>
      <TextObject Name="Memo40" Left="3.23" Top="121.14" Width="260.8" Height="22.68" Border.Lines="All" Text="الحركة" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Arial, 11pt, style=Bold"/>
      <TextObject Name="Text1" Left="680.4" Top="15.45" Width="71.82" Height="18.9" Text=" : الحساب " Padding="2, 1, 2, 1" HorzAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Text2" Left="47.25" Top="15.45" Width="81.27" Height="18.9" Text=" [Acc_Statement_Report.AccCode]" Padding="2, 1, 2, 1" HorzAlign="Right" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Text3" Left="463.6" Top="15.45" Width="223.02" Height="18.9" Text="[Acc_Statement_Report.AccName] " Padding="2, 1, 2, 1" VertAlign="Center" RightToLeft="true" Font="Times New Roman, 9pt, style=Bold"/>
      <TextObject Name="Text4" Left="680.4" Top="43.8" Width="71.82" Height="18.9" Text=": عملة الكشف" Padding="2, 1, 2, 1" HorzAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Text5" Left="604.8" Top="43.8" Width="71.82" Height="18.9" Text="[CurrName]" Padding="2, 1, 2, 1" HorzAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Text6" Left="132.3" Top="15.45" Width="71.82" Height="18.9" Text=": رمز الحساب" Padding="2, 1, 2, 1" HorzAlign="Right" VertAlign="Center" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Text9" Left="132.31" Top="43.8" Width="71.81" Height="18.9" Text="البائع : " Padding="2, 1, 2, 1" RightToLeft="true" Font="Times New Roman, 10pt, style=Bold"/>
      <TextObject Name="Memo53" Left="264.15" Top="121.14" Width="294.8" Height="45.35" Border.Lines="All" Text="الشرح" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Arial, 11pt, style=Bold"/>
      <TextObject Name="Text16" Left="3.23" Top="143.82" Width="96.38" Height="22.68" Border.Lines="Left, Top, Bottom" GrowToBottom="true" Text="الرصيد " Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Arial, 11pt, style=Bold"/>
      <DataBand Name="MasterData1" Top="353.29" Width="774.9" Height="23.35" CanGrow="true" CanShrink="true" DataSource="Acc_Statement_Report">
        <TextObject Name="Memo1" Left="642.44" Width="83.91" Height="22.68" Border.Lines="Top, Bottom" Border.Width="0.1" CanGrow="true" GrowToBottom="true" Text="[Acc_Statement_Report.Date]" Padding="2, 1, 2, 1" Format="Date" Format.Format="d" HorzAlign="Center" VertAlign="Center" Font="Arial, 10pt">
          <Highlight>
            <Condition Expression="[Acc_Statement_Report.Credit] &gt; [Acc_Statement_Report.Debit]" Fill.Color="White" TextFill.Color="Blue" Font="Arial, 10pt" ApplyFill="true" ApplyFont="true"/>
          </Highlight>
        </TextObject>
        <TextObject Name="Memo4" Left="181.31" Width="83.15" Height="22.68" Border.Lines="All" Border.Width="0.1" CanGrow="true" GrowToBottom="true" Text="[IIf([Acc_Statement_Report.DocType] == 16 ,[Acc_Statement_Report.Debit],IIf([Acc_Statement_Report.RepType] == (1),IIf(([Acc_Statement_Report.Debit] - [Acc_Statement_Report.Credit] ) &gt;0,[Acc_Statement_Report.Debit] - [Acc_Statement_Report.Credit],&quot;&quot;),IIf([Acc_Statement_Report.Debit]== 0,IIf(([Acc_Statement_Report.RepType]== 0) &amp;&amp; ([Acc_Statement_Report.MatCode]== &quot;&quot;),IIf([Acc_Statement_Report.PayType]==0,[Acc_Statement_Report.Credit],&quot;&quot;),&quot;&quot;),[Acc_Statement_Report.Debit])))]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Arial, 10pt"/>
        <TextObject Name="Memo6" Left="264.15" Width="294.8" Height="22.68" Visible="false" Border.Lines="Left, Top, Bottom" Border.Width="0.1" GrowToBottom="true" Padding="2, 1, 2, 1" HorzAlign="Right" VertAlign="Center" Font="Arial, 10pt"/>
        <TextObject Name="Memo9" Left="559.14" Width="83.15" Height="22.68" Border.Lines="All" GrowToBottom="true" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Arial, 10pt"/>
        <TextObject Name="Memo11" Left="726.76" Width="43.47" Height="22.68" Border.Lines="All" CanGrow="true" GrowToBottom="true" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Arial, 9pt"/>
        <TextObject Name="Memo8" Left="264.15" Width="294.8" Height="22.68" Border.Lines="All" CanGrow="true" GrowToBottom="true" Text="[IIf([Acc_Statement_Report.RepType] == -1,null,IIf([Acc_Statement_Report.RepType] == 2,&quot;سند قيد&quot;,[Acc_Statement_Report.TypeName]))][IIf( [Acc_Statement_Report.flag] == 5, &quot;&quot; ,  &quot; - &quot; )][IIf( [Acc_Statement_Report.flag] == 5, &quot;&quot;,IIf([Acc_Statement_Report.Number]== 0,null,[Acc_Statement_Report.Number]))][Acc_Statement_Report.Notes]" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Arial, 10pt"/>
        <TextObject Name="Memo5" Left="98.16" Width="83.15" Height="22.68" Border.Lines="All" Border.Width="0.1" CanGrow="true" GrowToBottom="true" Text="[IIf( [Acc_Statement_Report.DocType] == 16 ,   [Acc_Statement_Report.Credit] ,IIf([Acc_Statement_Report.RepType] == (1),IIf(([Acc_Statement_Report.Credit] - [Acc_Statement_Report.Debit] ) &gt;0, [Acc_Statement_Report.Credit] - [Acc_Statement_Report.Debit],null),IIf([Acc_Statement_Report.Credit]== 0,IIf(([Acc_Statement_Report.RepType]==0) &amp;&amp; ([Acc_Statement_Report.MatCode]== &quot;&quot;),IIf([Acc_Statement_Report.PayType]==0,[Acc_Statement_Report.Debit],0),0),[Acc_Statement_Report.Credit])))]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Arial, 10pt"/>
        <TextObject Name="Memo16" Left="560.12" Top="0.67" Width="83.15" Height="22.68" CanGrow="true" GrowToBottom="true" Text="[Acc_Statement_Report.Number]" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" Font="Arial, 10pt"/>
        <TextObject Name="Memo14" Left="3.23" Width="96.38" Height="22.68" Border.Lines="Left, Top, Bottom" Border.Width="0.1" CanGrow="true" GrowToBottom="true" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Center" VertAlign="Center" Font="Arial, 10pt"/>
      </DataBand>
      <GroupFooterBand Name="GroupFooter1" Top="380.64" Width="774.9"/>
    </GroupHeaderBand>
    <ReportSummaryBand Name="ReportSummary1" Top="384.64" Width="774.9" Height="115.29">
      <SubreportObject Name="Subreport1" Left="68.74" Top="54.82" Width="230.55" Height="60.47" Border.Lines="All" Fill.Color="Silver" ReportPage="Page2"/>
      <TextObject Name="Memo2" Left="226.48" Top="26.47" Width="532.59" Height="32.12" Border.Lines="All" Border.Color="White" Text="اعمار الذمم : " Padding="2, 1, 2, 1" VertAlign="Center" RightToLeft="true" Font="Arial, 14pt, style=Bold"/>
    </ReportSummaryBand>
    <PageFooterBand Name="PageFooter1" Top="503.93" Width="774.9" Height="39.54">
      <TextObject Name="Text12" Left="59.25" Width="83.15" Height="15.12" Text="[Date]" Padding="2, 1, 2, 1" Format="Date" Format.Format="d" VertAlign="Center" Font="Arial, 8pt, style=Bold"/>
      <TextObject Name="Text13" Width="56.69" Height="15.12" Text="Printed on:" Padding="2, 1, 2, 1" AutoWidth="true" VertAlign="Center" Font="Tahoma, 8pt"/>
      <TextObject Name="Text14" Left="148.74" Width="39.69" Height="15.12" Text="Time:" Padding="2, 1, 2, 1" AutoWidth="true" VertAlign="Center" Font="Tahoma, 8pt"/>
      <TextObject Name="Text15" Left="200.65" Width="56.69" Height="15.12" Text="[Date]" Padding="2, 1, 2, 1" Format="Time" Format.Format="t" VertAlign="Center" Font="Arial, 8pt, style=Bold"/>
      <TextObject Name="Memo54" Left="649.08" Top="26.2" Width="119.02" Height="13.34" Border.Lines="All" Border.Color="White" Text="www.almanarsoft.com" Padding="2, 1, 2, 1" VertAlign="Center" Font="Times New Roman, 8pt, style=Bold" TextFill.Color="Blue"/>
      <TextObject Name="Memo49" Left="680.81" Width="75.59" Height="18.9" Text="[Page#]" Padding="2, 1, 2, 1" HorzAlign="Right" Font="Arial, 10pt"/>
    </PageFooterBand>
  </ReportPage>
  <ReportPage Name="Page2" LeftMargin="2.5" TopMargin="2.5" RightMargin="2.5" BottomMargin="2.5" Guides="604.8" Watermark.Font="Arial, 60pt">
    <DataBand Name="MasterData2" Top="23.12" Width="774.9" Height="22.68" DataSource="AccAge">
      <TextObject Name="Per1" Left="581.65" Width="114.14" Height="22.68" Border.Lines="All" Text="[IIf(ToInt32([PeriodCnt])&gt;=1,IIf([AccAge.Period1] &gt;0,[AccAge.Period1],[AccAgeCredit.Period1]),&quot;&quot;)]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Arial, 10pt"/>
      <TextObject Name="Per2" Left="468.07" Width="114.14" Height="22.68" Border.Lines="Left, Top, Bottom" Text="[IIf(ToInt32([PeriodLen])&gt;=2,IIf([AccAge.Period2] &gt; 0,[AccAge.Period2],[AccAgeCredit.Period2]),&quot;&quot;)]" Padding="2, 1, 2, 1" AllowExpressions="false" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Arial, 10pt"/>
      <TextObject Name="Per3" Left="353.53" Width="114.14" Height="22.68" Visible="false" Border.Lines="All" Text="[IIf(ToInt32([PeriodLen]) &gt;=3,IIf([AccAge.Period3]&gt;0,[AccAge.Period3],[AccAgeCredit.Period3]),null)]" Padding="2, 1, 2, 1" AllowExpressions="false" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Arial, 10pt"/>
      <TextObject Name="Per4" Left="239.42" Width="114.14" Height="22.68" Visible="false" Border.Lines="All" Text="[IIf(ToInt32([PeriodLen]) &gt;=4,IIf([AccAge.Period4]&gt;0,[AccAge.Period4],[AccAgeCredit.Period4]),null)]" Padding="2, 1, 2, 1" AllowExpressions="false" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Arial, 10pt"/>
      <TextObject Name="per6" Left="11.78" Width="114.14" Height="22.68" Visible="false" Border.Lines="Left, Top, Bottom" Text="[IIf(ToInt32([PeriodLen])&gt;=6,IIf([AccAge.Period6]&gt;0,[AccAge.Period6],[AccAgeCredit.Period6]),null)]" Padding="2, 1, 2, 1" AllowExpressions="false" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Arial, 10pt"/>
      <TextObject Name="per5" Left="125.74" Width="114.14" Height="22.68" Visible="false" Border.Lines="All" Text="[IIf(ToInt32([PeriodLen])&gt;=5,IIf([AccAge.Period5]&gt;0,[AccAge.Period5],[AccAgeCredit.Period5]),null)]" Padding="2, 1, 2, 1" AllowExpressions="false" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Arial, 10pt"/>
      <DataHeaderBand Name="Header1" Width="774.9" Height="19.12">
        <TextObject Name="P3" Left="353.53" Top="0.22" Width="114.14" Height="18.9" Visible="false" Border.Lines="Left, Top" Text=" ( اكثر من [ToInt32([PeriodLen])*2] يوم )" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Arial, 10pt, style=Bold"/>
        <TextObject Name="P2" Left="468.07" Top="0.22" Width="114.14" Height="18.9" Visible="false" Border.Lines="Left, Top" Text="( اكثر من [PeriodLen] يوم )" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Arial, 10pt, style=Bold"/>
        <TextObject Name="P1" Left="581.65" Top="0.22" Width="114.14" Height="18.9" Border.Lines="Left, Right, Top" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Arial, 10pt, style=Bold"/>
        <TextObject Name="P4" Left="239.42" Top="0.22" Width="114.14" Height="18.9" Visible="false" Border.Lines="Left, Right, Top" Text=" ( اكثر من [ToInt32([PeriodLen])*3] يوم )" Padding="2, 1, 2, 1" AllowExpressions="false" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Arial, 10pt, style=Bold"/>
        <TextObject Name="P5" Left="125.74" Top="0.22" Width="114.14" Height="18.9" Visible="false" Border.Lines="Left, Right, Top" Text=" ( اكثر من [ToInt32([PeriodLen])*4] يوم )" Padding="2, 1, 2, 1" AllowExpressions="false" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Arial, 10pt, style=Bold"/>
        <TextObject Name="P6" Left="11.78" Top="0.22" Width="114.14" Height="18.9" Visible="false" Border.Lines="Left, Top" Text=" ( اكثر من [ToInt32([PeriodLen])*5] يوم )" Padding="2, 1, 2, 1" AllowExpressions="false" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Arial, 10pt, style=Bold"/>
      </DataHeaderBand>
    </DataBand>
    <DataBand Name="MasterData3" Top="72.92" Width="774.9" Height="22.68" DataSource="AccAgeCredit">
      <TextObject Name="Pe12" Left="468.07" Width="114.14" Height="22.68" Border.Lines="Left, Top, Bottom" Text="[IIf(ToInt32([PeriodCnt]) &gt;= 2,IIf([AccAgeCredit.Period2] &gt; 0,[AccAgeCredit.Period2],[AccAge.Period2]),&quot;&quot;)]" Padding="2, 1, 2, 1" AllowExpressions="false" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Arial, 10pt"/>
      <TextObject Name="Pe13" Left="353.53" Width="114.14" Height="22.68" Visible="false" Border.Lines="Left, Top, Bottom" Text="[IIf(ToInt32([PeriodCnt]) &gt;= 3,IIf([AccAgeCredit.Period3] &gt; 0,[AccAgeCredit.Period3],[AccAge.Period3]),&quot;&quot;)]" Padding="2, 1, 2, 1" AllowExpressions="false" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Arial, 10pt"/>
      <TextObject Name="Pe14" Left="239.42" Width="114.14" Height="22.68" Visible="false" Border.Lines="All" Text="[IIf(ToInt32([PeriodCnt])&gt;= 4 ,IIf([AccAgeCredit.Period4] &gt; 0,[AccAgeCredit.Period4],[AccAge.Period4]),&quot;&quot;)]" Padding="2, 1, 2, 1" AllowExpressions="false" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Arial, 10pt"/>
      <TextObject Name="Pe16" Left="11.78" Width="114.14" Height="22.68" Visible="false" Border.Lines="Left, Top, Bottom" Text="[IIf([ToInt32([PeriodCnt])&gt;= 6 ,IIf([AccAgeCredit.Period6] &gt; 0,&lt;[AccAgeCredit.Period6],[AccAge.Period6]),&quot;&quot;)]" Padding="2, 1, 2, 1" AllowExpressions="false" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Arial, 10pt"/>
      <TextObject Name="Pe15" Left="125.74" Width="114.14" Height="22.68" Visible="false" Border.Lines="All" Text="[IIf(ToInt32([PeriodCnt]) &gt;= 5,IIf([AccAgeCredit.Period5] &gt; 0,[AccAgeCredit.Period5],[AccAge.Period5]),&quot;&quot;)]" Padding="2, 1, 2, 1" AllowExpressions="false" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Arial, 10pt"/>
      <TextObject Name="Pe11" Left="581.65" Width="114.14" Height="22.68" Border.Lines="All" Text="[IIf(ToInt32([PeriodCnt]) &gt;= 1 ,IIf([AccAgeCredit.Period1] &gt; 0,[AccAgeCredit.Period1],[AccAge.Period1]),&quot;&quot;)]" Padding="2, 1, 2, 1" Format="Number" Format.UseLocale="true" Format.DecimalDigits="2" HorzAlign="Right" VertAlign="Center" Font="Arial, 10pt"/>
      <DataHeaderBand Name="Header2" Top="49.8" Width="774.9" Height="19.12">
        <TextObject Name="P13" Left="353.53" Top="0.22" Width="114.14" Height="18.9" Visible="false" Border.Lines="Left, Top" Text=" ( اكثر من [ToInt32([PeriodLen])*2] يوم )" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Arial, 10pt, style=Bold"/>
        <TextObject Name="P12" Left="468.07" Top="0.22" Width="114.14" Height="18.9" Border.Lines="Left, Top" Text="( اكثر من [PeriodLen] يوم )" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Arial, 10pt, style=Bold"/>
        <TextObject Name="P11" Left="581.65" Top="0.22" Width="114.14" Height="18.9" Border.Lines="Left, Right, Top" Padding="2, 1, 2, 1" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Arial, 10pt, style=Bold"/>
        <TextObject Name="P14" Left="239.42" Top="0.22" Width="114.14" Height="18.9" Visible="false" Border.Lines="Left, Right, Top" Text=" ( اكثر من [ToInt32([PeriodLen])*3] يوم )" Padding="2, 1, 2, 1" AllowExpressions="false" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Arial, 10pt, style=Bold"/>
        <TextObject Name="P15" Left="125.74" Top="0.22" Width="114.14" Height="18.9" Visible="false" Border.Lines="Left, Right, Top" Text=" ( اكثر من [ToInt32([PeriodLen])*4] يوم )" Padding="2, 1, 2, 1" AllowExpressions="false" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Arial, 10pt, style=Bold"/>
        <TextObject Name="P16" Left="11.78" Top="0.22" Width="114.14" Height="18.9" Visible="false" Border.Lines="Left, Top" Text=" ( اكثر من [ToInt32([PeriodLen])*5] يوم )" Padding="2, 1, 2, 1" AllowExpressions="false" HorzAlign="Center" VertAlign="Center" RightToLeft="true" Font="Arial, 10pt, style=Bold"/>
      </DataHeaderBand>
    </DataBand>
  </ReportPage>
</Report>
