<?xml version="1.0" encoding="utf-8"?>
<Report ScriptLanguage="CSharp" ReportInfo.Created="07/29/2010 13:25:19" ReportInfo.Modified="03/12/2015 14:08:57" 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
  {
    double OneInch=2.53968250550928;

    private void GroupHeader1_AfterData(object sender, EventArgs e)
    {
      int u = Convert.ToInt32(txtUniversalCodif.Text);
      int s = Convert.ToInt32(txtSkillsCodif.Text);
      int k = Convert.ToInt32(txtKnowledgeCodif.Text);

      KnTopText.Text = &quot;Код &quot; + (k == 2 ? &quot;и наименование &quot; : &quot;&quot;) + &quot;контролируемого элемента содержания&quot; + (k == 1 ? &quot;*&quot; : &quot;&quot;);
      SkTopText.Text = &quot;Код &quot; + (s == 2 ? &quot;и наименование &quot; : &quot;&quot;) + &quot;контролируемого предметного умения&quot; + (s == 1 ? &quot;*&quot; : &quot;&quot;);
      UniTopText.Text = &quot;Код &quot; + (u == 2 ? &quot;и наименование &quot; : &quot;&quot;) + &quot;универсальных учебных действий&quot; + (u == 1 ? &quot;*&quot; : &quot;&quot;);

      if (k!=1 &amp;&amp; s!=1 &amp;&amp; u!=1)
      {
        UnderText.Visible=false;
      }

      double magic = Cell26.Width / 1.5 * OneInch;

      int LogCnt = ((k==2?1:0) + (s==2?1:0) + (u==2?1:0));
      int ShortCnt = ((k==1?1:0) + (s==1?1:0) + (u==1?1:0));

      double LongLen = (20 - 3.5*ShortCnt)/OneInch*magic / LogCnt; //Ширина узкой - 3.5см, длину широкой колонки вычисляем
      double ShortLen = 3.5 / OneInch * magic;

      KnCol.Visible = KnTop.Visible = (k != 0);
      if (k!=0)
      {
        KnTop.MaxWidth = KnCol.MaxWidth = (float)(k==1?ShortLen:LongLen);
        KnTop.Width = KnCol.Width = (float)(k==1?ShortLen:LongLen);
      }

      SkCol.Visible = SkTop.Visible = (s != 0);
      if (s!=0)
      {
        SkTop.MaxWidth = SkCol.MaxWidth = (float)(s==1?ShortLen:LongLen);
        SkTop.Width = SkCol.Width = (float)(s==1?ShortLen:LongLen);
      }

      UniCol.Visible = UniTop.Visible = (u != 0);
      if (u!=0)
      {
        UniTop.MaxWidth = UniCol.MaxWidth = (float)(u==1?ShortLen:LongLen);
        UniTop.Width = UniCol.Width = (float)(u==1?ShortLen:LongLen);
      }
    }
  }
}
</ScriptText>
  <Dictionary>
    <TableDataSource Name="Report02_ExamStructure" ReferenceName="reportsDataSet.Report02_ExamStructure" DataType="System.Int32" Enabled="true">
      <Column Name="Название" DataType="System.String"/>
      <Column Name="Предмет" DataType="System.String"/>
      <Column Name="Класс" DataType="System.Int32"/>
      <Column Name="Дата" DataType="System.String"/>
      <Column Name="tn" DataType="System.Int32"/>
      <Column Name="Задание" DataType="System.String"/>
      <Column Name="МаксБалл" DataType="System.Double"/>
      <Column Name="Уровень сложности" DataType="System.String"/>
      <Column Name="KnowledgeCodifShowType" DataType="System.Int32"/>
      <Column Name="SkillsCodifShowType" DataType="System.Int32"/>
      <Column Name="UniCodifShowType" DataType="System.Int32"/>
      <Column Name="Тип задания" DataType="System.String"/>
      <Column Name="КодификаторЗнаний" DataType="System.String"/>
      <Column Name="КодификаторУмений" DataType="System.String"/>
      <Column Name="КодификаторУУД" DataType="System.String"/>
      <Column Name="Разрешённые символы" DataType="System.String"/>
      <Column Name="Чувствительность к регистру" DataType="System.String"/>
    </TableDataSource>
    <Parameter Name="SubjectFilter" DataType="System.String"/>
    <Parameter Name="ExamFilter" DataType="System.String"/>
  </Dictionary>
  <ReportPage Name="Page1" Landscape="true" PaperWidth="297" PaperHeight="210" RawPaperSize="9" TitleBeforeHeader="false">
    <PageHeaderBand Name="PageHeader1" Width="1047.06" Height="94.5">
      <TextObject Name="Text11" Left="812.7" Width="236.25" Height="30.24" Text="Форма М-02&#13;&#10;Страница [Page#] из [TotalPages#]" HorzAlign="Right" Font="Arial, 8pt"/>
      <TextObject Name="Text9" Left="9.45" Width="1039.5" Height="28.35" Text="Структутра КИМ экзаменов" HorzAlign="Center" Font="Arial, 14.25pt, style=Bold"/>
      <TextObject Name="Text10" Left="9.45" Top="28.35" Width="1039.5" Height="18.9" Text="по состоянию на [FormatDateTime([Date],&quot;Short Date&quot;)] [FormatDateTime([Date],&quot;Short Time&quot;)]" HorzAlign="Center" Font="Arial, 12pt"/>
      <TextObject Name="Text13" Top="56.7" Width="179.55" Height="9.45" Text="Установки предварительной фильтрации" Font="Arial, 6pt, style=Bold" TextFill.Color="DimGray"/>
      <TextObject Name="Text14" Top="66.15" Width="47.25" Height="9.45" Text="Предмет:" Font="Arial, 6pt" TextFill.Color="DimGray"/>
      <TextObject Name="Text15" Left="47.25" Top="66.15" Width="198.45" Height="9.45" Border.Lines="Bottom" Border.Color="DimGray" Text="[SubjectFilter]" AutoWidth="true" Font="Arial, 6pt" TextFill.Color="DimGray"/>
      <TextObject Name="Text16" Top="75.6" Width="47.25" Height="9.45" Text="Экзамен:" Font="Arial, 6pt" TextFill.Color="DimGray"/>
      <TextObject Name="Text17" Left="47.25" Top="75.6" Width="198.45" Height="9.45" Border.Lines="Bottom" Border.Color="DimGray" Text="[ExamFilter]" AutoWidth="true" Font="Arial, 6pt" TextFill.Color="DimGray"/>
    </PageHeaderBand>
    <GroupHeaderBand Name="GroupHeader1" Top="97.7" Width="1047.06" Height="28.35" CanGrow="true" AfterDataEvent="GroupHeader1_AfterData" StartNewPage="true" Condition="[Report02_ExamStructure.Название]">
      <TextObject Name="Text1" Left="75.6" Width="236.25" Height="18.9" CanGrow="true" CanBreak="false" Text="[Report02_ExamStructure.Название]" AutoWidth="true" Underlines="true"/>
      <TextObject Name="Text8" Width="75.6" Height="18.9" Text="Экзамен:"/>
      <TextObject Name="Text3" Left="349.65" Width="75.6" Height="18.9" Text="Предмет:"/>
      <TextObject Name="Text2" Left="425.25" Width="217.35" Height="18.9" Text="[Report02_ExamStructure.Предмет]" Underlines="true"/>
      <TextObject Name="Text4" Left="756" Width="66.15" Height="18.9" Text="[Report02_ExamStructure.Класс]" Underlines="true"/>
      <TextObject Name="Text5" Left="680.4" Width="75.6" Height="18.9" Text="Год обуч.:"/>
      <TextObject Name="Text6" Left="907.2" Width="85.05" Height="18.9" Text="[Report02_ExamStructure.Дата]" Underlines="true"/>
      <TextObject Name="Text7" Left="859.95" Width="47.25" Height="18.9" Text="Дата:"/>
      <TextObject Name="txtKnowledgeCodif" Left="822.15" Width="28.35" Height="18.9" Visible="false" Text="[Report02_ExamStructure.KnowledgeCodifShowType]"/>
      <TextObject Name="txtSkillsCodif" Left="841.05" Width="28.35" Height="18.9" Visible="false" Text="[Report02_ExamStructure.SkillsCodifShowType]"/>
      <TextObject Name="txtUniversalCodif" Left="859.95" Width="37.8" Height="18.9" Visible="false" Text="[Report02_ExamStructure.UniCodifShowType]"/>
      <DataBand Name="Data1" Top="160.8" Width="1047.06" Height="18.9" CanGrow="true" CanShrink="true" DataSource="Report02_ExamStructure">
        <TableObject Name="Table1" Width="708.75" Height="18.9">
          <TableColumn Name="Column6" Width="56.7"/>
          <TableColumn Name="Column7" Width="47.25"/>
          <TableColumn Name="Column8" Width="37.8"/>
          <TableColumn Name="Column20"/>
          <TableColumn Name="Column17" Width="103.95"/>
          <TableColumn Name="KnCol" MaxWidth="756" Width="132.3"/>
          <TableColumn Name="SkCol" MaxWidth="756" Width="132.3"/>
          <TableColumn Name="UniCol" MaxWidth="756" Width="132.3"/>
          <TableRow Name="Row1" AutoSize="true">
            <TableCell Name="Cell26" Border.Lines="All" Text="[Report02_ExamStructure.Задание]" HorzAlign="Center" Font="Arial, 8pt"/>
            <TableCell Name="Cell27" Border.Lines="All" Text="[Report02_ExamStructure.МаксБалл]" HorzAlign="Center" Font="Arial, 8pt"/>
            <TableCell Name="Cell28" Border.Lines="All" Text="[Report02_ExamStructure.Уровень сложности]" HorzAlign="Center" Font="Arial, 8pt"/>
            <TableCell Name="Cell40" Border.Lines="All" Text="[Report02_ExamStructure.Тип задания]" Font="Arial, 8pt"/>
            <TableCell Name="Cell37" Border.Lines="All" Text="[Report02_ExamStructure.Разрешённые символы]" Font="Arial, 8pt"/>
            <TableCell Name="Cell44" Border.Lines="All" Text="[Replace([Report02_ExamStructure.КодификаторЗнаний], &quot;#&quot;, &quot;\n&quot;)]" Font="Arial, 8pt"/>
            <TableCell Name="Cell43" Border.Lines="All" Text="[Replace([Report02_ExamStructure.КодификаторУмений], &quot;#&quot;, &quot;\n&quot;)]" Font="Arial, 8pt"/>
            <TableCell Name="Cell38" Border.Lines="All" Text="[Replace([Report02_ExamStructure.КодификаторУУД], &quot;#&quot;, &quot;\n&quot;)]" Font="Arial, 8pt"/>
          </TableRow>
        </TableObject>
        <DataHeaderBand Name="DataHeader1" Top="129.25" Width="1047.06" Height="28.35" RepeatOnEveryPage="true">
          <TableObject Name="Table2" Width="708.75" Height="28.35">
            <TableColumn Name="Column11" Width="56.7"/>
            <TableColumn Name="Column12" Width="47.25"/>
            <TableColumn Name="Column13" Width="37.8"/>
            <TableColumn Name="Column19"/>
            <TableColumn Name="Column15" Width="103.95"/>
            <TableColumn Name="KnTop" Width="132.3"/>
            <TableColumn Name="SkTop" Width="132.3"/>
            <TableColumn Name="UniTop" Width="132.3"/>
            <TableRow Name="Row2" Height="28.35">
              <TableCell Name="Cell31" Border.Lines="All" Text="Задание" HorzAlign="Center" Font="Arial, 8pt, style=Bold"/>
              <TableCell Name="Cell32" Border.Lines="All" Text="Макс. &#13;&#10;балл" HorzAlign="Center" Font="Arial, 8pt, style=Bold"/>
              <TableCell Name="Cell33" Border.Lines="All" Text="Ур.&#13;&#10;сл-ти" HorzAlign="Center" Font="Arial, 8pt, style=Bold"/>
              <TableCell Name="Cell39" Border.Lines="All" Text="Тип&#13;&#10;задания" HorzAlign="Center" Font="Arial, 8pt, style=Bold"/>
              <TableCell Name="Cell35" Border.Lines="All" Text="Разрешенные&#13;&#10;символы" HorzAlign="Center" Font="Arial, 8pt, style=Bold"/>
              <TableCell Name="KnTopText" Border.Lines="All" Text="контролируемого элемента содержания" Font="Arial, 8pt, style=Bold"/>
              <TableCell Name="SkTopText" Border.Lines="All" Text="контролируемого предметного умения" Font="Arial, 8pt, style=Bold"/>
              <TableCell Name="UniTopText" Border.Lines="All" Text="универсальных учебных действий" HorzAlign="Center" Font="Arial, 8pt, style=Bold"/>
            </TableRow>
          </TableObject>
        </DataHeaderBand>
        <Sort>
          <Sort Expression="[Report02_ExamStructure.tn]"/>
        </Sort>
      </DataBand>
      <GroupFooterBand Name="GroupFooter1" Top="182.9" Width="1047.06" Height="18.9" CanShrink="true"/>
    </GroupHeaderBand>
    <PageFooterBand Name="PageFooter1" Top="205" Width="1047.06" Height="13.23">
      <TextObject Name="Text12" Left="756" Width="292.95" Height="13.23" Text="Отчёт сформирован: [Date]" HorzAlign="Right" Font="Arial, 8pt"/>
      <TextObject Name="UnderText" Width="425.25" Height="12.47" Text="* Расшифровки кодов указаны в спецификации" Font="Arial, 8pt"/>
    </PageFooterBand>
  </ReportPage>
</Report>
