<?xml version="1.0"?>
<Reports>
  <FormatVersion>1.0 1.0.0.0</FormatVersion>
  <Report ref="1">
    <Name>Dynamic Page Header</Name>
    <DataSourceName>Main</DataSourceName>
    <Layout>
      <Width>10800</Width>
      <Margin>720</Margin>
      <MarginTop>720</MarginTop>
      <MarginRight>720</MarginRight>
      <MarginBottom>720</MarginBottom>
      <Orientation>Portrait</Orientation>
      <PaperSize>Letter</PaperSize>
      <PageHeader>NotWithReportHdr</PageHeader>
    </Layout>
    <Font>
      <Name>Verdana</Name>
    </Font>
    <DataSources>
      <DataSource>
        <Name>Main</Name>
        <DataProvider>OLEDB</DataProvider>
        <ConnectionString>Provider=SQLNCLI11;Integrated Security=SSPI;Data Source=(localdb)\v11.0;Initial File Name=|DataDirectory|\wwwroot\App_Data\C1NWind.mdf;Persist Security Info=False</ConnectionString>
        <RecordSourceType>Text</RecordSourceType>
        <RecordSource>SELECT Categories.CategoryName, Products.*
FROM Categories INNER JOIN Products ON Categories.CategoryID = Products.CategoryID;
</RecordSource>
      </DataSource>
    </DataSources>
    <Groups>
      <Group>
        <Name>CategoryName</Name>
        <GroupBy>CategoryName</GroupBy>
        <Sort>Ascending</Sort>
        <KeepTogether>KeepFirstDetail</KeepTogether>
        <OutlineLabel>
          <Expression>CategoryName</Expression>
        </OutlineLabel>
      </Group>
    </Groups>
    <Sections>
      <Section>
        <Name>Detail</Name>
        <SubSections>
          <SubSection>
            <Border>
              <Bottom>
                <Style>Solid</Style>
                <Width>15</Width>
                <Color>FFE4E4E4</Color>
              </Bottom>
            </Border>
            <Height>440</Height>
          </SubSection>
        </SubSections>
        <Type>Detail</Type>
      </Section>
      <Section>
        <Name>Header</Name>
        <SubSections>
          <SubSection>
            <Height>3529</Height>
          </SubSection>
        </SubSections>
        <Type>Header</Type>
      </Section>
      <Section>
        <Name>Footer</Name>
        <SubSections>
          <SubSection>
            <Name>SubSection1</Name>
          </SubSection>
        </SubSections>
        <Type>Footer</Type>
        <Visible>false</Visible>
      </Section>
      <Section>
        <Name>PageHeader</Name>
        <SubSections>
          <SubSection>
            <Height>960</Height>
          </SubSection>
          <SubSection>
            <Height>960</Height>
          </SubSection>
        </SubSections>
        <Type>PageHeader</Type>
        <AutoHeight>GrowAndShrink</AutoHeight>
        <OnFormat>odd = (page mod 2 &lt;&gt; 0)
'h1odd.Visible = odd
'h2odd.Visible = odd
'h1even.Visible = not odd
'h2even.Visible = not odd
PageHeader.SubSections(0).Visible = odd
PageHeader.SubSections(1).Visible = not odd
</OnFormat>
      </Section>
      <Section>
        <Name>PageFooter</Name>
        <SubSections>
          <SubSection>
            <Name>SubSection1</Name>
            <Height>180</Height>
          </SubSection>
          <SubSection>
            <Border>
              <Top>
                <Style>Solid</Style>
                <Width>15</Width>
                <Color>FFD9D9D9</Color>
              </Top>
            </Border>
            <Height>300</Height>
          </SubSection>
        </SubSections>
        <Type>PageFooter</Type>
      </Section>
      <Section>
        <Name>GroupHeader0</Name>
        <SubSections>
          <SubSection>
            <Height>300</Height>
          </SubSection>
          <SubSection>
            <Background type="Solid">
              <Color>FFF1F1F1</Color>
            </Background>
            <Height>542</Height>
          </SubSection>
          <SubSection>
            <Background type="Solid">
              <Color>FFF8F8F8</Color>
            </Background>
            <Height>654</Height>
          </SubSection>
        </SubSections>
        <Type>GroupHeader1</Type>
        <Repeat>true</Repeat>
      </Section>
      <Section>
        <Name>GroupFooter0</Name>
        <SubSections>
          <SubSection>
            <Name>SubSection1</Name>
          </SubSection>
        </SubSections>
        <Type>GroupFooter1</Type>
        <Visible>false</Visible>
      </Section>
    </Sections>
    <Fields>
      <ParagraphField>
        <Name>Field9</Name>
        <Section>Header</Section>
        <Left>0</Left>
        <Top>1982</Top>
        <Width>10800</Width>
        <Height>1427</Height>
        <MarginLeft>500</MarginLeft>
        <MarginRight>500</MarginRight>
        <AutoHeight>GrowAndShrink</AutoHeight>
        <Align>LeftTop</Align>
        <Font>
          <Name>Segoe UI Light</Name>
          <Size>10.5</Size>
        </Font>
        <Content>
          <ParagraphText>
            <Text>
              <Value sys="string">This report changes the page header section based on the current page number. The page header contains two </Value>
            </Text>
          </ParagraphText>
          <ParagraphText>
            <Font>
              <Name>Segoe UI Light</Name>
              <Size>10.5</Size>
              <Bold>true</Bold>
            </Font>
            <Text>
              <Value sys="string">sub-sections</Value>
            </Text>
          </ParagraphText>
          <ParagraphText>
            <Text>
              <Value sys="string">, one is used on odd pages and the other on even. The visibility of the </Value>
            </Text>
          </ParagraphText>
          <ParagraphText>
            <Font>
              <Name>Segoe UI Light</Name>
              <Size>10.5</Size>
              <Bold>true</Bold>
            </Font>
            <Text>
              <Value sys="string">sub-sections</Value>
            </Text>
          </ParagraphText>
          <ParagraphText>
            <Text>
              <Value sys="string"> is toggled by a script attached to the page header's </Value>
            </Text>
          </ParagraphText>
          <ParagraphText>
            <Font>
              <Name>Segoe UI Light</Name>
              <Size>10.5</Size>
              <Bold>true</Bold>
            </Font>
            <Text>
              <Value sys="string">OnFormat</Value>
            </Text>
          </ParagraphText>
          <ParagraphText>
            <Text>
              <Value sys="string"> event according to the current page number.
The report also suppresses the page header on the first page by setting the </Value>
            </Text>
          </ParagraphText>
          <ParagraphText>
            <Font>
              <Name>Segoe UI Light</Name>
              <Size>10.5</Size>
              <Bold>true</Bold>
            </Font>
            <Text>
              <Value sys="string">Layout.PageHeader</Value>
            </Text>
          </ParagraphText>
          <ParagraphText>
            <Text>
              <Value sys="string"> property to </Value>
            </Text>
          </ParagraphText>
          <ParagraphText>
            <Font>
              <Name>Segoe UI Light</Name>
              <Size>10.5</Size>
              <Bold>true</Bold>
            </Font>
            <Text>
              <Value sys="string">NotWithReportHdr</Value>
            </Text>
          </ParagraphText>
          <ParagraphText>
            <Text>
              <Value sys="string">.</Value>
            </Text>
          </ParagraphText>
        </Content>
      </ParagraphField>
      <TextField>
        <Name>Field1</Name>
        <Section>Header</Section>
        <Left>0</Left>
        <Top>1380</Top>
        <Width>5132</Width>
        <Height>435</Height>
        <MarginLeft>500</MarginLeft>
        <MarginRight>500</MarginRight>
        <Align>LeftMiddle</Align>
        <ForeColor>FF551E5F</ForeColor>
        <Font>
          <Name>Segoe UI Light</Name>
          <Size>12</Size>
        </Font>
        <Text>
          <Expression>Now()</Expression>
        </Text>
        <Format>Long Date</Format>
      </TextField>
      <TextField>
        <Name>Field2</Name>
        <Background type="Solid">
          <Color>FFF1F1F1</Color>
        </Background>
        <Section>Header</Section>
        <Left>0</Left>
        <Top>0</Top>
        <Width>6570</Width>
        <Height>1110</Height>
        <MarginLeft>500</MarginLeft>
        <MarginRight>500</MarginRight>
        <Align>LeftMiddle</Align>
        <ForeColor>FF551E5F</ForeColor>
        <Font>
          <Name>Segoe UI Light</Name>
          <Size>23</Size>
        </Font>
        <Text>
          <Value sys="string">Dynamic Page Header</Value>
        </Text>
      </TextField>
      <ImageField>
        <Name>Field5</Name>
        <Background type="Solid">
          <Color>FFF1F1F1</Color>
        </Background>
        <Section>Header</Section>
        <Left>6570</Left>
        <Top>0</Top>
        <Width>4230</Width>
        <Height>1110</Height>
        <PictureAlign>RightTop</PictureAlign>
        <PictureScale>Scale</PictureScale>
        <Picture>
          <Image> </Image>
        </Picture>
      </ImageField>
      <TextField>
        <Name>Field10</Name>
        <Section>GroupHeader1</Section>
        <SubSectionIndex>1</SubSectionIndex>
        <Left>180</Left>
        <Top>0</Top>
        <Width>7047</Width>
        <Height>542</Height>
        <Align>LeftMiddle</Align>
        <ForeColor>FF551E5F</ForeColor>
        <WordWrap>false</WordWrap>
        <Font>
          <Name>Segoe UI Light</Name>
          <Size>14.5</Size>
        </Font>
        <Text>
          <Expression>CategoryName</Expression>
        </Text>
      </TextField>
      <TextField>
        <Name>Field12</Name>
        <Section>GroupHeader1</Section>
        <SubSectionIndex>2</SubSectionIndex>
        <Left>180</Left>
        <Top>0</Top>
        <Width>4245</Width>
        <Height>654</Height>
        <Align>LeftMiddle</Align>
        <ForeColor>FF551E5F</ForeColor>
        <Font>
          <Name>Segoe UI Light</Name>
          <Size>12</Size>
        </Font>
        <Text>
          <Value sys="string">Product Name</Value>
        </Text>
      </TextField>
      <TextField>
        <Name>Field13</Name>
        <Section>GroupHeader1</Section>
        <SubSectionIndex>2</SubSectionIndex>
        <Left>4425</Left>
        <Top>0</Top>
        <Width>2100</Width>
        <Height>654</Height>
        <Align>RightMiddle</Align>
        <ForeColor>FF551E5F</ForeColor>
        <Font>
          <Name>Segoe UI Light</Name>
          <Size>12</Size>
        </Font>
        <Text>
          <Value sys="string">Quantity Per Unit</Value>
        </Text>
      </TextField>
      <TextField>
        <Name>Field14</Name>
        <Section>GroupHeader1</Section>
        <SubSectionIndex>2</SubSectionIndex>
        <Left>6525</Left>
        <Top>0</Top>
        <Width>1770</Width>
        <Height>654</Height>
        <Align>RightMiddle</Align>
        <ForeColor>FF551E5F</ForeColor>
        <Font>
          <Name>Segoe UI Light</Name>
          <Size>12</Size>
        </Font>
        <Text>
          <Value sys="string">Unit Price</Value>
        </Text>
      </TextField>
      <TextField>
        <Name>Field15</Name>
        <Section>GroupHeader1</Section>
        <SubSectionIndex>2</SubSectionIndex>
        <Left>8295</Left>
        <Top>0</Top>
        <Width>2325</Width>
        <Height>654</Height>
        <Align>RightMiddle</Align>
        <ForeColor>FF551E5F</ForeColor>
        <Font>
          <Name>Segoe UI Light</Name>
          <Size>12</Size>
        </Font>
        <Text>
          <Value sys="string">In Stock</Value>
        </Text>
      </TextField>
      <TextField>
        <Name>Field3</Name>
        <Section>Detail</Section>
        <Left>180</Left>
        <Top>0</Top>
        <Width>4245</Width>
        <Height>440</Height>
        <Align>LeftMiddle</Align>
        <WordWrap>false</WordWrap>
        <Font>
          <Name>Segoe UI Light</Name>
          <Size>10</Size>
          <GdiCharSet>0</GdiCharSet>
        </Font>
        <Text>
          <Expression>left(ProductName, 30)</Expression>
        </Text>
      </TextField>
      <TextField>
        <Name>Field7</Name>
        <Section>Detail</Section>
        <Left>4425</Left>
        <Top>0</Top>
        <Width>2100</Width>
        <Height>440</Height>
        <Align>RightMiddle</Align>
        <Font>
          <Name>Segoe UI Light</Name>
          <Size>10</Size>
          <GdiCharSet>0</GdiCharSet>
        </Font>
        <Text>
          <Expression>QuantityPerUnit</Expression>
        </Text>
      </TextField>
      <TextField>
        <Name>Field8</Name>
        <Section>Detail</Section>
        <Left>6525</Left>
        <Top>0</Top>
        <Width>1770</Width>
        <Height>440</Height>
        <Align>RightMiddle</Align>
        <Font>
          <Name>Segoe UI Light</Name>
          <Size>10</Size>
          <GdiCharSet>0</GdiCharSet>
        </Font>
        <Text>
          <Expression>UnitPrice</Expression>
        </Text>
        <Format>Currency</Format>
      </TextField>
      <TextField>
        <Name>UnitsInStockCtl</Name>
        <Section>Detail</Section>
        <Left>8295</Left>
        <Top>0</Top>
        <Width>2325</Width>
        <Height>440</Height>
        <Align>RightMiddle</Align>
        <Font>
          <Name>Segoe UI Light</Name>
          <Size>10</Size>
          <GdiCharSet>0</GdiCharSet>
        </Font>
        <Text>
          <Expression>UnitsInStock</Expression>
        </Text>
      </TextField>
      <TextField>
        <Name>Field25</Name>
        <Section>PageFooter</Section>
        <SubSectionIndex>1</SubSectionIndex>
        <Left>5805</Left>
        <Top>0</Top>
        <Width>4995</Width>
        <Height>300</Height>
        <Align>RightMiddle</Align>
        <ForeColor>FF666666</ForeColor>
        <Font>
          <Name>Segoe UI</Name>
          <Size>8</Size>
        </Font>
        <Text>
          <Expression>"Page " &amp; [Page] &amp; " of " &amp; [Pages]</Expression>
        </Text>
      </TextField>
      <TextField>
        <Name>Field11</Name>
        <Section>PageHeader</Section>
        <Left>6885</Left>
        <Top>390</Top>
        <Width>3915</Width>
        <Height>300</Height>
        <Align>RightTop</Align>
        <ForeColor>FF0000C0</ForeColor>
        <Font>
          <Name>Segoe UI Light</Name>
          <Bold>true</Bold>
        </Font>
        <Text>
          <Expression>Now()</Expression>
        </Text>
        <Format>Date</Format>
      </TextField>
      <TextField>
        <Name>Field16</Name>
        <Section>PageHeader</Section>
        <Left>6885</Left>
        <Top>0</Top>
        <Width>3915</Width>
        <Height>300</Height>
        <Align>RightTop</Align>
        <ForeColor>FF008000</ForeColor>
        <Font>
          <Name>Segoe UI Light</Name>
          <Bold>true</Bold>
        </Font>
        <Text>
          <Expression>"Page " &amp; [Page] &amp; " (ODD)"</Expression>
        </Text>
      </TextField>
      <TextField>
        <Name>Field17</Name>
        <Section>PageHeader</Section>
        <SubSectionIndex>1</SubSectionIndex>
        <Left>0</Left>
        <Top>390</Top>
        <Width>3870</Width>
        <Height>300</Height>
        <Align>LeftTop</Align>
        <ForeColor>FF0000C0</ForeColor>
        <Font>
          <Name>Segoe UI Light</Name>
          <Bold>true</Bold>
        </Font>
        <Text>
          <Expression>"Page " &amp; [Page] &amp; " (EVEN)"</Expression>
        </Text>
      </TextField>
      <TextField>
        <Name>Field18</Name>
        <Section>PageHeader</Section>
        <SubSectionIndex>1</SubSectionIndex>
        <Left>0</Left>
        <Top>0</Top>
        <Width>3870</Width>
        <Height>300</Height>
        <Align>LeftTop</Align>
        <ForeColor>FF008000</ForeColor>
        <Font>
          <Name>Segoe UI Light</Name>
          <Bold>true</Bold>
        </Font>
        <Text>
          <Expression>Now()</Expression>
        </Text>
        <Format>Date</Format>
      </TextField>
    </Fields>
    <Culture>en-US</Culture>
  </Report>
</Reports>