Index: trunk/RaportySQL/WplywyWgWplaty.rdl
===================================================================
--- trunk/RaportySQL/WplywyWgWplaty.rdl (revision 319)
+++ trunk/RaportySQL/WplywyWgWplaty.rdl (revision 322)
@@ -149,4 +149,19 @@
 AND (AgencjaId IN (@agencja))
 GROUP BY AgencjaId, Agencja, Tytul
+
+/*
+UNION
+
+SELECT AgencjaId, Agencja, Tytul, 
+SUM(FakturaNetto) AS FakturaNetto,
+SUM(FakturaBrutto) AS FakturaBrutto,
+SUM(WplataBrutto) AS WplataBrutto
+FROM FakturyZaplaconePoznanKatowice
+WHERE 
+Rok = @rok 
+AND Miesiac IN (@ms)
+AND (AgencjaId IN (@agencja))
+GROUP BY AgencjaId, Agencja, Tytul*/
+
 ORDER BY Agencja, Tytul</CommandText>
         <QueryParameters>
@@ -271,5 +286,5 @@
                             <PaddingBottom>2pt</PaddingBottom>
                           </Style>
-                          <ZIndex>14</ZIndex>
+                          <ZIndex>11</ZIndex>
                           <CanGrow>true</CanGrow>
                           <Value>=Fields!Agencja.Value</Value>
@@ -297,5 +312,5 @@
                             <PaddingBottom>2pt</PaddingBottom>
                           </Style>
-                          <ZIndex>13</ZIndex>
+                          <ZIndex>10</ZIndex>
                           <CanGrow>true</CanGrow>
                           <Value>
@@ -327,5 +342,5 @@
                             <PaddingBottom>2pt</PaddingBottom>
                           </Style>
-                          <ZIndex>12</ZIndex>
+                          <ZIndex>9</ZIndex>
                           <CanGrow>true</CanGrow>
                           <Value>=Sum(Fields!FakturaNetto.Value)</Value>
@@ -356,36 +371,7 @@
                             <PaddingBottom>2pt</PaddingBottom>
                           </Style>
-                          <ZIndex>11</ZIndex>
+                          <ZIndex>8</ZIndex>
                           <CanGrow>true</CanGrow>
                           <Value>=Sum(Fields!FakturaBrutto.Value)</Value>
-                        </Textbox>
-                      </ReportItems>
-                    </TableCell>
-                    <TableCell>
-                      <ReportItems>
-                        <Textbox Name="textbox11">
-                          <rd:DefaultName>textbox11</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>600</FontWeight>
-                            <Format>C</Format>
-                            <PaddingLeft>2pt</PaddingLeft>
-                            <PaddingRight>2pt</PaddingRight>
-                            <PaddingTop>2pt</PaddingTop>
-                            <PaddingBottom>2pt</PaddingBottom>
-                          </Style>
-                          <ZIndex>10</ZIndex>
-                          <CanGrow>true</CanGrow>
-                          <Value>=Sum(Fields!WplataBrutto.Value)</Value>
                         </Textbox>
                       </ReportItems>
@@ -398,4 +384,5 @@
           </TableGroup>
         </TableGroups>
+        <Width>12.61904cm</Width>
         <Details>
           <TableRows>
@@ -412,5 +399,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>4</ZIndex>
+                      <ZIndex>3</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>
@@ -439,5 +426,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>3</ZIndex>
+                      <ZIndex>2</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!Tytul.Value</Value>
@@ -466,5 +453,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>2</ZIndex>
+                      <ZIndex>1</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!FakturaNetto.Value</Value>
@@ -493,33 +480,6 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>1</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!FakturaBrutto.Value</Value>
-                    </Textbox>
-                  </ReportItems>
-                </TableCell>
-                <TableCell>
-                  <ReportItems>
-                    <Textbox Name="WplataBrutto">
-                      <rd:DefaultName>WplataBrutto</rd:DefaultName>
-                      <Style>
-                        <BorderColor>
-                          <Default>LightGrey</Default>
-                        </BorderColor>
-                        <BorderStyle>
-                          <Default>Solid</Default>
-                        </BorderStyle>
-                        <BorderWidth>
-                          <Default>0.5pt</Default>
-                        </BorderWidth>
-                        <FontSize>8pt</FontSize>
-                        <Format>C</Format>
-                        <PaddingLeft>2pt</PaddingLeft>
-                        <PaddingRight>2pt</PaddingRight>
-                        <PaddingTop>2pt</PaddingTop>
-                        <PaddingBottom>2pt</PaddingBottom>
-                      </Style>
-                      <CanGrow>true</CanGrow>
-                      <Value>=Fields!WplataBrutto.Value</Value>
                     </Textbox>
                   </ReportItems>
@@ -551,5 +511,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>19</ZIndex>
+                      <ZIndex>15</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Agencja</Value>
@@ -570,5 +530,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>18</ZIndex>
+                      <ZIndex>14</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Tytuł</Value>
@@ -589,5 +549,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>17</ZIndex>
+                      <ZIndex>13</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Faktura Netto</Value>
@@ -608,26 +568,7 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>16</ZIndex>
+                      <ZIndex>12</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Faktura Brutto</Value>
-                    </Textbox>
-                  </ReportItems>
-                </TableCell>
-                <TableCell>
-                  <ReportItems>
-                    <Textbox Name="textbox7">
-                      <rd:DefaultName>textbox7</rd:DefaultName>
-                      <Style>
-                        <FontSize>8pt</FontSize>
-                        <FontWeight>700</FontWeight>
-                        <TextAlign>Center</TextAlign>
-                        <PaddingLeft>2pt</PaddingLeft>
-                        <PaddingRight>2pt</PaddingRight>
-                        <PaddingTop>2pt</PaddingTop>
-                        <PaddingBottom>2pt</PaddingBottom>
-                      </Style>
-                      <ZIndex>15</ZIndex>
-                      <CanGrow>true</CanGrow>
-                      <Value>Wpłata Brutto</Value>
                     </Textbox>
                   </ReportItems>
@@ -652,7 +593,4 @@
             <Width>2.53968cm</Width>
           </TableColumn>
-          <TableColumn>
-            <Width>2.53968cm</Width>
-          </TableColumn>
         </TableColumns>
         <Footer>
@@ -670,5 +608,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>9</ZIndex>
+                      <ZIndex>7</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -686,5 +624,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>8</ZIndex>
+                      <ZIndex>6</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -714,5 +652,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>7</ZIndex>
+                      <ZIndex>5</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Sum(Fields!FakturaNetto.Value)</Value>
@@ -742,36 +680,7 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>6</ZIndex>
+                      <ZIndex>4</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Sum(Fields!FakturaBrutto.Value)</Value>
-                    </Textbox>
-                  </ReportItems>
-                </TableCell>
-                <TableCell>
-                  <ReportItems>
-                    <Textbox Name="textbox16">
-                      <rd:DefaultName>textbox16</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>
-                        <Format>C</Format>
-                        <PaddingLeft>2pt</PaddingLeft>
-                        <PaddingRight>2pt</PaddingRight>
-                        <PaddingTop>2pt</PaddingTop>
-                        <PaddingBottom>2pt</PaddingBottom>
-                      </Style>
-                      <ZIndex>5</ZIndex>
-                      <CanGrow>true</CanGrow>
-                      <Value>=Sum(Fields!WplataBrutto.Value)</Value>
                     </Textbox>
                   </ReportItems>
