<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
  <DataSources>
    <DataSource Name="BAZA_REKLAM">
      <DataSourceReference>BAZA_REKLAM</DataSourceReference>
      <rd:DataSourceID>c63051f4-8985-411b-8f42-3b047655f818</rd:DataSourceID>
    </DataSource>
  </DataSources>
  <BottomMargin>1cm</BottomMargin>
  <RightMargin>1cm</RightMargin>
  <PageWidth>29.7cm</PageWidth>
  <rd:DrawGrid>true</rd:DrawGrid>
  <InteractiveWidth>21cm</InteractiveWidth>
  <rd:GridSpacing>0.25cm</rd:GridSpacing>
  <rd:SnapToGrid>true</rd:SnapToGrid>
  <Body>
    <ColumnSpacing>1cm</ColumnSpacing>
    <ReportItems>
      <Textbox Name="textbox6">
        <Left>0.75cm</Left>
        <Top>0.25cm</Top>
        <rd:DefaultName>textbox6</rd:DefaultName>
        <ZIndex>1</ZIndex>
        <Width>10.75cm</Width>
        <Style>
          <TextAlign>Center</TextAlign>
          <PaddingLeft>2pt</PaddingLeft>
          <PaddingBottom>2pt</PaddingBottom>
          <FontWeight>700</FontWeight>
          <FontSize>12pt</FontSize>
          <PaddingRight>2pt</PaddingRight>
          <PaddingTop>2pt</PaddingTop>
        </Style>
        <CanGrow>true</CanGrow>
        <Height>0.63492cm</Height>
        <Value>PODSUMOWANIE ROCZNE WEDŁUG ZAMÓWIEŃ</Value>
      </Textbox>
      <Matrix Name="matrix1">
        <MatrixColumns>
          <MatrixColumn>
            <Width>1.02646cm</Width>
          </MatrixColumn>
          <MatrixColumn>
            <Width>2.5cm</Width>
          </MatrixColumn>
        </MatrixColumns>
        <Left>0.75cm</Left>
        <RowGroupings>
          <RowGrouping>
            <Width>1.5cm</Width>
            <DynamicRows>
              <ReportItems>
                <Textbox Name="R_M">
                  <rd:DefaultName>R_M</rd:DefaultName>
                  <ZIndex>2</ZIndex>
                  <Style>
                    <BorderStyle>
                      <Default>Solid</Default>
                    </BorderStyle>
                    <TextAlign>Center</TextAlign>
                    <PaddingLeft>2pt</PaddingLeft>
                    <BorderWidth>
                      <Default>0.5pt</Default>
                    </BorderWidth>
                    <PaddingBottom>2pt</PaddingBottom>
                    <FontSize>8pt</FontSize>
                    <VerticalAlign>Middle</VerticalAlign>
                    <BorderColor>
                      <Default>LightGrey</Default>
                    </BorderColor>
                    <PaddingRight>2pt</PaddingRight>
                    <PaddingTop>2pt</PaddingTop>
                  </Style>
                  <CanGrow>true</CanGrow>
                  <Value>=Fields!R_M.Value</Value>
                </Textbox>
              </ReportItems>
              <Grouping Name="matrix1_R_M">
                <GroupExpressions>
                  <GroupExpression>=Fields!R_M.Value</GroupExpression>
                </GroupExpressions>
              </Grouping>
            </DynamicRows>
          </RowGrouping>
        </RowGroupings>
        <ColumnGroupings>
          <ColumnGrouping>
            <DynamicColumns>
              <ReportItems>
                <Textbox Name="TYTUŁ">
                  <rd:DefaultName>TYTUŁ</rd:DefaultName>
                  <ZIndex>8</ZIndex>
                  <Style>
                    <BorderStyle>
                      <Default>Solid</Default>
                    </BorderStyle>
                    <TextAlign>Center</TextAlign>
                    <PaddingLeft>2pt</PaddingLeft>
                    <BorderWidth>
                      <Default>0.5pt</Default>
                    </BorderWidth>
                    <PaddingBottom>2pt</PaddingBottom>
                    <FontWeight>700</FontWeight>
                    <FontSize>8pt</FontSize>
                    <VerticalAlign>Middle</VerticalAlign>
                    <BorderColor>
                      <Default>LightGrey</Default>
                    </BorderColor>
                    <BackgroundColor>Black</BackgroundColor>
                    <Color>White</Color>
                    <PaddingRight>2pt</PaddingRight>
                    <PaddingTop>2pt</PaddingTop>
                  </Style>
                  <CanGrow>true</CanGrow>
                  <Value>=Fields!TYTUŁ.Value</Value>
                </Textbox>
              </ReportItems>
              <Subtotal>
                <ReportItems>
                  <Textbox Name="textbox7">
                    <rd:DefaultName>textbox7</rd:DefaultName>
                    <ZIndex>7</ZIndex>
                    <Style>
                      <BorderStyle>
                        <Default>Solid</Default>
                      </BorderStyle>
                      <TextAlign>Center</TextAlign>
                      <PaddingLeft>2pt</PaddingLeft>
                      <BorderWidth>
                        <Default>0.5pt</Default>
                      </BorderWidth>
                      <PaddingBottom>2pt</PaddingBottom>
                      <FontWeight>700</FontWeight>
                      <FontSize>8pt</FontSize>
                      <VerticalAlign>Middle</VerticalAlign>
                      <BorderColor>
                        <Default>LightGrey</Default>
                      </BorderColor>
                      <BackgroundColor>Silver</BackgroundColor>
                      <PaddingRight>2pt</PaddingRight>
                      <PaddingTop>2pt</PaddingTop>
                    </Style>
                    <CanGrow>true</CanGrow>
                    <Value>Razem</Value>
                  </Textbox>
                </ReportItems>
              </Subtotal>
              <Grouping Name="matrix1_TYTUŁ">
                <GroupExpressions>
                  <GroupExpression>=Fields!TYTUŁ.Value</GroupExpression>
                </GroupExpressions>
              </Grouping>
            </DynamicColumns>
            <Height>0.5cm</Height>
          </ColumnGrouping>
          <ColumnGrouping>
            <DynamicColumns>
              <ReportItems>
                <Textbox Name="textbox2">
                  <rd:DefaultName>textbox2</rd:DefaultName>
                  <ZIndex>6</ZIndex>
                  <Style>
                    <BorderStyle>
                      <Default>Solid</Default>
                    </BorderStyle>
                    <TextAlign>Center</TextAlign>
                    <PaddingLeft>2pt</PaddingLeft>
                    <BorderWidth>
                      <Default>0.5pt</Default>
                    </BorderWidth>
                    <PaddingBottom>2pt</PaddingBottom>
                    <FontWeight>700</FontWeight>
                    <FontSize>8pt</FontSize>
                    <VerticalAlign>Middle</VerticalAlign>
                    <BorderColor>
                      <Default>LightGrey</Default>
                    </BorderColor>
                    <BackgroundColor>Silver</BackgroundColor>
                    <PaddingRight>2pt</PaddingRight>
                    <PaddingTop>2pt</PaddingTop>
                  </Style>
                  <CanGrow>true</CanGrow>
                  <Value>=iif(Fields!ZP.Value=1,"ZAPŁACONE","NIEZAPŁACONE")</Value>
                </Textbox>
              </ReportItems>
              <Subtotal>
                <ReportItems>
                  <Textbox Name="textbox5">
                    <rd:DefaultName>textbox5</rd:DefaultName>
                    <ZIndex>5</ZIndex>
                    <Style>
                      <BorderStyle>
                        <Default>Solid</Default>
                      </BorderStyle>
                      <TextAlign>Center</TextAlign>
                      <PaddingLeft>2pt</PaddingLeft>
                      <BorderWidth>
                        <Default>0.5pt</Default>
                      </BorderWidth>
                      <PaddingBottom>2pt</PaddingBottom>
                      <FontWeight>700</FontWeight>
                      <FontSize>8pt</FontSize>
                      <VerticalAlign>Middle</VerticalAlign>
                      <BorderColor>
                        <Default>LightGrey</Default>
                      </BorderColor>
                      <BackgroundColor>Silver</BackgroundColor>
                      <PaddingRight>2pt</PaddingRight>
                      <PaddingTop>2pt</PaddingTop>
                    </Style>
                    <CanGrow>true</CanGrow>
                    <Value>Razem</Value>
                  </Textbox>
                </ReportItems>
              </Subtotal>
              <Grouping Name="matrix1_ColumnGroup2">
                <GroupExpressions>
                  <GroupExpression>=Fields!ZP.Value</GroupExpression>
                </GroupExpressions>
              </Grouping>
            </DynamicColumns>
            <Height>0.5cm</Height>
          </ColumnGrouping>
          <ColumnGrouping>
            <Height>0.5cm</Height>
            <StaticColumns>
              <StaticColumn>
                <ReportItems>
                  <Textbox Name="textbox3">
                    <rd:DefaultName>textbox3</rd:DefaultName>
                    <ZIndex>4</ZIndex>
                    <Style>
                      <BorderStyle>
                        <Default>Solid</Default>
                      </BorderStyle>
                      <TextAlign>Center</TextAlign>
                      <PaddingLeft>2pt</PaddingLeft>
                      <BorderWidth>
                        <Default>0.5pt</Default>
                      </BorderWidth>
                      <PaddingBottom>2pt</PaddingBottom>
                      <FontWeight>700</FontWeight>
                      <FontSize>8pt</FontSize>
                      <VerticalAlign>Middle</VerticalAlign>
                      <BorderColor>
                        <Default>LightGrey</Default>
                      </BorderColor>
                      <BackgroundColor>WhiteSmoke</BackgroundColor>
                      <PaddingRight>2pt</PaddingRight>
                      <PaddingTop>2pt</PaddingTop>
                    </Style>
                    <CanGrow>true</CanGrow>
                    <Value>il</Value>
                  </Textbox>
                </ReportItems>
              </StaticColumn>
              <StaticColumn>
                <ReportItems>
                  <Textbox Name="textbox4">
                    <rd:DefaultName>textbox4</rd:DefaultName>
                    <ZIndex>3</ZIndex>
                    <Style>
                      <BorderStyle>
                        <Default>Solid</Default>
                      </BorderStyle>
                      <TextAlign>Center</TextAlign>
                      <PaddingLeft>2pt</PaddingLeft>
                      <BorderWidth>
                        <Default>0.5pt</Default>
                      </BorderWidth>
                      <PaddingBottom>2pt</PaddingBottom>
                      <FontWeight>700</FontWeight>
                      <FontSize>8pt</FontSize>
                      <VerticalAlign>Middle</VerticalAlign>
                      <BorderColor>
                        <Default>LightGrey</Default>
                      </BorderColor>
                      <BackgroundColor>WhiteSmoke</BackgroundColor>
                      <PaddingRight>2pt</PaddingRight>
                      <PaddingTop>2pt</PaddingTop>
                    </Style>
                    <CanGrow>true</CanGrow>
                    <Value>netto</Value>
                  </Textbox>
                </ReportItems>
              </StaticColumn>
            </StaticColumns>
          </ColumnGrouping>
        </ColumnGroupings>
        <DataSetName>test</DataSetName>
        <Top>1cm</Top>
        <Width>8.55292cm</Width>
        <Corner>
          <ReportItems>
            <Textbox Name="textbox1">
              <rd:DefaultName>textbox1</rd:DefaultName>
              <ZIndex>9</ZIndex>
              <Style>
                <BorderStyle>
                  <Default>Solid</Default>
                </BorderStyle>
                <TextAlign>Center</TextAlign>
                <PaddingLeft>2pt</PaddingLeft>
                <BorderWidth>
                  <Default>0.5pt</Default>
                </BorderWidth>
                <PaddingBottom>2pt</PaddingBottom>
                <FontSize>8pt</FontSize>
                <BorderColor>
                  <Default>LightGrey</Default>
                </BorderColor>
                <PaddingRight>2pt</PaddingRight>
                <PaddingTop>2pt</PaddingTop>
              </Style>
              <CanGrow>true</CanGrow>
              <Value />
            </Textbox>
          </ReportItems>
        </Corner>
        <Style>
          <BorderStyle>
            <Default>Solid</Default>
          </BorderStyle>
          <BorderWidth>
            <Default>0.5pt</Default>
          </BorderWidth>
          <FontSize>8pt</FontSize>
          <BorderColor>
            <Default>LightGrey</Default>
          </BorderColor>
        </Style>
        <MatrixRows>
          <MatrixRow>
            <Height>0.5cm</Height>
            <MatrixCells>
              <MatrixCell>
                <ReportItems>
                  <Textbox Name="il">
                    <rd:DefaultName>il</rd:DefaultName>
                    <ZIndex>1</ZIndex>
                    <Style>
                      <BorderStyle>
                        <Default>Solid</Default>
                      </BorderStyle>
                      <TextAlign>Center</TextAlign>
                      <PaddingLeft>2pt</PaddingLeft>
                      <BorderWidth>
                        <Default>0.5pt</Default>
                      </BorderWidth>
                      <PaddingBottom>2pt</PaddingBottom>
                      <FontSize>8pt</FontSize>
                      <VerticalAlign>Middle</VerticalAlign>
                      <BorderColor>
                        <Default>LightGrey</Default>
                      </BorderColor>
                      <PaddingRight>2pt</PaddingRight>
                      <PaddingTop>2pt</PaddingTop>
                    </Style>
                    <CanGrow>true</CanGrow>
                    <Value>=Code.getValue(Sum(Fields!il.Value))</Value>
                  </Textbox>
                </ReportItems>
              </MatrixCell>
              <MatrixCell>
                <ReportItems>
                  <Textbox Name="netto">
                    <rd:DefaultName>netto</rd:DefaultName>
                    <Style>
                      <BorderStyle>
                        <Default>Solid</Default>
                      </BorderStyle>
                      <TextAlign>Right</TextAlign>
                      <PaddingLeft>2pt</PaddingLeft>
                      <BorderWidth>
                        <Default>0.5pt</Default>
                      </BorderWidth>
                      <PaddingBottom>2pt</PaddingBottom>
                      <FontSize>8pt</FontSize>
                      <VerticalAlign>Middle</VerticalAlign>
                      <Format>C</Format>
                      <BorderColor>
                        <Default>LightGrey</Default>
                      </BorderColor>
                      <PaddingRight>2pt</PaddingRight>
                      <PaddingTop>2pt</PaddingTop>
                      <Language>pl</Language>
                    </Style>
                    <CanGrow>true</CanGrow>
                    <Value>=Code.getValue(Sum(Fields!netto.Value))</Value>
                  </Textbox>
                </ReportItems>
              </MatrixCell>
            </MatrixCells>
          </MatrixRow>
        </MatrixRows>
      </Matrix>
    </ReportItems>
    <Height>3cm</Height>
  </Body>
  <rd:ReportID>6f6d570f-2d0e-4664-8319-fe5bc09ba0a3</rd:ReportID>
  <LeftMargin>1cm</LeftMargin>
  <DataSets>
    <DataSet Name="test">
      <Query>
        <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
        <CommandText>select TYTUŁ,ZP, R_M ,Sum(NETTO) as netto,Count(NEtto) as il 
from dbo.VIEW_PODSUMOWANIE_ROCZNE_ZAM_SEL 
group by R_M,TYTUŁ,ZP
having ZP is not null
order by R_M desc</CommandText>
        <DataSourceName>BAZA_REKLAM</DataSourceName>
      </Query>
      <Fields>
        <Field Name="TYTUŁ">
          <rd:TypeName>System.String</rd:TypeName>
          <DataField>TYTUŁ</DataField>
        </Field>
        <Field Name="ZP">
          <rd:TypeName>System.Int32</rd:TypeName>
          <DataField>ZP</DataField>
        </Field>
        <Field Name="R_M">
          <rd:TypeName>System.String</rd:TypeName>
          <DataField>R_M</DataField>
        </Field>
        <Field Name="netto">
          <rd:TypeName>System.Double</rd:TypeName>
          <DataField>netto</DataField>
        </Field>
        <Field Name="il">
          <rd:TypeName>System.Int32</rd:TypeName>
          <DataField>il</DataField>
        </Field>
      </Fields>
    </DataSet>
  </DataSets>
  <Code>Function GetValue(value as Object) as Object
 	If value is Nothing Then 
	Return 0
	Else
	Return value
	End If	
End Function</Code>
  <Width>27.5cm</Width>
  <InteractiveHeight>29.7cm</InteractiveHeight>
  <Language>en-US</Language>
  <TopMargin>1cm</TopMargin>
  <PageHeight>21cm</PageHeight>
</Report>