Index: trunk/RaportySQL/RozliczenieWplywowWgDatyWplaty2009.rdl
===================================================================
--- trunk/RaportySQL/RozliczenieWplywowWgDatyWplaty2009.rdl (revision 146)
+++ trunk/RaportySQL/RozliczenieWplywowWgDatyWplaty2009.rdl (revision 153)
@@ -267,5 +267,5 @@
                       Wplaty ON FAKTURY.ID_FAKTURY = Wplaty.idFaktury LEFT OUTER JOIN
                       KLIENCI ON FAKTURY.ID_NABYWCY = KLIENCI.CustomerID
-WHERE     (FAKTURY.KOREKTA &lt;&gt; 1) AND (YEAR(FAKTURY.DATA_WYSTAWIENIA) = @rok) AND (MONTH(FAKTURY.DATA_WYSTAWIENIA) = @miesiac)
+WHERE     (FAKTURY.KOREKTA &lt;&gt; 1) AND (YEAR(Wplaty.dataWplaty) = @rok) AND (MONTH(Wplaty.dataWplaty) = @miesiac)
 GROUP BY FAKTURY.DATA_WYSTAWIENIA, FAKTURY.ID_FAKTURY, AGENCI.Symbol, CONVERT(VARCHAR, FAKTURY.NUMER) + '/' + CONVERT(VARCHAR, 
                       FAKTURY.NUMER_ROZ) + '/' + CONVERT(VARCHAR, FAKTURY.NUMER_ROK), KLIENCI.kodKlienta, Wplaty.symbolPotwierdzenia, 
@@ -348,5 +348,5 @@
       <Query>
         <DataSourceName>BAZA_REKLAM</DataSourceName>
-        <CommandText>select distinct year(DATA_W) as rok from dbo.NR where DATA_W is not null and year(DATA_W) &gt;=2008 order by year(DATA_W)desc</CommandText>
+        <CommandText>select distinct year(DATA_W) as rok from dbo.NR where DATA_W is not null and year(DATA_W) &gt;=2009 order by year(DATA_W)desc</CommandText>
         <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
       </Query>
@@ -356,5 +356,5 @@
 	Formatuj = Format(Value, "### ### ##0.00 zÅ")
 End Function</Code>
-  <Width>24.07937cm</Width>
+  <Width>22.07937cm</Width>
   <Body>
     <ColumnSpacing>1cm</ColumnSpacing>
@@ -406,5 +406,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>11</ZIndex>
+                      <ZIndex>10</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!NR_FK.Value</Value>
@@ -434,5 +434,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>10</ZIndex>
+                      <ZIndex>9</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!kodKlienta.Value</Value>
@@ -462,5 +462,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>9</ZIndex>
+                      <ZIndex>8</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!Symbol.Value</Value>
@@ -492,5 +492,5 @@
                         <Language>pl</Language>
                       </Style>
-                      <ZIndex>8</ZIndex>
+                      <ZIndex>7</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!TERMIN_ZAPLATY.Value</Value>
@@ -520,5 +520,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>7</ZIndex>
+                      <ZIndex>6</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!SPOSOB_ZAPLATY.Value</Value>
@@ -550,5 +550,5 @@
                         <Language>pl</Language>
                       </Style>
-                      <ZIndex>6</ZIndex>
+                      <ZIndex>5</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!NETTO.Value</Value>
@@ -580,5 +580,5 @@
                         <Language>pl</Language>
                       </Style>
-                      <ZIndex>5</ZIndex>
+                      <ZIndex>4</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!VAT.Value</Value>
@@ -610,5 +610,5 @@
                         <Language>pl</Language>
                       </Style>
-                      <ZIndex>4</ZIndex>
+                      <ZIndex>3</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!BRUTTO.Value</Value>
@@ -638,5 +638,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>3</ZIndex>
+                      <ZIndex>2</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!rodzajPotwierdzenia.Value</Value>
@@ -666,5 +666,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>2</ZIndex>
+                      <ZIndex>1</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!symbolPotwierdzenia.Value</Value>
@@ -696,37 +696,6 @@
                         <Language>pl</Language>
                       </Style>
-                      <ZIndex>1</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!dataWplaty.Value</Value>
-                    </Textbox>
-                  </ReportItems>
-                </TableCell>
-                <TableCell>
-                  <ReportItems>
-                    <Textbox Name="textbox9">
-                      <rd:DefaultName>textbox9</rd:DefaultName>
-                      <Style>
-                        <BackgroundColor>Azure</BackgroundColor>
-                        <BorderColor>
-                          <Default>LightGrey</Default>
-                        </BorderColor>
-                        <BorderStyle>
-                          <Default>Solid</Default>
-                        </BorderStyle>
-                        <BorderWidth>
-                          <Default>0.5pt</Default>
-                        </BorderWidth>
-                        <FontSize>8pt</FontSize>
-                        <Format>d</Format>
-                        <TextAlign>Center</TextAlign>
-                        <VerticalAlign>Middle</VerticalAlign>
-                        <PaddingLeft>2pt</PaddingLeft>
-                        <PaddingRight>2pt</PaddingRight>
-                        <PaddingTop>2pt</PaddingTop>
-                        <PaddingBottom>2pt</PaddingBottom>
-                        <Language>pl</Language>
-                      </Style>
-                      <CanGrow>true</CanGrow>
-                      <Value>=Fields!zaplata_data.Value</Value>
                     </Textbox>
                   </ReportItems>
@@ -775,5 +744,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>24</ZIndex>
+                      <ZIndex>22</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Numer faktury</Value>
@@ -805,5 +774,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>23</ZIndex>
+                      <ZIndex>21</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Kod klienta</Value>
@@ -835,5 +804,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>22</ZIndex>
+                      <ZIndex>20</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Agent</Value>
@@ -865,5 +834,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>21</ZIndex>
+                      <ZIndex>19</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Termin zapÅaty</Value>
@@ -895,5 +864,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>20</ZIndex>
+                      <ZIndex>18</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Rodzaj pÅatn.</Value>
@@ -925,5 +894,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>19</ZIndex>
+                      <ZIndex>17</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Netto</Value>
@@ -955,5 +924,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>18</ZIndex>
+                      <ZIndex>16</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>VAT</Value>
@@ -985,5 +954,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>17</ZIndex>
+                      <ZIndex>15</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Brutto</Value>
@@ -1015,5 +984,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>16</ZIndex>
+                      <ZIndex>14</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>For. potw.</Value>
@@ -1045,5 +1014,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>15</ZIndex>
+                      <ZIndex>13</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Sym. potw.</Value>
@@ -1075,42 +1044,12 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>14</ZIndex>
-                      <CanGrow>true</CanGrow>
-                      <Value>Data zapÅaty dla wpÅat z 2009</Value>
-                    </Textbox>
-                  </ReportItems>
-                </TableCell>
-                <TableCell>
-                  <ReportItems>
-                    <Textbox Name="textbox8">
-                      <rd:DefaultName>textbox8</rd:DefaultName>
-                      <Style>
-                        <BackgroundColor>WhiteSmoke</BackgroundColor>
-                        <BorderColor>
-                          <Default>LightGrey</Default>
-                        </BorderColor>
-                        <BorderStyle>
-                          <Default>Solid</Default>
-                        </BorderStyle>
-                        <BorderWidth>
-                          <Default>0.5pt</Default>
-                        </BorderWidth>
-                        <FontSize>8pt</FontSize>
-                        <FontWeight>700</FontWeight>
-                        <TextAlign>Center</TextAlign>
-                        <VerticalAlign>Middle</VerticalAlign>
-                        <PaddingLeft>2pt</PaddingLeft>
-                        <PaddingRight>2pt</PaddingRight>
-                        <PaddingTop>2pt</PaddingTop>
-                        <PaddingBottom>2pt</PaddingBottom>
-                      </Style>
-                      <ZIndex>13</ZIndex>
-                      <CanGrow>true</CanGrow>
-                      <Value>Data zapÅaty dla wpÅat z 2008/2009</Value>
+                      <ZIndex>12</ZIndex>
+                      <CanGrow>true</CanGrow>
+                      <Value>Data zapÅaty </Value>
                     </Textbox>
                   </ReportItems>
                 </TableCell>
               </TableCells>
-              <Height>1.75cm</Height>
+              <Height>1.25cm</Height>
             </TableRow>
           </TableRows>
@@ -1151,7 +1090,4 @@
             <Width>2cm</Width>
           </TableColumn>
-          <TableColumn>
-            <Width>2cm</Width>
-          </TableColumn>
         </TableColumns>
         <Footer>
@@ -1160,5 +1096,5 @@
               <TableCells>
                 <TableCell>
-                  <ColSpan>12</ColSpan>
+                  <ColSpan>11</ColSpan>
                   <ReportItems>
                     <Textbox Name="textbox7">
@@ -1183,5 +1119,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>12</ZIndex>
+                      <ZIndex>11</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>="LICZBA FAKTUR: " &amp; Count(Fields!ID_FAKTURY.Value) &amp; "   RAZEM NETTO: "&amp; Code.Formatuj(Sum(Fields!NETTO.Value)) &amp; " VAT:  " &amp; Code.Formatuj(Sum(Fields!VAT.Value)) &amp; " BRUTTO:  " &amp; Code.Formatuj(Sum(Fields!BRUTTO.Value))</Value>
@@ -1197,5 +1133,5 @@
       </Table>
     </ReportItems>
-    <Height>4.01984cm</Height>
+    <Height>3.51984cm</Height>
   </Body>
   <Language>en-US</Language>
