<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ConvertNulls="false" StartReportEvent="_StartReport" ReportInfo.Created="07/29/2010 13:25:19" ReportInfo.Modified="04/11/2015 15:40:45" ReportInfo.CreatorVersion="2014.2.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
  {
/*
    private void GroupHeader2_AfterData(object sender, EventArgs e)
    {
      if (txtExamType.Text == &quot;1&quot;)
      {
        Text42.Text=&quot;Отм.&quot;;
        txtComment.Visible=false;
        Text124.Visible=Text43.Visible=Text44.Visible=
          Text45.Visible=Text46.Visible=Text47.Visible=
          Text48.Visible=Text49.Visible=Text50.Visible=
          Text51.Visible=Text52.Visible=Text53.Visible=
          Text54.Visible=true;
      }
      else
      {
        Text42.Text=&quot;Ур.*&quot;;
        txtComment.Visible=true;
        Text124.Visible=Text43.Visible=Text44.Visible=
          Text45.Visible=Text46.Visible=Text47.Visible=
          Text48.Visible=Text49.Visible=Text50.Visible=
          Text51.Visible=Text52.Visible=Text53.Visible=
          Text54.Visible=false;
      }
    }
*/

    private void Matrix1_ModifyResult(object sender, EventArgs e)
    {
      TableResult table = Matrix1.ResultTable;
      for (int j = 3; j &lt; table.ColumnCount; j++)
      {
        int maxrate = Convert.ToInt32(table[j, 1].Text.Substring(table[j, 1].Text.IndexOf(&quot;[&quot;)+1, table[j, 1].Text.IndexOf(&quot;]&quot;)-table[j, 1].Text.IndexOf(&quot;[&quot;)-1));
        /*
        int sum = 0;
        for (int i = 2; i &lt; table.RowCount; i++)
        {
          sum += Convert.ToInt32(table[j, i].Text);
          //table[j,i].Text += &quot;a&quot;+sum.ToString();
        }
        */
        table[j, table.RowCount-1].Text = ( Convert.ToInt32(table[j, table.RowCount-1].Text) * 100.0 / (table.RowCount-3) / maxrate).ToString(&quot;0&quot;);
      }
    }
  }
}
</ScriptText>
  <Dictionary>
    <TableDataSource Name="Report05_TableResults" ReferenceName="reportsDataSet.Report05_TableResults" DataType="System.Int32" Enabled="true">
      <Column Name="КодМуниципалитета" DataType="System.String"/>
      <Column Name="Муниципалитет" DataType="System.String"/>
      <Column Name="КодОУ" DataType="System.String"/>
      <Column Name="ОУ" DataType="System.String"/>
      <Column Name="ГодОбуч" DataType="System.Int32"/>
      <Column Name="Класс" DataType="System.String"/>
      <Column Name="ФИО" DataType="System.String"/>
      <Column Name="Экзамен" DataType="System.String"/>
      <Column Name="ExamType" DataType="System.Int32"/>
      <Column Name="Предмет" DataType="System.String"/>
      <Column Name="Дата" DataType="System.DateTime"/>
      <Column Name="Вариант" DataType="System.String"/>
      <Column Name="Часть" DataType="System.Int32"/>
      <Column Name="Задание" DataType="System.String"/>
      <Column Name="Балл" DataType="System.Double"/>
      <Column Name="Отметка" DataType="System.String"/>
      <Column Name="ПроцентОбщий" DataType="System.Double"/>
      <Column Name="БазовыйПроцент" DataType="System.Double"/>
      <Column Name="ПовышенныйПроцент" DataType="System.Double"/>
      <Column Name="ВысокийПроцент" DataType="System.Double"/>
    </TableDataSource>
    <TableDataSource Name="Report09a_RegionStat" ReferenceName="reportsDataSet.Report09a_RegionStat" DataType="System.Int32" Enabled="true">
      <Column Name="ГодОбуч" DataType="System.Int32"/>
      <Column Name="Экзамен" DataType="System.String"/>
      <Column Name="Предмет" DataType="System.String"/>
      <Column Name="Дата" DataType="System.String"/>
      <Column Name="Участников" DataType="System.Int32"/>
      <Column Name="СрЧ1" DataType="System.Double"/>
      <Column Name="СрЧ2" DataType="System.Double"/>
      <Column Name="СрБалл" DataType="System.Double"/>
      <Column Name="РешЧ1" DataType="System.Double"/>
      <Column Name="РешЧ2" DataType="System.Double"/>
      <Column Name="РешОбщ" DataType="System.Double"/>
      <Column Name="БазПроц" DataType="System.Double"/>
      <Column Name="ПовПроц" DataType="System.Double"/>
      <Column Name="ВысПроц" DataType="System.Double"/>
      <Column Name="Колво2" DataType="System.Int32"/>
      <Column Name="Колво3" DataType="System.Int32"/>
      <Column Name="Колво4" DataType="System.Int32"/>
      <Column Name="Колво5" DataType="System.Int32"/>
      <Column Name="Абс" DataType="System.Int32"/>
      <Column Name="АбсПроц" DataType="System.Decimal"/>
      <Column Name="Кач" DataType="System.Int32"/>
      <Column Name="КачПроц" DataType="System.Decimal"/>
    </TableDataSource>
    <TableDataSource Name="Report09_AreasStat" ReferenceName="reportsDataSet.Report09_AreasStat" DataType="System.Int32" Enabled="true">
      <Column Name="Муниципалитет" DataType="System.String"/>
      <Column Name="ГодОбуч" DataType="System.Int32"/>
      <Column Name="Экзамен" DataType="System.String"/>
      <Column Name="Предмет" DataType="System.String"/>
      <Column Name="Дата" DataType="System.String"/>
      <Column Name="Участников" DataType="System.Int32"/>
      <Column Name="СрЧ1" DataType="System.Double"/>
      <Column Name="СрЧ2" DataType="System.Double"/>
      <Column Name="СрБалл" DataType="System.Double"/>
      <Column Name="РешЧ1" DataType="System.Double"/>
      <Column Name="РешЧ2" DataType="System.Double"/>
      <Column Name="РешОбщ" DataType="System.Double"/>
      <Column Name="БазПроц" DataType="System.Double"/>
      <Column Name="ПовПроц" DataType="System.Double"/>
      <Column Name="ВысПроц" DataType="System.Double"/>
      <Column Name="Колво2" DataType="System.Int32"/>
      <Column Name="Колво3" DataType="System.Int32"/>
      <Column Name="Колво4" DataType="System.Int32"/>
      <Column Name="Колво5" DataType="System.Int32"/>
      <Column Name="Абс" DataType="System.Int32"/>
      <Column Name="АбсПроц" DataType="System.Decimal"/>
      <Column Name="Кач" DataType="System.Int32"/>
      <Column Name="КачПроц" DataType="System.Decimal"/>
    </TableDataSource>
    <Relation Name="Report09a_RegionStat_Report05_TableResults" ParentDataSource="Report09a_RegionStat" ChildDataSource="Report05_TableResults" ParentColumns="ГодОбуч&#13;&#10;Экзамен" ChildColumns="ГодОбуч&#13;&#10;Экзамен" Enabled="true"/>
    <Relation Name="Report09_AreasStat_Report05_TableResults" ParentDataSource="Report09_AreasStat" ChildDataSource="Report05_TableResults" ParentColumns="Муниципалитет&#13;&#10;Экзамен&#13;&#10;ГодОбуч" ChildColumns="Муниципалитет&#13;&#10;Экзамен&#13;&#10;ГодОбуч" Enabled="true"/>
    <Parameter Name="SortOrder" DataType="System.Int32"/>
  </Dictionary>
  <ReportPage Name="Page1" Landscape="true" PaperWidth="297" PaperHeight="210" RawPaperSize="9" TopMargin="7" BottomMargin="7" TitleBeforeHeader="false">
    <PageHeaderBand Name="PageHeader1" Width="1047.06" Height="42.8">
      <TextObject Name="Text11" Left="765.45" Width="283.5" Height="30.24" Text="Форма М-05r&#13;&#10;Страница [Page#] из [TotalPages#]" HorzAlign="Right" Font="Arial, 8pt"/>
      <TextObject Name="Text9" Width="1048.95" Height="28.35" Text="Расшифровка результатов по классу (краткая форма с решаемостью)" HorzAlign="Center" Font="Arial, 14.25pt, style=Bold"/>
      <TextObject Name="Text10" Top="23.9" Width="1048.95" Height="18.9" Text="по состоянию на [FormatDateTime([Date],&quot;Short Date&quot;)] [FormatDateTime([Date],&quot;Short Time&quot;)]" HorzAlign="Center"/>
    </PageHeaderBand>
    <GroupHeaderBand Name="GroupHeader1" Top="46" Width="1047.06" Height="28.35" CanGrow="true" CanShrink="true" StartNewPage="true" Condition="[SortOrder]==1 ? [Report05_TableResults.КодМуниципалитета] : [Report05_TableResults.Муниципалитет]">
      <GroupHeaderBand Name="GroupHeader4" Top="77.55" Width="1047.06" Height="37.8" CanGrow="true" CanShrink="true" StartNewPage="true" Condition="[SortOrder]==1 ? [Report05_TableResults.КодОУ] : [Report05_TableResults.ОУ]">
        <GroupHeaderBand Name="GroupHeader3" Top="118.55" Width="1047.06" Height="37.8" CanGrow="true" CanShrink="true" StartNewPage="true" Condition="[Report05_TableResults.ГодОбуч]">
          <GroupHeaderBand Name="GroupHeader5" Top="159.55" Width="1047.06" Height="37.8" CanShrink="true" StartNewPage="true" Condition="[Report05_TableResults.Класс]">
            <GroupHeaderBand Name="GroupHeader2" Top="200.55" Width="1047.06" Height="56.7" CanGrow="true" AfterDataEvent="GroupHeader2_AfterData" StartNewPage="true" KeepWithData="true" Condition="[Report05_TableResults.Экзамен]" ResetPageNumber="true">
              <TextObject Name="Text3" Left="548.1" Top="37.8" Width="56.7" Height="18.9" Text="Предмет:" Font="Arial, 8pt"/>
              <TextObject Name="Text2" Left="604.8" Top="37.8" Width="283.5" Height="18.9" Text="[Report05_TableResults.Предмет]" Underlines="true" Font="Arial, 8pt"/>
              <TextObject Name="Text6" Left="963.9" Top="37.8" Width="85.05" Height="18.9" Text="[Report05_TableResults.Дата]" Underlines="true" Font="Arial, 8pt"/>
              <TextObject Name="Text7" Left="916.65" Top="37.8" Width="47.25" Height="18.9" Text="Дата:" Font="Arial, 8pt"/>
              <TextObject Name="Text1" Left="217.35" Top="37.8" Width="302.4" Height="18.9" CanGrow="true" CanBreak="false" Text="[Report05_TableResults.Экзамен]" AutoWidth="true" Underlines="true" Font="Arial, 8pt"/>
              <TextObject Name="Text8" Left="160.65" Top="37.8" Width="56.7" Height="18.9" Text="Экзамен:" Font="Arial, 8pt"/>
              <TextObject Name="Text4" Left="47.25" Top="37.8" Width="66.15" Height="18.9" Text="[Report05_TableResults.Класс]" Underlines="true" Font="Arial, 8pt"/>
              <TextObject Name="Text5" Top="37.8" Width="56.7" Height="18.9" Text="Класс:" Font="Arial, 8pt"/>
              <TextObject Name="Text28" Width="94.5" Height="18.9" Text="Муниципалитет:" Font="Arial, 8pt"/>
              <TextObject Name="Text21" Left="94.5" Width="954.45" Height="18.9" CanGrow="true" Text="([IsNull(&quot;Report05_TableResults.КодМуниципалитета&quot;)==true?&quot;б/н&quot;:[Report05_TableResults.КодМуниципалитета]]) [Report05_TableResults.Муниципалитет]" AutoWidth="true" Underlines="true" Font="Arial, 8pt" Wysiwyg="true"/>
              <TextObject Name="Text23" Top="18.9" Width="28.35" Height="18.9" Text="ОО:" Font="Arial, 8pt"/>
              <TextObject Name="Text29" Left="28.35" Top="18.9" Width="1020.6" Height="18.9" CanGrow="true" Text="([IsNull(&quot;Report05_TableResults.КодОУ&quot;)==true?&quot;б/н&quot;:[Report05_TableResults.КодОУ]]) [Report05_TableResults.ОУ]" Underlines="true" Font="Arial, 8pt" Trimming="Word"/>
              <TextObject Name="txtExamType" Left="897.75" Top="37.8" Width="9.45" Height="18.9" Visible="false" Text="[Report05_TableResults.ExamType]"/>
              <DataBand Name="Data1" Top="260.45" Width="1047.06" Height="43.47" CanGrow="true" CanShrink="true" AfterDataEvent="Data1_AfterData" DataSource="Report05_TableResults">
                <Sort>
                  <Sort Expression="[Report05_TableResults.ФИО]"/>
                </Sort>
              </DataBand>
              <GroupFooterBand Name="GroupFooter2" Top="307.12" Width="1047.06" Height="97.07" CanGrow="true" CanShrink="true" CanBreak="true">
                <MatrixObject Name="Matrix1" Top="9.45" Width="673.34" Height="64.75" FixedRows="2" FixedColumns="3" CellsSideBySide="true" DataSource="Report05_TableResults" ModifyResultEvent="Matrix1_ModifyResult">
                  <MatrixColumns>
                    <Header Expression="[Report05_TableResults.Часть]" Totals="false"/>
                    <Header Expression="Replace([Report05_TableResults.Задание], &quot;#&quot;, &quot;\n&quot;)" Totals="false"/>
                  </MatrixColumns>
                  <MatrixRows>
                    <Header Expression="[Report05_TableResults.ФИО]" SuppressTotals="true"/>
                    <Header Expression="[Report05_TableResults.Вариант]" Totals="false"/>
                    <Header Expression="FormatNumber([Report05_TableResults.ПроцентОбщий],2)" Totals="false"/>
                  </MatrixRows>
                  <MatrixCells>
                    <Cell Expression="[Report05_TableResults.Балл]"/>
                  </MatrixCells>
                  <TableColumn Name="Column3" Width="39.46" AutoSize="true"/>
                  <TableColumn Name="Column4" Width="57.55" AutoSize="true"/>
                  <TableColumn Name="Column5" Width="309.33" AutoSize="true"/>
                  <TableColumn Name="Column6" Width="267" AutoSize="true"/>
                  <TableRow Name="Row3" Height="16.25" AutoSize="true">
                    <TableCell Name="Cell5" Border.Lines="All" Text="ФИО" HorzAlign="Center" VertAlign="Center" Font="Arial, 8pt, style=Bold" RowSpan="2"/>
                    <TableCell Name="Cell6" Border.Lines="All" Text="Вар" HorzAlign="Center" VertAlign="Center" Font="Arial, 8pt, style=Bold" RowSpan="2"/>
                    <TableCell Name="Cell9" Border.Lines="All" Text="%max" HorzAlign="Center" VertAlign="Center" Font="Arial, 8pt, style=Bold" RowSpan="2"/>
                    <TableCell Name="Cell23" Border.Lines="All" Text="[Часть]" HorzAlign="Center" VertAlign="Center" Font="Arial, 8pt"/>
                  </TableRow>
                  <TableRow Name="Row4" Height="16" AutoSize="true">
                    <TableCell Name="Cell7"/>
                    <TableCell Name="Cell8"/>
                    <TableCell Name="Cell10"/>
                    <TableCell Name="Cell24" Border.Lines="All" Text="[Replace([Report05_TableResults.Задание], &quot;#&quot;, &quot;\n&quot;)]" HorzAlign="Center" VertAlign="Center" Font="Arial, 8pt" HtmlTags="true"/>
                  </TableRow>
                  <TableRow Name="Row5" Height="16.25" AutoSize="true">
                    <TableCell Name="Cell17" Border.Lines="All" Text="[ФИО]" VertAlign="Center" Font="Arial, 8pt"/>
                    <TableCell Name="Cell18" Border.Lines="All" Text="[Вариант]" HorzAlign="Center" VertAlign="Center" Font="Arial, 8pt"/>
                    <TableCell Name="Cell19" Border.Lines="All" Text="[FormatNumber([Report05_TableResults.ПроцентОбщий],2)]" HorzAlign="Center" VertAlign="Center" Font="Arial, 8pt"/>
                    <TableCell Name="Cell25" Border.Lines="All" Text="[Балл]" HorzAlign="Right" VertAlign="Center" Font="Arial, 8pt"/>
                  </TableRow>
                  <TableRow Name="Row6" Height="16.25" AutoSize="true">
                    <TableCell Name="Cell20" Border.Lines="All" Text="Решаемость, %" HorzAlign="Right" VertAlign="Center" Font="Arial, 8pt, style=Bold" ColSpan="3"/>
                    <TableCell Name="Cell21"/>
                    <TableCell Name="Cell22"/>
                    <TableCell Name="Cell26" Border.Lines="All" HorzAlign="Right" VertAlign="Center" Font="Arial, 8pt, style=Bold"/>
                  </TableRow>
                </MatrixObject>
              </GroupFooterBand>
            </GroupHeaderBand>
            <GroupFooterBand Name="GroupFooter5" Top="407.39" Width="1047.06" Height="37.8" CanShrink="true"/>
          </GroupHeaderBand>
          <GroupFooterBand Name="GroupFooter3" Top="448.39" Width="1047.06" Height="37.8" CanShrink="true"/>
        </GroupHeaderBand>
        <GroupFooterBand Name="GroupFooter4" Top="489.39" Width="1047.06" Height="37.8" CanShrink="true"/>
      </GroupHeaderBand>
      <GroupFooterBand Name="GroupFooter1" Top="530.39" Width="1047.06" Height="28.35" CanShrink="true"/>
    </GroupHeaderBand>
    <PageFooterBand Name="PageFooter1" Top="561.94" Width="1047.06" Height="12.47">
      <TextObject Name="Text12" Left="756" Width="292.95" Height="12.47" Text="Отчёт сформирован: [Date]" HorzAlign="Right" Font="Arial, 8pt"/>
    </PageFooterBand>
  </ReportPage>
</Report>
