﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<StiSerializer version="1.02" type="Net" application="StiReport">
  <BeginRenderEvent>this.Dictionary.Synchronize();
this.Dictionary.RemoveUnusedData();</BeginRenderEvent>
  <Dictionary Ref="1" type="Dictionary" isKey="true">
    <BusinessObjects isList="true" count="0" />
    <Databases isList="true" count="1">
      <XML Ref="2" type="Stimulsoft.Report.Dictionary.StiXmlDatabase" isKey="true">
        <Alias>XML</Alias>
        <Key>aad22d555d044fa6a49604215a59dbd4</Key>
        <Name>XML</Name>
        <PathData>K:\Twinwork\Append\40670\BI_SAMPLE_DATA.xml</PathData>
        <PathSchema />
      </XML>
    </Databases>
    <DataSources isList="true" count="3">
      <ColumnPar Ref="3" type="DataTableSource" isKey="true">
        <Alias>ColumnPar</Alias>
        <Columns isList="true" count="6">
          <value>ColName,System.String</value>
          <value>ColWidth,System.String</value>
          <value>ColType,System.String</value>
          <value>ColAlignment,System.String</value>
          <value>ColRunningSum,System.String</value>
          <value>ColTotalSum,System.String</value>
        </Columns>
        <Dictionary isRef="1" />
        <Key>94bd491cbc064333bdbae3f50a59f9d6</Key>
        <Name>ColumnPar</Name>
        <NameInSource>XML.ColumnPar</NameInSource>
      </ColumnPar>
      <Data Ref="4" type="DataTableSource" isKey="true">
        <Alias>Data</Alias>
        <Columns isList="true" count="11">
          <value>ColData1,System.String</value>
          <value>ColData2,System.String</value>
          <value>ColData3,System.String</value>
          <value>ColData4,System.String</value>
          <value>ColData5,System.String</value>
          <value>ColData6,System.String</value>
          <value>ColData7,System.String</value>
          <value>ColData8,System.String</value>
          <value>ColData9,System.String</value>
          <value>ColData10,System.String</value>
          <value>ColData11,System.String</value>
        </Columns>
        <Dictionary isRef="1" />
        <Key>574930aeb020427e845e643e87d28228</Key>
        <Name>Data</Name>
        <NameInSource>XML.Data</NameInSource>
      </Data>
      <ReportPar Ref="5" type="DataTableSource" isKey="true">
        <Alias>ReportPar</Alias>
        <Columns isList="true" count="8">
          <value>ReportName,System.String</value>
          <value>ReportDate,System.String</value>
          <value>Company,System.String</value>
          <value>ReportVer,System.String</value>
          <value>FisProVer,System.String</value>
          <value>ReportWidth,System.String</value>
          <value>ReportBW,System.String</value>
          <value>ReportOrient,System.String</value>
        </Columns>
        <Dictionary isRef="1" />
        <Key>23b0a7280c884cb0936b8e74ece399df</Key>
        <Name>ReportPar</Name>
        <NameInSource>XML.ReportPar</NameInSource>
      </ReportPar>
    </DataSources>
    <Relations isList="true" count="0" />
    <Report isRef="0" />
    <Resources isList="true" count="0" />
    <Variables isList="true" count="1">
      <value>,GroupCount,GroupCount,,System.Int32,_x0031_,False,False,False,False,,_x0033_8f603b841174292af7be2ce11d37bb6</value>
    </Variables>
  </Dictionary>
  <EngineVersion>EngineV2</EngineVersion>
  <GlobalizationStrings isList="true" count="0" />
  <Key>c1e15fa289904283a5c2200c59f1d005</Key>
  <MetaTags isList="true" count="0" />
  <Pages isList="true" count="1">
    <Page1 Ref="6" type="Page" isKey="true">
      <Border>None;Black;2;Solid;False;4;Black</Border>
      <Brush>Transparent</Brush>
      <Components isList="true" count="0" />
      <Conditions isList="true" count="0" />
      <Guid>0fc8d6aa63ab432392b9bdca0feffc8c</Guid>
      <Margins>1,1,1,1</Margins>
      <Name>Page1</Name>
      <PageHeight>29.7</PageHeight>
      <PageWidth>21</PageWidth>
      <PaperSize>A4</PaperSize>
      <Report isRef="0" />
    </Page1>
  </Pages>
  <ReferencedAssemblies isList="true" count="8">
    <value>System.Dll</value>
    <value>System.Drawing.Dll</value>
    <value>System.Windows.Forms.Dll</value>
    <value>System.Data.Dll</value>
    <value>System.Xml.Dll</value>
    <value>Stimulsoft.Controls.Dll</value>
    <value>Stimulsoft.Base.Dll</value>
    <value>Stimulsoft.Report.Dll</value>
  </ReferencedAssemblies>
  <ReportAlias>Report</ReportAlias>
  <ReportChanged>6/28/2021 12:30:23 PM</ReportChanged>
  <ReportCreated>1/16/2021 3:15:41 PM</ReportCreated>
  <ReportFile>K:\Twinwork\Append\40670\BI_TEMPLATE.mrt</ReportFile>
  <ReportGuid>2305e1b0e26049fdbb1dd8d77cc82bd0</ReportGuid>
  <ReportName>Report</ReportName>
  <ReportUnit>Centimeters</ReportUnit>
  <ReportVersion>2020.4.2.0</ReportVersion>
  <Script>using System;
using System.Drawing;
using System.Windows.Forms;
using System.Data;
using Stimulsoft.Controls;
using Stimulsoft.Base.Drawing;
using Stimulsoft.Report;
using Stimulsoft.Report.Dialogs;
using Stimulsoft.Report.Components;
using System.Collections.Generic;
//using System.Xml.Serialization;
using System.Xml;
//using System.IO;
//using System.Linq;
//using System.Xml.Linq;

namespace Reports
{
    
	public class Report : Stimulsoft.Report.StiReport
	{	
		public Stimulsoft.Report.Components.StiPageHeaderBand PageHeaderBand1;
		public Stimulsoft.Report.Components.StiText TextDataHeader;
		public Stimulsoft.Report.Components.StiText TextH1;
		public Stimulsoft.Report.Components.StiText TextCompany;
		public Stimulsoft.Report.Components.StiText TextPage;
		public Stimulsoft.Report.Components.StiText TextPrintPar;
		public Stimulsoft.Report.Components.StiText TextRepVer;
		public Stimulsoft.Report.Components.StiText TextRepName;
		public Stimulsoft.Report.Components.StiText TextGroupName;
		public Stimulsoft.Report.Components.StiText TextGroupFooterValue;
		public Stimulsoft.Report.Components.StiText TextHeadFooterBand;
		
		public Stimulsoft.Report.Components.StiHeaderBand HeaderBand1;
		public Stimulsoft.Report.Components.StiDataBand DataBand1;
		public Stimulsoft.Report.Components.StiText DataText;
		public Stimulsoft.Report.Components.StiText TextTotals;
		public Stimulsoft.Report.Components.StiText TextF;
		public Stimulsoft.Report.Components.StiText TextS;
		public Stimulsoft.Report.Components.StiGroupHeaderBand GroupHeaderBand1;
		public Stimulsoft.Report.Components.StiGroupFooterBand GroupFooterBand1;
		public Stimulsoft.Report.Components.StiFooterBand FooterBand1;
		public Stimulsoft.Report.Components.StiShape Shape1;
		public Stimulsoft.Report.Components.StiShape Shape2;
		public Stimulsoft.Report.Components.StiShape Shape3;
		public Stimulsoft.Report.Components.StiShape Shape4;
		public Stimulsoft.Report.Components.StiShape Shape5;
		
		public int [] IndexArray;
		public int [] ValueArray;

		public static List&lt;string&gt; ColWidthVal = new List&lt;string&gt;();
		public static List&lt;string&gt; ReportWidth = new List&lt;string&gt;();
		public static List&lt;string&gt; ReportStyleBW = new List&lt;string&gt;();
		public static List&lt;string&gt; ReportOrientVal = new List&lt;string&gt;();
		public static List&lt;string&gt; ColNameVal = new List&lt;string&gt;();
		public static List&lt;string&gt; ColAlignVal = new List&lt;string&gt;();
		public static List&lt;string&gt; ColTypeVal = new List&lt;string&gt;();
		public static List&lt;int&gt; ColRunSumVal = new List&lt;int&gt;();
		public static List&lt;int&gt; ColRowOrder = new List&lt;int&gt;();
		//	public static List&lt;string&gt; ColTotalSumVal = new List&lt;string&gt;();
		
		public int TextHCounter = 0;
		public int TextFCounter = 0;
		public int TextDCounter = 0;
		public int GroupCounter = 0;
		public int GroupCounterText = 1;
		public int PageHeaderText = 0;
		
		public int TotalValueCounter = 1;
		
		public const double ToCmConstant = 0.02645833;
		public double PageWidthCm;
		
		
		public Report()
		{
		//	this.Dictionary.Clear();
			this.InitializeComponent();			
			Main();
		}

		void Main()
		{
			GroupCounter = 0;
			XmlDocument doc = new XmlDocument();			
			try
			{
				
				
				doc.Load((this.Dictionary.Databases[0] as Stimulsoft.Report.Dictionary.StiXmlDatabase).PathData);
			//	this.Dictionary.RemoveUnusedData();
			//	this.Dictionary.Synchronize();
		//	designer.Report.InvokeRefreshDictionary();
				XmlNodeList RepWidthList = doc.GetElementsByTagName("ReportWidth");
				XmlNodeList ColTypeList = doc.GetElementsByTagName("ColType");
				XmlNodeList ColWidthList = doc.GetElementsByTagName("ColWidth");
				XmlNodeList ColNameList = doc.GetElementsByTagName("ColName");
				XmlNodeList RepBWList  = doc.GetElementsByTagName("ReportBW");
				XmlNodeList ColAlignList = doc.GetElementsByTagName("ColAlignment");
				XmlNodeList ColRunSumList = doc.GetElementsByTagName("ColRunningSum");
				//	XmlNodeList ColTotalSumList = doc.GetElementsByTagName("ColRunningSum");
				XmlNodeList RepOrientList = doc.GetElementsByTagName("ReportOrient");
				//	ColNameVal.Add(doc.GetElementsByTagName("ReportBW"));
				ReportStyleBW.Add(RepBWList[0].InnerXml);
				ReportWidth.Add(RepWidthList[0].InnerXml);
				//	PageWidthCm = double.Parse(ReportWidth[0], new System.Globalization.CultureInfo("en-GB"))*ToCmConstant;
				ReportOrientVal.Add(RepOrientList[0].InnerXml);
			
				for (int i=0; i &lt; ColWidthList.Count; i++)
				{
					ColWidthVal.Add(ColWidthList[i].InnerXml);
					ColTypeVal.Add(ColTypeList[i].InnerXml);
					ColNameVal.Add(ColNameList[i].InnerXml);
					ColAlignVal.Add(ColAlignList[i].InnerXml);
					
					if (ColRunSumList[i].InnerXml != "0")
					{
						ColRunSumVal.Add(int.Parse(ColRunSumList[i].InnerXml));
						ColRowOrder.Add(i+1);
					}
				}
				
				IndexArray = (ColRowOrder.ToArray());
				ValueArray = (ColRunSumVal.ToArray());
				ShakerSort2D(ValueArray, IndexArray);
				if (ReportOrientVal[0] == "0")
				{
					//	this.Page1.Orientation = Stimulsoft.Report.Components.StiPageOrientation.Landscape;
					PageWidthCm = 21;
				}
						
				if (ReportOrientVal[0] == "1")
				{
					this.Page1.Orientation = Stimulsoft.Report.Components.StiPageOrientation.Landscape;
					PageWidthCm = 29.7;
				}
			
				if (ReportOrientVal[0] == "2")
				{
					this.Page1.Orientation = Stimulsoft.Report.Components.StiPageOrientation.Landscape;
					PageWidthCm = double.Parse(ReportWidth[0], new System.Globalization.CultureInfo("en-GB"))*ToCmConstant;
				
					if (PageWidthCm &gt; 21)
					{
						this.Page1.Orientation = Stimulsoft.Report.Components.StiPageOrientation.Landscape;
						this.Page1.PageWidth = PageWidthCm;
					}
				
					if (PageWidthCm &lt;= 21)
					{
						PageWidthCm = 21;
					}
				
				}
				this.AddPageHeader();
				//	this.AddPageHeaderBand();
			
				this.AddGroupHeaderBand();
				//	this.AddGroupHeaderBand();
				this.AddDataHeaderBand();
				//	this.Add_FooterBand();
				this.AddDataBand();
				this.AddGroupFooterBand();
				//	this.AddGroupFooterBand();
				this.AddFooterBand();
			}
				
				
			catch (IndexOutOfRangeException)
			{
				Console.WriteLine("Chybný XML soubor");
				return;
			}
				
			catch (System.IO.DirectoryNotFoundException)
			{
				Console.WriteLine("Chybný XML soubor");
				return;
			}

			catch (System.IO.FileNotFoundException)
			{
				Console.WriteLine("Chybný XML soubor");
				return;
			}
			catch (XmlException)
			{
				Console.WriteLine("Chybný XML soubor");
				return;
			}
			
		}
		
		public void AddPageHeader()
		{
			
			this.PageHeaderBand1 = new Stimulsoft.Report.Components.StiPageHeaderBand();
			this.PageHeaderBand1.CanShrink = true;
			this.PageHeaderBand1.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 27.7, 2);
			
			if (ReportStyleBW[0] != "1")
			{
				this.PageHeaderBand1.ComponentStyle = "Podklad";
			}
			
			//		this.PageHeaderBand1.BeforePrint += new System.EventHandler(this.Záhlaví_Conditions);
			this.PageHeaderBand1.Name = "Záhlaví";
			this.PageHeaderBand1.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			//	this.PageHeaderBand1.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.FromArgb(255, 204, 204, 204));
			this.PageHeaderBand1.Page = this.Page1;
			this.PageHeaderBand1.Parent = this.Page1;
			this.TextCompany = new Stimulsoft.Report.Components.StiText();
			this.TextCompany.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 10, 0.35);
			
			
			//	this.TextCompany.Width = double.Parse(ColumnPar.GetData("ColWidth",0).ToString(), new System.Globalization.CultureInfo("en-GB"));
			this.TextCompany.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Top;
			this.TextCompany.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Left;
			this.TextCompany.DockStyle = Stimulsoft.Report.Components.StiDockStyle.Left;
			this.TextCompany.Name = "TextCompany";
			this.TextCompany.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextCompany_GetValue);
			this.TextCompany.Type = Stimulsoft.Report.Components.StiSystemTextType.Expression;
			this.TextCompany.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.TextCompany.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.TextCompany.Font = new System.Drawing.Font("Arial", 7F);
			this.TextCompany.Indicator = null;
			this.TextCompany.Interaction = null;
			this.TextCompany.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
			this.TextCompany.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
			this.TextCompany.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
			this.TextCompany.Page = this.Page1;
			this.TextCompany.Parent = this.HeaderBand1;
			
			this.TextPrintPar = new Stimulsoft.Report.Components.StiText();
			this.TextPrintPar.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 1.6, 10, 0.35);
			this.TextPrintPar.PrintOn = Stimulsoft.Report.Components.StiPrintOnType.OnlyFirstPage;
			this.TextPrintPar.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Bottom;
			this.TextPrintPar.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Left;
			//	this.TextPrintPar.DockStyle = Stimulsoft.Report.Components.StiDockStyle.Left;
			this.TextPrintPar.Name = "TextPrintPar";
			this.TextPrintPar.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextPrintPar_GetValue);
			this.TextPrintPar.Type = Stimulsoft.Report.Components.StiSystemTextType.Expression;
			this.TextPrintPar.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.TextPrintPar.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.TextPrintPar.Font = new System.Drawing.Font("Arial", 7F);
			this.TextPrintPar.Indicator = null;
			this.TextPrintPar.Interaction = null;
			this.TextPrintPar.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
			this.TextPrintPar.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
			this.TextPrintPar.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
			this.TextPrintPar.Page = this.Page1;
			this.TextPrintPar.Parent = this.HeaderBand1;
			
			this.TextRepName = new Stimulsoft.Report.Components.StiText();
			this.TextRepName.CanShrink = true;
			this.TextRepName.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD((PageWidthCm/2)-10, 0.2, 18, 0.6);
			this.TextRepName.DockStyle = Stimulsoft.Report.Components.StiDockStyle.Top;
			//	this.TextRepName.PrintOn = Stimulsoft.Report.Components.StiPrintOnType.OnlyFirstPage;
			this.TextRepName.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Top;
			this.TextRepName.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Center;
			//	this.TextPrintPar.DockStyle = Stimulsoft.Report.Components.StiDockStyle.Left;
			this.TextRepName.Name = "TextRepName";
			this.TextRepName.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextRepName_GetValue);
			this.TextRepName.Type = Stimulsoft.Report.Components.StiSystemTextType.Expression;
			this.TextRepName.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.TextRepName.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.TextRepName.Font = new System.Drawing.Font("Arial", 14F);
			this.TextRepName.Indicator = null;
			this.TextRepName.Interaction = null;
			this.TextRepName.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
			this.TextRepName.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
			this.TextRepName.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
			this.TextRepName.Page = this.Page1;
			this.TextRepName.Parent = this.HeaderBand1;
			
			this.TextRepVer = new Stimulsoft.Report.Components.StiText();
			this.TextRepVer.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 1.6, PageWidthCm-2, 0.35);
			this.TextRepVer.PrintOn = Stimulsoft.Report.Components.StiPrintOnType.OnlyFirstPage;
			this.TextRepVer.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Bottom;
			this.TextRepVer.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Right;
			//	this.TextRepVer.DockStyle = Stimulsoft.Report.Components.StiDockStyle.Right;
			this.TextRepVer.Name = "TextRepVer";
			this.TextRepVer.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextRepVer_GetValue);
			this.TextRepVer.Type = Stimulsoft.Report.Components.StiSystemTextType.Expression;
			this.TextRepVer.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.TextRepVer.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.TextRepVer.Font = new System.Drawing.Font("Arial", 7F);
			this.TextRepVer.Indicator = null;
			this.TextRepVer.Interaction = null;
			this.TextRepVer.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
			this.TextRepVer.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
			this.TextRepVer.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
			this.TextRepVer.Page = this.Page1;
			this.TextRepVer.Parent = this.HeaderBand1;
			
			this.TextPage = new Stimulsoft.Report.Components.StiText();
			this.TextPage.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 10, 0.35);
			this.TextPage.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Top;
			this.TextPage.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Right;
			this.TextPage.DockStyle = Stimulsoft.Report.Components.StiDockStyle.Right;
			this.TextPage.Name = "TextPage";
			this.TextPage.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextPage_GetValue);
			this.TextPage.Type = Stimulsoft.Report.Components.StiSystemTextType.Expression;
			this.TextPage.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.TextPage.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.TextPage.Font = new System.Drawing.Font("Arial", 7F);
			this.TextPage.Indicator = null;
			this.TextPage.Interaction = null;
			this.TextPage.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
			this.TextPage.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
			this.TextPage.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
			this.TextPage.Page = this.Page1;
			this.TextPage.Parent = this.HeaderBand1;
			this.PageHeaderBand1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
				this.TextCompany,
				this.TextPage,
				this.TextPrintPar,
				this.TextRepVer,
				this.TextRepName});
			this.Page1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
				this.PageHeaderBand1});
			//	AddPageHeaderText(1);
			//	AddPageHeaderText(2);
			
		}
		
		public void TextCompany_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = ToString(this.ReportPar.Company);
		}
		
		public void TextPage_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = ToString(sender, PageNumber, true) + " z " + ToString(sender, TotalPageCount, true);
		}
		
		public void TextPrintPar_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = "Vytvořeno aplikací FisPro " + ToString(sender, ReportPar.FisProVer, true) + " dne " + ToString(sender, ReportPar.ReportDate, true);
		}
		
		public void TextRepVer_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = "Verze sestavy  " + ToString(sender, ReportPar.ReportVer, true);
		}
		
		public void TextRepName_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = ToString(sender, ReportPar.ReportName, true);
		//	e.Value = ToString(IndexArray[0]);
		}
		
		
		
		public void TextH_BeforePrint(object sender, System.EventArgs e)
		{
			//	this.TextF.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0.8, 0, 2, 0.1);
			//	this.GroupFooterBand1.Components.Clear();
			//	GlobVar.InitializeList();
			//	GlobVar.YourList = Stimulsoft.Report.Dictionary.StiDataColumn.GetDataListFromDataColumn(this.Dictionary, "Data.ColData1");
			//	GlobVar.Col_Index++;
			//	Page_footer_text(1);
			//	Page_footer_text(1);
			//	Page_footer_text(1);
			//	for (int k = 0; k &lt; Data.Columns.Count; k++)
			//	{
			//		Page_footer_text(1);
			//		GlobVar.Col_Index++;
			//		Line++;
			//	}
			//	TextF.Width = double.Parse(ColumnPar.DataTable.Rows[2][1].ToString());
			//	TextH.Width = 7.5;
		}
		
		public void PageHeaderBand1_BeforePrint(object sender, System.EventArgs e)
		{
			for (int k = 0; k &lt; Data.Columns.Count; k++)
			{
				//	Page_header_text(k/0.02645833);
				//	TextH.Width = 3;
				
			}
		}
	
	/*	public void AddPageHeaderBand()
		{
		//	Line = 0;
			this.PageHeaderBand1 = new Stimulsoft.Report.Components.StiPageHeaderBand();
			this.PageHeaderBand1.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0.4, 19, 0.8);
			this.PageHeaderBand1.Name = "PageHeaderBand1";
			this.PageHeaderBand1.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.PageHeaderBand1.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.PageHeaderBand1.Page = this.Page1;
			this.PageHeaderBand1.Parent = this.Page1;
		//	this.PageHeaderBand1.BeforePrint += new System.EventHandler(this.PageHeaderBand1_BeforePrint);
		//	this.PageHeaderBand1.BeforePrint += new System.EventHandler(this.TextH_BeforePrint);
			this.Page1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
				this.PageHeaderBand1});
		}*/
		
		public void DataHeaderText(double ColWidth, string ColAlignment)
		{
			this.TextDataHeader = new Stimulsoft.Report.Components.StiText();
			this.TextDataHeader.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 1, 0.35);
			this.TextDataHeader.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Center;
			if (ColAlignment == "1")
			{
				this.TextDataHeader.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Right;
			}
			this.TextDataHeader.Width = ColWidth*0.02645833;
			this.TextDataHeader.DockStyle = Stimulsoft.Report.Components.StiDockStyle.Left;
			this.TextDataHeader.Name = "Text1";
			this.TextDataHeader.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextDataHeader_GetValue);
			this.TextDataHeader.Type = Stimulsoft.Report.Components.StiSystemTextType.Expression;
			this.TextDataHeader.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.TextDataHeader.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.TextDataHeader.Font = new System.Drawing.Font("Arial", 7F);
			this.TextDataHeader.Indicator = null;
			this.TextDataHeader.Interaction = null;
			this.TextDataHeader.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
			this.TextDataHeader.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
			this.TextDataHeader.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
			//	this.TextH.BeforePrint += new System.EventHandler(this.TextH_BeforePrint);
			this.TextDataHeader.Page = this.Page1;
			this.TextDataHeader.Parent = this.HeaderBand1;
			this.HeaderBand1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
				this.TextDataHeader});			
		}
		
		public void TextDataHeader_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			int [] a ;
			int [] b;
			//	Get_Groups_new(out a, out b);
			//	int Col_Index = a[0];
			if (TextHCounter == ColWidthVal.Count)
			{
				TextHCounter = 0;	
			}
			e.Value = ToString(sender, ColumnPar.DataTable.Rows[TextHCounter][0], true);
			//	e.Value = ReportStyleBW[0];
			//	e.Value = ColWidthVal[1];
			//	e.Value = "test";
			
			TextHCounter++;
		}
		
		public void DataBand1_BeginRender(object sender, System.EventArgs e)
		{
			this.Dictionary.Synchronize();
			//Data.Columns.Count = 0;
			for (int k = 0; k &lt; Data.Columns.Count; k++)
			{
				DataBandText(ColAlignVal[k],ColTypeVal[k],k,1);
				Line++;
			}
		}
		
		public void AddDataHeaderBand()
		{
			this.HeaderBand1 = new Stimulsoft.Report.Components.StiHeaderBand();
			this.HeaderBand1.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0.4, 19, 0.35);
			this.HeaderBand1.Name = "HeaderBand1";
			this.HeaderBand1.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.HeaderBand1.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.HeaderBand1.Interaction = null;
			this.HeaderBand1.Page = this.Page1;
			this.HeaderBand1.Parent = this.Page1;
			this.Shape1 = new Stimulsoft.Report.Components.StiShape();
			this.Shape1.BorderColor = System.Drawing.Color.Black;
			this.Shape1.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, -0.05, PageWidthCm-2, 0.1);
			this.Shape1.Name = "Shape1";
			this.Shape1.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.Shape1.Interaction = null;
			this.Shape1.ShapeType = new Stimulsoft.Report.Components.ShapeTypes.StiHorizontalLineShapeType();
			this.Shape1.Page = this.Page1;
			this.Shape1.Parent = this.HeaderBand1;
			this.Shape2 = new Stimulsoft.Report.Components.StiShape();
			this.Shape2.BorderColor = System.Drawing.Color.Black;
			this.Shape2.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0.3, PageWidthCm-2, 0.1);
			this.Shape2.Name = "Shape1";
			this.Shape2.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.Shape2.Interaction = null;
			this.Shape2.ShapeType = new Stimulsoft.Report.Components.ShapeTypes.StiHorizontalLineShapeType();
			this.Shape2.Page = this.Page1;
			this.Shape2.Parent = this.HeaderBand1;

			if (ReportStyleBW[0] != "1")
			{
				this.HeaderBand1.ComponentStyle = "Hlavicka - kategorie";
			}
			else
			{
				this.HeaderBand1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
					this.Shape1,
					this.Shape2});
			}
			//	this.HeaderBand1.BeforePrint += new System.EventHandler(this.PageHeaderBand1_BeforePrint);
			
			for (int j = 0; j &lt; ColWidthVal.Count; j++) 
			{
				DataHeaderText(double.Parse(ColWidthVal[j], new System.Globalization.CultureInfo("en-GB")),ColAlignVal[j]);			
			}
			this.Page1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
				this.HeaderBand1});
			//	this.HeaderBand1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
			//	this.Shape2});
		}
		
		public void AddDataBand()
		{
			this.DataBand1 = new Stimulsoft.Report.Components.StiDataBand();
			this.DataBand1.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 2, 19, 0.35);
			//	this.DataBand1.ComponentStyle = "Radek - sedy";
			this.DataBand1.DataSourceName = "Data";
			this.DataBand1.Name = "DataBand1";
			this.DataBand1.Sort = new string[0];
			this.DataBand1.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.DataBand1.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.DataBand1.Page = this.Page1;
			this.DataBand1.Parent = this.Page1;
			this.DataBand1.Components.Clear();
			this.DataBand1.BeginRender += new System.EventHandler(this.DataBand1_BeginRender);
			this.DataBand1.BeforePrint += new System.EventHandler(this.DataBand1_Conditions);
			this.Page1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
				this.DataBand1});
		}
		
		private void DataBand1_Conditions(object sender, System.EventArgs e)
		{
			// CheckerInfo: Conditions DataBand1
			if ((this.ReportPar.ReportBW.ToString().ToLower() == this.ToString("1").ToLower()))
			{
				((Stimulsoft.Report.Components.IStiBrush)(sender)).Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
				((Stimulsoft.Report.Components.IStiBorder)(sender)).Border = ((Stimulsoft.Base.Drawing.StiBorder)(((Stimulsoft.Report.Components.IStiBorder)(sender)).Border.Clone()));
				((Stimulsoft.Report.Components.IStiBorder)(sender)).Border.Side = Stimulsoft.Base.Drawing.StiBorderSides.None;
				((Stimulsoft.Report.Components.StiComponent)(sender)).Enabled = true;
			}
			if (((this.ReportPar.ReportBW.ToString().ToLower() == this.ToString("0").ToLower()) 
				&amp;&amp; (Line %2 != 0)))
			{
				Stimulsoft.Report.Components.StiConditionHelper.Apply(sender, "Radek - sedy");
				((Stimulsoft.Report.Components.StiComponent)(sender)).Enabled = true;
			}
			if (((this.ReportPar.ReportBW.ToString().ToLower() == this.ToString("0").ToLower()) 
				&amp;&amp; (Line %2 == 0)))
			{
				Stimulsoft.Report.Components.StiConditionHelper.Apply(sender, "Radek - bily");
				((Stimulsoft.Report.Components.StiComponent)(sender)).Enabled = true;
			}
			
		}
		
		public void DataBandText(string ColAlignment, string ColType, int ColIndex, int RowIndex)
		{ 
			
			var FormatNumber = new Stimulsoft.Report.Components.TextFormats.StiNumberFormatService(1, ",", 2, ".", 3, true, false, " ");
			var FormatDate = new Stimulsoft.Report.Components.TextFormats.StiDateFormatService("d", " ");
				
			this.DataText = new Stimulsoft.Report.Components.StiText();			
			this.DataText.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 1, 0.35);
			this.DataText.Width = double.Parse(ColumnPar.DataTable.Rows[ColIndex][1].ToString(), new System.Globalization.CultureInfo("en-GB"))*0.02645833;
			if (ColAlignment == "1")
			{
				this.DataText.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Right;
			}

			this.DataText.TextFormat = FormatNumber;
			this.DataText.DockStyle = Stimulsoft.Report.Components.StiDockStyle.Left;
			this.DataText.Name = "txt";
			this.DataText.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(DataBandText_GetValue);
			this.DataText.Type = Stimulsoft.Report.Components.StiSystemTextType.Expression;
			this.DataText.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Center;
			this.DataText.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.DataText.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.DataText.Font = new System.Drawing.Font("Arial", 7F);
			this.DataText.Indicator = null;
			this.DataText.Interaction = null;
			this.DataText.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
			this.DataText.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
			this.DataText.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
			this.DataText.Page = this.Page1;
			this.DataText.Parent = this.DataBand1;
			this.DataBand1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
				this.DataText});
		}
		
		public void DataBandText_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			if (ColumnPar.DataTable.Rows[Column-1][2].ToString() != "")
			{
				if (ColumnPar.DataTable.Rows[Column-1][2].ToString() == "0")
				{
					e.Value = this.DataText.TextFormat.Format(CheckExcelValue(sender, ToString(Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+Column, false))));
				}
			
				if (ColumnPar.DataTable.Rows[Column-1][2].ToString() == "2")
				{
					DateTime dt;
					try
					{
						dt = DateTime.Parse(ToString(Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+Column)));
						e.Value = dt.ToString("dd/MM/yyyy");
					}
					catch(FormatException)
					{
						e.Value = ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+Column, false));
					}
				}
				if (ColumnPar.DataTable.Rows[Column-1][2].ToString() == "1")
				{
					e.Value = ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+Column, false));
				}
			}
			else
			{
				e.Value = ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+Column, false));
			}
			Column++;
		}
		
		public void AddGroupHeaderBand()
		{
			for (int i = 0; i &lt; ValueArray.Length; i++)
			
			{
				StiText TextGroup;
				TextGroup = new Stimulsoft.Report.Components.StiText();
				
				/* Dvě možnosti vytvořit Band. Buď deklarací nové komponenty: 
						public Stimulsoft.Report.Components.StiHeaderBand HeaderBand1;
					nebo metodou CreateObject:  Stimulsoft.Base.StiActivator.CreateObject*/
				
				StiGroupHeaderBand groupHeaderBand = Stimulsoft.Base.StiActivator.CreateObject(StiOptions.Designer.ComponentsTypes.Bands.GroupHeaderBand) as StiGroupHeaderBand;
				groupHeaderBand.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0.4, 19, 0.35);
				groupHeaderBand.Name = "GroupHeader" + i.ToString();
				//groupHeaderBand.Height = 0.5;
				if (i == 0)
				{
					groupHeaderBand.GetValue += new Stimulsoft.Report.Events.StiValueEventHandler(this.GroupHeaderBand1__GetValue);
					TextGroup.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroup1__GetValue);
				}
				
				if (i == 1)
				{
					groupHeaderBand.GetValue += new Stimulsoft.Report.Events.StiValueEventHandler(this.GroupHeaderBand2__GetValue);
					TextGroup.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroup2__GetValue);
				}
				
				if (i == 2)
				{
					groupHeaderBand.GetValue += new Stimulsoft.Report.Events.StiValueEventHandler(this.GroupHeaderBand3__GetValue);
					TextGroup.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroup3__GetValue);
				}
				
				if (i == 3)
				{
					groupHeaderBand.GetValue += new Stimulsoft.Report.Events.StiValueEventHandler(this.GroupHeaderBand4__GetValue);
					TextGroup.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroup4__GetValue);
				}
				
				if (i == 4)
				{
					groupHeaderBand.GetValue += new Stimulsoft.Report.Events.StiValueEventHandler(this.GroupHeaderBand5__GetValue);
					TextGroup.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroup5__GetValue);
				}
				
				//groupHeaderBand.Condition.Value = "{Data.ColData2}";
				
				if (ReportStyleBW[0] != "1")
				{
					groupHeaderBand.ComponentStyle = "Mezisoucet";
				}
				this.Page1.Components.Add(groupHeaderBand);
				
				TextGroup.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 19, 0.5);
				TextGroup.Name = "TextGroup" + i.ToString();
				TextGroup.Font = new System.Drawing.Font("Arial", 7F, System.Drawing.FontStyle.Bold);
				TextGroup.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Center;
			//	TextGroup.Text.Value = "{ColumnPar.ColName}";
			//	TextGroup.Border.Side = StiBorderSides.All;
                
				TextGroup.Enabled = true;
			//	TextGroup.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroup__GetValue);
				//	TextGroup.BeforePrint += new System.EventHandler(Text5_Conditions);
				

				groupHeaderBand.Components.Add(TextGroup);
			}
			//	Line=0;
			/*	for (int i = 0; i &lt; 3; i++)
			{
			GroupCounterText = i;
			//	this.TextF_Sum = new Stimulsoft.Report.Dictionary.StiSumDecimalFunctionService();
			this.GroupHeaderBand1 = new Stimulsoft.Report.Components.StiGroupHeaderBand();
			this.GroupHeaderBand1.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0.4, 19, 0.35);
			this.GroupHeaderBand1.Condition.Value = "{Data.ColData1}";
			if (ReportStyleBW[0] != "1")
			{
			this.GroupHeaderBand1.ComponentStyle = "Mezisoucet";
			}
			//	this.GroupHeaderBand1.Condition = new StiGroupConditionExpression("{Data.ColData1}");
			//	this.GroupHeaderBand1.Condition.value = "{Data.ColData1}";
				
			//	if (i == 0)
			//	{
			//	this.GroupHeaderBand1.GetValue += new Stimulsoft.Report.Events.StiValueEventHandler(this.GroupHeaderBand1__GetValue);
			//	}
			//	if (i == 1)
			//	{
			//	this.GroupHeaderBand1.GetValue += new Stimulsoft.Report.Events.StiValueEventHandler(this.GroupHeaderBand1__GetValue2);
			//	}
			//	GroupHeaderBand1__GetValue2
			//	this.GroupHeaderBand1.SetValue = "{Data.ColData1}";
			this.GroupHeaderBand1.Name = "GroupHeaderBand1";
			this.GroupHeaderBand1.SortDirection = Stimulsoft.Report.Components.StiGroupSortDirection.None;
			this.GroupHeaderBand1.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.GroupHeaderBand1.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.GroupHeaderBand1.Interaction = null;
			this.GroupHeaderBand1.Page = this.Page1;
			
			this.GroupHeaderBand1.Parent = this.Page1;
			
			
			
				
			
			//	GlobVar.Row_Index++;
			//	this.GroupHeaderBand1.BeginRender += new System.EventHandler(this.GroupHeaderBand1_BeginRender);
			//	this.GroupHeaderBand1.EndRender += new System.EventHandler(this.GroupHeaderBand1__EndRender);
			//	this.GroupHeaderBand1.Rendering += new System.EventHandler(this.GroupHeaderBand1__Rendering);
			//	this.GroupHeaderBand1.BeforePrint += new System.EventHandler(this.GroupHeaderBand1_BeforePrint);
			//	this.GroupHeaderBand1.Components.Clear();
			this.GroupHeadText();	
			
			this.GroupHeaderBand1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
			this.TextGroupName});
			//	this.GroupHeaderBand1.BeforePrintEvent.Script =
			this.GroupHeaderBand1.Rendering += new System.EventHandler(this.GroupBand1_BeforePrint);
			this.Page1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
			this.GroupHeaderBand1});
			GroupCount++;
				
				
			
			//	this.GroupHeaderBand1.BeginRender += new System.EventHandler(this.GroupHeaderBand1_BeginRender);
			//	Column++;
			//	Column=2;
			}*/
		}
		
		public void AddGroupFooterBand()
		{
		//	for (int i = 0; i &lt; ValueArray.Length; i++)
		//	{
			//	this.InitializeComponent();
			//	Main();
			string adds = ColWidthVal[0];
			//	int Ter = int.Parse(ReportStyleBW[0], new System.Globalization.CultureInfo("en-GB"));
		//	for (int i = 0; i &lt; 1; i++)
		//	{
				for (int i = 0; i &lt; ValueArray.Length; i++)
				{
				StiText TextGroupFooter;
				TextGroupFooter = new Stimulsoft.Report.Components.StiText();
				
				TextGroupFooter.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroupFooter1__GetValue);
				StiGroupFooterBand groupFooterBand = Stimulsoft.Base.StiActivator.CreateObject(StiOptions.Designer.ComponentsTypes.Bands.GroupFooterBand) as StiGroupFooterBand;
				groupFooterBand.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0.4, 19, 0.35);
				groupFooterBand.Name = "GroupFooter" + i.ToString();
			//	this.GroupFooterBand1 = new Stimulsoft.Report.Components.StiGroupFooterBand();
				groupFooterBand.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 19, 0.35);
				if (ReportStyleBW[0] != "1")
				{
					groupFooterBand.ComponentStyle = "Mezisoucet";
				}
			//	this.GroupFooterBand1.Name = "GroupFooterBand1";
				groupFooterBand.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
				groupFooterBand.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
				groupFooterBand.Page = this.Page1;
				groupFooterBand.Parent = this.Page1;
				//		this.GroupFooterBand1.BeforePrint += new System.EventHandler(this.GroupFooterBand1_BeforePrint);
				groupFooterBand.Components.Clear();
				this.EndRender += new System.EventHandler(this.CheckEndRenderRuntimes__EndRender);
				//	this.invokeEvents	()	;
				this.Page1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
					groupFooterBand});
				
				TextGroupFooter = new Stimulsoft.Report.Components.StiText();
				TextGroupFooter.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 12, 0.4);
				TextGroupFooter.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Center;
				TextGroupFooter.Type = Stimulsoft.Report.Components.StiSystemTextType.Expression;
				TextGroupFooter.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
				TextGroupFooter.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
				TextGroupFooter.Font = new System.Drawing.Font("Arial", 7F, System.Drawing.FontStyle.Bold);
				TextGroupFooter.Indicator = null;
				TextGroupFooter.Interaction = null;
				TextGroupFooter.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
				TextGroupFooter.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
				TextGroupFooter.TextFormat = new Stimulsoft.Report.Components.TextFormats.StiNumberFormatService(1, ",", 2, ".", 3, true, false, " ");
				TextGroupFooter.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
			//	this.TextGroupFooter.BeforePrint += new System.EventHandler(this.TextF_BeforePrint);
				TextGroupFooter.Page = this.Page1;
				TextGroupFooter.Parent = this.Page1;
				TextGroupFooter.Enabled = true;
			
				
				if (i == ValueArray.Length-1)
				{
					TextGroupFooter.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroupFooter1__GetValue);
				}
				
				if (i == ValueArray.Length-2)
				{
					TextGroupFooter.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroupFooter2__GetValue);
				}
				
				if (i == ValueArray.Length-3)
				{
					TextGroupFooter.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroupFooter3__GetValue);
				}
				
				if (i == ValueArray.Length-4)
				{
					TextGroupFooter.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroupFooter4__GetValue);
				}
				
				if (i == ValueArray.Length-5)
				{
					TextGroupFooter.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroupFooter5__GetValue);
				}
				
				this.Shape5 = new Stimulsoft.Report.Components.StiShape();
				this.Shape5.BorderColor = System.Drawing.Color.Black;
				this.Shape5.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, PageWidthCm-2, 0.1);
				this.Shape5.Name = "Shape5";
				this.Shape5.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
				this.Shape5.Interaction = null;
				this.Shape5.ShapeType = new Stimulsoft.Report.Components.ShapeTypes.StiHorizontalLineShapeType();
				this.Shape5.Page = this.Page1;
				this.Shape5.Parent = groupFooterBand;
				
				groupFooterBand.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
					this.Shape5,
					TextGroupFooter});
			//	TextGroupFooter.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 19, 0.5);
			//	TextGroupFooter.Name = "TextGroup" + i.ToString();
			//	TextGroupFooter.Font = new System.Drawing.Font("Arial", 8F, System.Drawing.FontStyle.Bold);
			//	TextGroupFooter.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Center;
				//	TextGroup.Text.Value = "{ColumnPar.ColName}";
				//	TextGroup.Border.Side = StiBorderSides.All;
                
				//	TextGroup.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroup__GetValue);
				//	TextGroup.BeforePrint += new System.EventHandler(Text5_Conditions);
			//	Column = 0;
				
				
			//	this.TextGroupFooter = new Stimulsoft.Report.Components.StiText();
			//	this.TextGroupFooter.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 1, 0.35);
			
			//	this.TextGroupFooter.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Center;
			//	this.TextGroupFooter.Width = double.Parse(ColWidthVal[j], new System.Globalization.CultureInfo("en-GB"))*ToCmConstant;
				//this.TextF.Width = 200*0.02645833;
			//	this.TextGroupFooter.DockStyle = Stimulsoft.Report.Components.StiDockStyle.Left;
					
			//	this.TextGroupFooter.Name = "TextCelkem";
		//		if (i == 0)
		//		{
			//		this.TextGroupFooter.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.__GetValue);
		//		}
					
		//		if (i == 1)
		//		{
			//		this.TextGroupFooter.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.txtF__GetValue2);
		//		}
			//	this.TextF.Type = Stimulsoft.Report.Components.StiSystemTextType.Expression;
			//	this.TextF.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			//	this.TextF.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			//	this.TextF.Font = new System.Drawing.Font("Arial", 7F);
			//	this.TextF.Indicator = null;
			//	this.TextF.Interaction = null;
			//	this.TextF.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
			//	this.TextF.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
			//	this.TextF.TextFormat = new Stimulsoft.Report.Components.TextFormats.StiNumberFormatService(1, ",", 2, ".", 3, true, false, " ");
			//	this.TextF.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
				//	this.TextF.BeforePrint += new System.EventHandler(this.TextF_BeforePrint);
			//	this.TextF.Page = this.Page1;
			//	this.TextF.Parent = this.Page1;
			//	this.TextF.Enabled = true;
			//	groupFooterBand.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
			//		this.TextF});
				
				for (int j = 0; j &lt; ColWidthVal.Count; j++)
				{
					TextGroupFooterValue = new Stimulsoft.Report.Components.StiText();
					TextGroupFooterValue.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0.35, 1, 0.35);
			
					TextGroupFooterValue.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Bottom;
					TextGroupFooterValue.Width = double.Parse(ColWidthVal[j], new System.Globalization.CultureInfo("en-GB"))*ToCmConstant;
					//this.TextF.Width = 200*0.02645833;
					TextGroupFooterValue.DockStyle = Stimulsoft.Report.Components.StiDockStyle.Left;
					
					if (ColAlignVal[j] == "1")
					{
						TextGroupFooterValue.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Right;
					}
					TextGroupFooterValue.Name = "Text1";
					
					if (i == ValueArray.Length-1)
					{
						TextGroupFooterValue.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroupFooterValue1__GetValue);
					}
					
					if (i == ValueArray.Length-2)
					{
						TextGroupFooterValue.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroupFooterValue2__GetValue);
					}
					
					if (i == ValueArray.Length-3)
					{
						TextGroupFooterValue.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroupFooterValue3__GetValue);
					}
					
					if (i == ValueArray.Length-4)
					{
						TextGroupFooterValue.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroupFooterValue4__GetValue);
					}
					
					if (i == ValueArray.Length-5)
					{
						TextGroupFooterValue.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroupFooterValue5__GetValue);
					}
					
					TextGroupFooterValue.Type = Stimulsoft.Report.Components.StiSystemTextType.Expression;
					TextGroupFooterValue.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
					TextGroupFooterValue.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
					TextGroupFooterValue.Font = new System.Drawing.Font("Arial", 7F);
					TextGroupFooterValue.Indicator = null;
					TextGroupFooterValue.Interaction = null;
					TextGroupFooterValue.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
					TextGroupFooterValue.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
					TextGroupFooterValue.TextFormat = new Stimulsoft.Report.Components.TextFormats.StiNumberFormatService(1, ",", 2, ".", 3, true, false, " ");
					TextGroupFooterValue.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
					//	this.TextF.BeforePrint += new System.EventHandler(this.TextF_BeforePrint);
					TextGroupFooterValue.Page = this.Page1;
					TextGroupFooterValue.Parent = this.Page1;
					TextGroupFooterValue.Enabled = true;
					groupFooterBand.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
						TextGroupFooterValue});

					//groupFooterBand.Components.Add(TextGroupFooter);
				//	groupFooterBand.Components.Add(TextF);
				}
				
				
				
				//	this.TextF.Width = double.Parse(adds, new System.Globalization.CultureInfo("en-GB"));
			//	for (int j = 0; j &lt; ColWidthVal.Count; j++) 
			//	{
				//	Page_footer_text(double.Parse(ColWidthVal[j], new System.Globalization.CultureInfo("en-GB")));
			//	}
				//	Page_footer_text(1);
				
			}
		}
		
		
		public void GetTotal2(object sender, Stimulsoft.Report.Events.StiValueEventArgs e)
		{
			// CheckerInfo: GetArgumentEvent Text2
		//	TotalValueCounter = 0;
			e.Value = ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData" + Column, false));
			//	e.Value = Data.ColData1;
		//	e.Value = "test";
			//	Var1++;
		}
		
		public void TextGroupFooterValue2__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			// CheckerInfo: Text Text2
			//		this.txt.TextFormat.Format(CheckExcelValue(sender, "12121212"));
			//		e.Value = ToString(sender, Totals.Sum(GroupHeaderBand1, this, "GetTotal2"), true);
			if (ColumnPar.DataTable.Rows[Column-1][5].ToString() == "1")
			{
				e.Value = this.TextGroupFooterValue.TextFormat.Format(CheckExcelValue(sender, Totals.Sum(GetComponentByName("GroupHeader1"), this, "GetTotal2")));
			//	e.Value = "test";
			}
		//	else
		//	{
			//	e.Value ="test";
			//	e.Value = this.TextF.TextFormat.Format(CheckExcelValue(sender, Totals.Sum(GetComponentByName("GroupHeader0"), this, "GetTotal2")));
		//	}
			//	e.Value = this.Text1.TextFormat.Format(CheckExcelValue(sender, Totals.Sum(DataBand1, this, "GetTotal1")));
			//	e.Value = "testfsdiofhoisdhfoisdh";
			//	this.TextF.Width = 4.5;
			Column++;
		}
		
		
		
		public void TextGroupFooterValue1__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			if (ColumnPar.DataTable.Rows[Column-1][5].ToString() == "1")
			{
				e.Value = this.TextGroupFooterValue.TextFormat.Format(CheckExcelValue(sender, Totals.Sum(GetComponentByName("GroupHeader0"), this, "GetTotal2")));
			}
			Column++;
		}
		
		public void TextGroupFooterValue3__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			if (ColumnPar.DataTable.Rows[Column-1][5].ToString() == "1")
			{
				e.Value = this.TextGroupFooterValue.TextFormat.Format(CheckExcelValue(sender, Totals.Sum(GetComponentByName("GroupHeader2"), this, "GetTotal2")));
			}
			Column++;
		}
		
		public void TextGroupFooterValue4__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			if (ColumnPar.DataTable.Rows[Column-1][5].ToString() == "1")
			{
				e.Value = this.TextGroupFooterValue.TextFormat.Format(CheckExcelValue(sender, Totals.Sum(GetComponentByName("GroupHeader3"), this, "GetTotal2")));
			}
			Column++;
		}
		
		public void TextGroupFooterValue5__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			if (ColumnPar.DataTable.Rows[Column-1][5].ToString() == "1")
			{
				e.Value = this.TextGroupFooterValue.TextFormat.Format(CheckExcelValue(sender, Totals.Sum(GetComponentByName("GroupHeader4"), this, "GetTotal2")));
			}
			Column++;
		}
		
		public void TextGroupFooter1__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = "Součet za: " + ColumnPar.DataTable.Rows[IndexArray[0]-1][0].ToString() + " " +
					  ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[0], false));
		}
		
		public void TextGroupFooter2__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = "Součet za: " + ColumnPar.DataTable.Rows[IndexArray[1]-1][0].ToString() + " " +
				ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[1], false));
		}
		
		public void TextGroupFooter3__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = "Součet za: " + ColumnPar.DataTable.Rows[IndexArray[2]-1][0].ToString() + " " +
				ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[2], false));
		}
		
		public void TextGroupFooter4__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = "Součet za: " + ColumnPar.DataTable.Rows[IndexArray[3]-1][0].ToString() + " " +
				ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[3], false));
		}
		
		public void TextGroupFooter5__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = "Součet za: " + ColumnPar.DataTable.Rows[IndexArray[4]-1][0].ToString() + " " +
				ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[4], false));
		}
		
		public void txtS__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			// CheckerInfo: Text Text2
			//	e.Value = ToString(sender, Totals.Sum(GroupHeaderBand1, this, "GetTotal2"), true);
			e.Value = "testfsdiofhoisdhfoisdh";
			//	this.TextF.Width = 4.5;
			Column++;
		}
		
		public void GroupHeaderBand1__GetValue(object sender, Stimulsoft.Report.Events.StiValueEventArgs e)
		{
			e.Value = ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[0], false));
		}
		
		public void GroupHeaderBand2__GetValue(object sender, Stimulsoft.Report.Events.StiValueEventArgs e)
		{
			e.Value = ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[1], false));
		}
		
		public void GroupHeaderBand3__GetValue(object sender, Stimulsoft.Report.Events.StiValueEventArgs e)
		{
			e.Value = ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[2], false));
		}
		
		public void GroupHeaderBand4__GetValue(object sender, Stimulsoft.Report.Events.StiValueEventArgs e)
		{
			e.Value = ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[3], false));
		}
		
		public void GroupHeaderBand5__GetValue(object sender, Stimulsoft.Report.Events.StiValueEventArgs e)
		{
			e.Value = ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[4], false));
		}
		
		
		public void TextGroup1__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = ColumnPar.DataTable.Rows[IndexArray[0]-1][0].ToString() + " " +
					ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[0], false));
		}
		
		public void TextGroup2__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = ColumnPar.DataTable.Rows[IndexArray[1]-1][0].ToString() + " " +
					ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[1], false));
		}
		
		public void TextGroup3__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = ColumnPar.DataTable.Rows[IndexArray[2]-1][0].ToString() + " " +
					ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[2], false));
		}
		
		public void TextGroup4__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = ColumnPar.DataTable.Rows[IndexArray[3]-1][0].ToString() + " " +
					ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[3], false));
		}
		
		public void TextGroup5__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = ColumnPar.DataTable.Rows[IndexArray[4]-1][0].ToString() + " " +
					ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[4], false));
		}
		
		
		/*public void TextGroupFooter1__GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
		{
			e.Value = "Součet za: " + ColumnPar.DataTable.Rows[IndexArray[0]-1][0].ToString() + " " +
				ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+IndexArray[0], false));
		}*/
		
		
		
		public void GroupHeaderBandTerst__GetValue(object sender, Stimulsoft.Report.Events.StiValueEventArgs e)
		{
			// CheckerInfo: Condition GroupHeaderBand1
		//	e.Value = Data.ColData1;
			
			e.Value = ToString(Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+GroupCount));
			GroupCount++;
		}
		
		public void GroupHeaderBand1__GetValue2(object sender, Stimulsoft.Report.Events.StiValueEventArgs e)
		{
			// CheckerInfo: Condition GroupHeaderBand1
			//	int[] temp1;
			//	int[] temp2; 
			//	this.Get_Groups(out temp1,out temp2);
			
			//	int Col_Index = temp1[0];
			//	this.Get_Groups(out temp1,out temp2);
			//	Get_Groups_new(out temp1, out temp2);
			//	GlobVar.Col_Index = temp1[GlobVar.Row_Index];
			//	GlobVar.YourList.Add(int.Parse(ColumnPar.DataTable.Rows[0][3].ToString()));
			e.Value = ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData2", false));
			//	GroupCounter = GroupCounter +1;
			//	Line++;
			//Row_Index = 1;
			//GlobVar.Row_Index++;
			//	e.Value = Data.ColData1;
		}
		
		public void AddFooterBand()
		{
			this.FooterBand1 = new Stimulsoft.Report.Components.StiFooterBand();
			this.FooterBand1.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 0, 0.70);
			if (ReportStyleBW[0] != "1")
			{
				this.FooterBand1.ComponentStyle = "Soucet";
			}
			this.FooterBand1.Name = "FooterBand1";
			this.FooterBand1.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.FooterBand1.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.FooterBand1.Page = this.Page1;
			this.FooterBand1.Parent = this.Page1;
			this.TextHeadFooterBand = new Stimulsoft.Report.Components.StiText();
			this.TextHeadFooterBand.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 1.8, 0.35);
			this.TextHeadFooterBand.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Center;
			this.TextHeadFooterBand.Name = "Text101";
			this.TextHeadFooterBand.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextHeadFooterBand_GetValue);
			this.TextHeadFooterBand.Type = Stimulsoft.Report.Components.StiSystemTextType.Expression;
			this.TextHeadFooterBand.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.TextHeadFooterBand.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.TextHeadFooterBand.Font = new System.Drawing.Font("Arial", 7F, System.Drawing.FontStyle.Bold);
			this.TextHeadFooterBand.Indicator = null;
			this.TextHeadFooterBand.Interaction = null;
			this.TextHeadFooterBand.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
			this.TextHeadFooterBand.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
			this.TextHeadFooterBand.TextFormat = new Stimulsoft.Report.Components.TextFormats.StiDateFormatService("d", " ");
			this.TextHeadFooterBand.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
			this.Shape3 = new Stimulsoft.Report.Components.StiShape();
			this.Shape3.BorderColor = System.Drawing.Color.Black;
			this.Shape3.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, -0.05, PageWidthCm-2, 0.1);
		
			this.Shape3.Name = "Shape1";
			this.Shape3.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.Shape3.Interaction = null;
			this.Shape3.ShapeType = new Stimulsoft.Report.Components.ShapeTypes.StiHorizontalLineShapeType();
			this.Shape3.Page = this.Page1;
			this.Shape3.Parent = this.FooterBand1;
			this.Shape4 = new Stimulsoft.Report.Components.StiShape();
			this.Shape4.BorderColor = System.Drawing.Color.Black;
			this.Shape4.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0.6, PageWidthCm-2, 0.1);
			this.Shape4.Name = "Shape1";
			this.Shape4.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.Shape4.Interaction = null;
			this.Shape4.ShapeType = new Stimulsoft.Report.Components.ShapeTypes.StiHorizontalLineShapeType();
			this.Shape4.Page = this.Page1;
			this.Shape4.Parent = this.FooterBand1;
			
			if (ReportStyleBW[0] == "1")
			{
				this.FooterBand1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
					this.Shape3,
					this.Shape4});
			}
			
			this.FooterBand1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
				this.TextHeadFooterBand});
			this.FooterBand1.BeforePrint += new System.EventHandler(this.FooterBand1_BeforePrint);
		//	this.FooterBand1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
			//	this.Shape4});
			
			this.Page1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
				this.FooterBand1});
			
			
			
		}
		
		
			public void TextHeadFooterBand_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
			{
				// CheckerInfo: Text Text101
				e.Value = "Celkem:";
			}
        
		
	//	public void GroupBand1_BeforePrint(object sender, System.EventArgs e)
	//	{
	//		var1 = "tests1";
			// CheckerInfo: BeforePrintEvent FooterBand1
		//	for (int k = 0; k &lt; Data.Columns.Count; k++)
		//	{
			//	GroupHeadText();
			
		//	GroupCounterText++;
				//	Line++;
		//	Column++;
		//	}
	//	}
		

		
		public void GroupHeadText ()
		{
			this.TextGroupName = new Stimulsoft.Report.Components.StiText();
			this.TextGroupName.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, 4, 0.35);
			this.TextGroupName.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Top;
			this.TextGroupName.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Left;
			this.TextGroupName.Name = "TextGroupName";
		//	this.TextGroupName.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TextGroupName_GetValue);
		//	e.Value = "Test";
		//	this.TextGroupName.TexValue = var1;
			this.TextGroupName.Type = Stimulsoft.Report.Components.StiSystemTextType.Expression;
			this.TextGroupName.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.TextGroupName.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.TextGroupName.Font = new System.Drawing.Font("Arial", 7F);
			this.TextGroupName.Indicator = null;
			this.TextGroupName.Interaction = null;
			this.TextGroupName.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
			this.TextGroupName.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
			this.TextGroupName.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
			this.TextGroupName.Page = this.Page1;
			this.TextGroupName.Parent = this.GroupHeaderBand1;
		//	GroupCounterText++;
			
			
		}
		
		
			public void FooterBand1_BeforePrint(object sender, System.EventArgs e)
			{
			// CheckerInfo: BeforePrintEvent FooterBand1
			for (int k = 0; k &lt; Data.Columns.Count; k++)
			{
				TotalSumText(k, ColAlignVal[k]);
				//	Line++;
			}
			}
		
			public void GetTotal1(object sender, Stimulsoft.Report.Events.StiValueEventArgs e)
			{
			// CheckerInfo: GetArgumentEvent Text2
			e.Value = ToString(sender, Stimulsoft.Report.Dictionary.StiDataColumn.GetDataFromDataColumn(this.Dictionary, "Data.ColData"+Column, false));
			//	Var1++;
			}
        
			public void TotalSumText_GetValue(object sender, Stimulsoft.Report.Events.StiGetValueEventArgs e)
			{
			// CheckerInfo: Text Text2
			//e.Value = ToString(sender, Totals.Sum(DataBand1, this, "GetTotal1"), true);
			if (ColumnPar.DataTable.Rows[TextFCounter][5].ToString() == "1")
			{
				e.Value = this.TextTotals.TextFormat.Format(CheckExcelValue(sender, Totals.Sum(DataBand1, this, "GetTotal1")));
			}
			else
			{
				e.Value = "";
			}
			Column++;
			TextFCounter++;
			}
		
			public void TotalSumText(int ColWidth, string ColAlignment)
			{
			this.TextTotals = new Stimulsoft.Report.Components.StiText();
			
			if (ReportStyleBW[0] == "1")
			{
				this.TextTotals.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0.65, 1, 0.35);
				this.TextTotals.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Center;
			}
			
			else
			{
				this.TextTotals.ClientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0.35, 1, 0.35);
				this.TextTotals.VertAlignment = Stimulsoft.Base.Drawing.StiVertAlignment.Bottom;
			}
			
			if (ColAlignment == "1")
			{
				this.TextTotals.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Right;
			}
			
			this.TextTotals.Width = double.Parse(ColumnPar.DataTable.Rows[ColWidth][1].ToString(), new System.Globalization.CultureInfo("en-GB"))*0.02645833;
			this.TextTotals.DockStyle = Stimulsoft.Report.Components.StiDockStyle.Left;
			this.TextTotals.Name = "Text1";
			this.TextTotals.GetValue += new Stimulsoft.Report.Events.StiGetValueEventHandler(this.TotalSumText_GetValue);
			this.TextTotals.Type = Stimulsoft.Report.Components.StiSystemTextType.Expression;
			this.TextTotals.Border = new Stimulsoft.Base.Drawing.StiBorder(Stimulsoft.Base.Drawing.StiBorderSides.None, System.Drawing.Color.Black, 1, Stimulsoft.Base.Drawing.StiPenStyle.Solid, false, 4, new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black), false);
			this.TextTotals.Brush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Transparent);
			this.TextTotals.Font = new System.Drawing.Font("Arial", 7F);
			this.TextTotals.Indicator = null;
			this.TextTotals.Interaction = null;
			this.TextTotals.Margins = new Stimulsoft.Report.Components.StiMargins(0, 0, 0, 0);
			this.TextTotals.TextBrush = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.Color.Black);
			this.TextTotals.TextFormat = new Stimulsoft.Report.Components.TextFormats.StiNumberFormatService(1, ",", 2, ".", 3, true, false, " ");
			this.TextTotals.TextOptions = new Stimulsoft.Base.Drawing.StiTextOptions(false, false, false, 0F, System.Drawing.Text.HotkeyPrefix.None, System.Drawing.StringTrimming.None);
			this.TextTotals.Page = this.Page1;
			this.TextTotals.Parent = this.FooterBand1;
			this.FooterBand1.Components.AddRange(new Stimulsoft.Report.Components.StiComponent[] {
				this.TextTotals});
			
			}
		
			#region StiReport Designer generated code - do not modify
		#endregion StiReport Designer generated code - do not modify
		
			public void Get_Groups_new (out int [] IndexArray, out int[] ValueArray)
			{
			int GroupCount = 0;
			List&lt;int&gt; indexList = new List&lt;int&gt;();
			List&lt;int&gt; valueList = new List&lt;int&gt;();
			
			for (int k = 0; k &lt; ColumnPar.Rows.Count; k++)
			{
				if (ColumnPar.DataTable.Rows[k][3].ToString() != "0")
				{
					GroupCount++;
					//termsList.Add(1);
					indexList.Add(k);
					valueList.Add(int.Parse(ColumnPar.DataTable.Rows[k][3].ToString()));
					//	double.Parse(ColumnPar.DataTable.Rows[ColWidth][1].ToString(), new System.Globalization.CultureInfo("en-GB"));
				}
			}
			//	int[] terms = termsList.ToArray();
			IndexArray = indexList.ToArray();
			ValueArray = valueList.ToArray();
			ShakerSort2D(IndexArray, ValueArray);
			//	int [] IndexArray = {1,2,5};
			//	return IndexArray;
			}
		
			public static void ShakerSort2D(int[] array1, int [] array2)
			{
			for (int i = 0; i &lt; array1.Length / 2; i++)
			{
				bool swapped = false;
				for (int j = i; j &lt; array1.Length - i - 1; j++)
				{
					if (array1[j] &gt; array1[j + 1])
					{
						int tmp = array1[j];
						int tmp2 = array2[j];
						array1[j] = array1[j + 1];
						array2[j] = array2[j + 1];
						array1[j + 1] = tmp;
						array2[j + 1] = tmp2;
						swapped = true;
					}
				}
				for (int j = array1.Length - 2 - i; j &gt; i; j--)
				{
					if (array1[j] &lt; array1[j - 1])
					{
						int tmp = array1[j];
						int tmp2 = array2[j];
						array1[j] = array1[j - 1];
						array2[j] = array2[j - 1];
						array1[j - 1] = tmp;
						array2[j - 1] = tmp2;
						swapped = true;
					}
				}
				if (!swapped) break;
			}
			}
			}
}
</Script>
  <ScriptLanguage>CSharp</ScriptLanguage>
  <Styles isList="true" count="10">
    <Hlavicka_x0020___x0020_kategorie Ref="7" type="Stimulsoft.Report.StiStyle" isKey="true">
      <Brush>[161:203:227]</Brush>
      <Conditions isList="true" count="0" />
      <Font>Arial,7,Bold</Font>
      <Name>Hlavicka - kategorie</Name>
      <NegativeTextBrush>Red</NegativeTextBrush>
      <TextBrush>Black</TextBrush>
    </Hlavicka_x0020___x0020_kategorie>
    <Hlavicka_x0020___x0020_kategorie_x0020_CB Ref="8" type="Stimulsoft.Report.StiStyle" isKey="true">
      <Brush>EmptyBrush</Brush>
      <Conditions isList="true" count="0" />
      <Font>Arial,7,Bold</Font>
      <Name>Hlavicka - kategorie CB</Name>
      <NegativeTextBrush>Red</NegativeTextBrush>
      <TextBrush>Black</TextBrush>
    </Hlavicka_x0020___x0020_kategorie_x0020_CB>
    <Radek_x0020___x0020_bily Ref="9" type="Stimulsoft.Report.StiStyle" isKey="true">
      <Brush>White</Brush>
      <Conditions isList="true" count="0" />
      <Font>Arial,7</Font>
      <Name>Radek - bily</Name>
      <NegativeTextBrush>Red</NegativeTextBrush>
      <TextBrush>Black</TextBrush>
    </Radek_x0020___x0020_bily>
    <Radek_x0020___x0020_sedy Ref="10" type="Stimulsoft.Report.StiStyle" isKey="true">
      <Brush>[224:224:224]</Brush>
      <Conditions isList="true" count="0" />
      <Font>Arial,7</Font>
      <Name>Radek - sedy</Name>
      <NegativeTextBrush>Red</NegativeTextBrush>
      <TextBrush>Black</TextBrush>
    </Radek_x0020___x0020_sedy>
    <Mezisoucet Ref="11" type="Stimulsoft.Report.StiStyle" isKey="true">
      <Brush>[239:215:182]</Brush>
      <Conditions isList="true" count="0" />
      <Font>Arial,7</Font>
      <Name>Mezisoucet</Name>
      <NegativeTextBrush>Red</NegativeTextBrush>
      <TextBrush>Black</TextBrush>
    </Mezisoucet>
    <Soucet Ref="12" type="Stimulsoft.Report.StiStyle" isKey="true">
      <Brush>[255:190:90]</Brush>
      <Conditions isList="true" count="0" />
      <Font>Arial,7</Font>
      <Name>Soucet</Name>
      <NegativeTextBrush>Red</NegativeTextBrush>
      <TextBrush>Black</TextBrush>
    </Soucet>
    <Podklad Ref="13" type="Stimulsoft.Report.StiStyle" isKey="true">
      <Brush>[204:204:204]</Brush>
      <Conditions isList="true" count="0" />
      <Font>Arial,7</Font>
      <Name>Podklad</Name>
      <NegativeTextBrush>Red</NegativeTextBrush>
      <TextBrush>Black</TextBrush>
    </Podklad>
    <Sortovadlo Ref="14" type="Stimulsoft.Report.StiStyle" isKey="true">
      <Brush>[204:204:204]</Brush>
      <Conditions isList="true" count="0" />
      <Font>Arial,7,Bold</Font>
      <Name>Sortovadlo</Name>
      <NegativeTextBrush>Red</NegativeTextBrush>
      <TextBrush>Black</TextBrush>
    </Sortovadlo>
    <Parametry Ref="15" type="Stimulsoft.Report.StiStyle" isKey="true">
      <Border>All;Black;1;Solid;False;4;Black</Border>
      <Brush>EmptyBrush</Brush>
      <Conditions isList="true" count="0" />
      <Font>Arial,7</Font>
      <HorAlignment>Center</HorAlignment>
      <Name>Parametry</Name>
      <NegativeTextBrush>Red</NegativeTextBrush>
      <TextBrush>Black</TextBrush>
    </Parametry>
    <Parametry_x0020___x0020_nadpis Ref="16" type="Stimulsoft.Report.StiStyle" isKey="true">
      <Brush>EmptyBrush</Brush>
      <Conditions isList="true" count="0" />
      <Font>Arial,12,Bold</Font>
      <HorAlignment>Center</HorAlignment>
      <Name>Parametry - nadpis</Name>
      <NegativeTextBrush>Red</NegativeTextBrush>
      <TextBrush>Black</TextBrush>
    </Parametry_x0020___x0020_nadpis>
  </Styles>
</StiSerializer>