Index: trunk/RaportySQL/adMotoRaportFaktury.rdl
===================================================================
--- trunk/RaportySQL/adMotoRaportProwizja.rdl (revision 539)
+++ trunk/RaportySQL/adMotoRaportFaktury.rdl (revision 681)
@@ -75,14 +75,4 @@
       </ValidValues>
     </ReportParameter>
-    <ReportParameter Name="tytul">
-      <DataType>String</DataType>
-      <DefaultValue>
-        <Values>
-          <Value>adMot</Value>
-        </Values>
-      </DefaultValue>
-      <Prompt>tytul</Prompt>
-      <Hidden>true</Hidden>
-    </ReportParameter>
   </ReportParameters>
   <rd:DrawGrid>true</rd:DrawGrid>
@@ -138,14 +128,11 @@
         <DataSourceName>BAZA_REKLAM</DataSourceName>
         <CommandType>StoredProcedure</CommandType>
-        <CommandText>sp_adMotoRaportProwizja</CommandText>
+        <CommandText>sp_adMotoRaportFaktury</CommandText>
         <QueryParameters>
-          <QueryParameter Name="@rok">
+          <QueryParameter Name="rok">
             <Value>=Parameters!rok.Value</Value>
           </QueryParameter>
-          <QueryParameter Name="@miesiac">
+          <QueryParameter Name="miesiac">
             <Value>=Parameters!miesiac.Value</Value>
-          </QueryParameter>
-          <QueryParameter Name="@tytul">
-            <Value>=Parameters!tytul.Value</Value>
           </QueryParameter>
         </QueryParameters>
@@ -171,5 +158,5 @@
   </DataSets>
   <Code />
-  <Width>18.75cm</Width>
+  <Width>12cm</Width>
   <Body>
     <ColumnSpacing>1cm</ColumnSpacing>
@@ -178,5 +165,5 @@
         <rd:DefaultName>textbox19</rd:DefaultName>
         <Top>0.5cm</Top>
-        <Width>18cm</Width>
+        <Width>11.25cm</Width>
         <Style>
           <FontWeight>700</FontWeight>
@@ -191,10 +178,9 @@
         <Left>0.5cm</Left>
         <Height>0.7cm</Height>
-        <Value>="Rozliczenie reklamy za " + CStr(Parameters!rok.Value) + ", " + CStr(Parameters!miesiac.Value)</Value>
+        <Value>="Rozliczenie prowizji za sprzedaÅŒ reklam za " + CStr(Parameters!rok.Value) + ", " + CStr(Parameters!miesiac.Value)</Value>
       </Textbox>
       <Table Name="table1">
         <DataSetName>SprzedazWplywy</DataSetName>
         <Top>1.5cm</Top>
-        <Width>14.5cm</Width>
         <Details>
           <TableRows>
@@ -219,5 +205,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>5</ZIndex>
+                      <ZIndex>4</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!Agent.Value</Value>
@@ -243,5 +229,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>4</ZIndex>
+                      <ZIndex>3</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!SymbolFaktury.Value</Value>
@@ -268,5 +254,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>3</ZIndex>
+                      <ZIndex>2</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!DataWplaty.Value</Value>
@@ -293,5 +279,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>2</ZIndex>
+                      <ZIndex>1</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!Netto.Value</Value>
@@ -318,30 +304,6 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>1</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=Fields!Prowizja.Value</Value>
-                    </Textbox>
-                  </ReportItems>
-                </TableCell>
-                <TableCell>
-                  <ReportItems>
-                    <Textbox Name="textbox14">
-                      <rd:DefaultName>textbox14</rd:DefaultName>
-                      <Style>
-                        <BorderStyle>
-                          <Default>Solid</Default>
-                        </BorderStyle>
-                        <BorderWidth>
-                          <Default>0.5pt</Default>
-                        </BorderWidth>
-                        <FontSize>8pt</FontSize>
-                        <TextAlign>Center</TextAlign>
-                        <PaddingLeft>2pt</PaddingLeft>
-                        <PaddingRight>2pt</PaddingRight>
-                        <PaddingTop>2pt</PaddingTop>
-                        <PaddingBottom>2pt</PaddingBottom>
-                      </Style>
-                      <CanGrow>true</CanGrow>
-                      <Value>=Fields!Agencja.Value</Value>
                     </Textbox>
                   </ReportItems>
@@ -379,5 +341,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>35</ZIndex>
+                      <ZIndex>29</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Akwizytor</Value>
@@ -405,5 +367,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>34</ZIndex>
+                      <ZIndex>28</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Faktura</Value>
@@ -431,5 +393,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>33</ZIndex>
+                      <ZIndex>27</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Data zapÅaty</Value>
@@ -457,5 +419,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>32</ZIndex>
+                      <ZIndex>26</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Netto</Value>
@@ -483,33 +445,7 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>31</ZIndex>
+                      <ZIndex>25</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>Prowizja</Value>
-                    </Textbox>
-                  </ReportItems>
-                </TableCell>
-                <TableCell>
-                  <ReportItems>
-                    <Textbox Name="textbox13">
-                      <rd:DefaultName>textbox13</rd:DefaultName>
-                      <Style>
-                        <BackgroundColor>WhiteSmoke</BackgroundColor>
-                        <BorderStyle>
-                          <Default>Solid</Default>
-                        </BorderStyle>
-                        <BorderWidth>
-                          <Default>0.5pt</Default>
-                        </BorderWidth>
-                        <FontSize>8pt</FontSize>
-                        <FontWeight>700</FontWeight>
-                        <TextAlign>Center</TextAlign>
-                        <PaddingLeft>2pt</PaddingLeft>
-                        <PaddingRight>2pt</PaddingRight>
-                        <PaddingTop>2pt</PaddingTop>
-                        <PaddingBottom>2pt</PaddingBottom>
-                      </Style>
-                      <ZIndex>30</ZIndex>
-                      <CanGrow>true</CanGrow>
-                      <Value>Agencja</Value>
                     </Textbox>
                   </ReportItems>
@@ -536,7 +472,4 @@
             <Width>2cm</Width>
           </TableColumn>
-          <TableColumn>
-            <Width>3cm</Width>
-          </TableColumn>
         </TableColumns>
         <Footer>
@@ -554,5 +487,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>11</ZIndex>
+                      <ZIndex>9</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -570,5 +503,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>10</ZIndex>
+                      <ZIndex>8</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -586,5 +519,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>9</ZIndex>
+                      <ZIndex>7</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -613,5 +546,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>8</ZIndex>
+                      <ZIndex>6</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=SUM(Fields!Netto.Value)</Value>
@@ -640,23 +573,7 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>7</ZIndex>
+                      <ZIndex>5</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value>=SUM(Fields!Prowizja.Value)</Value>
-                    </Textbox>
-                  </ReportItems>
-                </TableCell>
-                <TableCell>
-                  <ReportItems>
-                    <Textbox Name="textbox15">
-                      <rd:DefaultName>textbox15</rd:DefaultName>
-                      <Style>
-                        <PaddingLeft>2pt</PaddingLeft>
-                        <PaddingRight>2pt</PaddingRight>
-                        <PaddingTop>2pt</PaddingTop>
-                        <PaddingBottom>2pt</PaddingBottom>
-                      </Style>
-                      <ZIndex>6</ZIndex>
-                      <CanGrow>true</CanGrow>
-                      <Value />
                     </Textbox>
                   </ReportItems>
@@ -677,5 +594,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>17</ZIndex>
+                      <ZIndex>14</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -693,5 +610,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>16</ZIndex>
+                      <ZIndex>13</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -709,5 +626,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>15</ZIndex>
+                      <ZIndex>12</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -732,5 +649,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>14</ZIndex>
+                      <ZIndex>11</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -755,21 +672,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>13</ZIndex>
-                      <CanGrow>true</CanGrow>
-                      <Value />
-                    </Textbox>
-                  </ReportItems>
-                </TableCell>
-                <TableCell>
-                  <ReportItems>
-                    <Textbox Name="textbox25">
-                      <rd:DefaultName>textbox25</rd:DefaultName>
-                      <Style>
-                        <PaddingLeft>2pt</PaddingLeft>
-                        <PaddingRight>2pt</PaddingRight>
-                        <PaddingTop>2pt</PaddingTop>
-                        <PaddingBottom>2pt</PaddingBottom>
-                      </Style>
-                      <ZIndex>12</ZIndex>
+                      <ZIndex>10</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -792,5 +693,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>23</ZIndex>
+                      <ZIndex>19</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -808,5 +709,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>22</ZIndex>
+                      <ZIndex>18</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -824,24 +725,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>21</ZIndex>
-                      <CanGrow>true</CanGrow>
-                      <Value />
-                    </Textbox>
-                  </ReportItems>
-                </TableCell>
-                <TableCell>
-                  <ReportItems>
-                    <Textbox Name="textbox38">
-                      <rd:DefaultName>textbox38</rd:DefaultName>
-                      <Style>
-                        <BorderWidth>
-                          <Default>0.5pt</Default>
-                        </BorderWidth>
-                        <PaddingLeft>2pt</PaddingLeft>
-                        <PaddingRight>2pt</PaddingRight>
-                        <PaddingTop>2pt</PaddingTop>
-                        <PaddingBottom>2pt</PaddingBottom>
-                      </Style>
-                      <ZIndex>20</ZIndex>
+                      <ZIndex>17</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -860,7 +742,7 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>19</ZIndex>
-                      <CanGrow>true</CanGrow>
-                      <Value>Zysk:</Value>
+                      <ZIndex>16</ZIndex>
+                      <CanGrow>true</CanGrow>
+                      <Value>Suma netto:</Value>
                     </Textbox>
                   </ReportItems>
@@ -886,7 +768,7 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>18</ZIndex>
-                      <CanGrow>true</CanGrow>
-                      <Value>=(SUM(Fields!Netto.Value)-SUM(Fields!Prowizja.Value))</Value>
+                      <ZIndex>15</ZIndex>
+                      <CanGrow>true</CanGrow>
+                      <Value>=SUM(Fields!Netto.Value)</Value>
                     </Textbox>
                   </ReportItems>
@@ -907,5 +789,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>29</ZIndex>
+                      <ZIndex>24</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -923,5 +805,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>28</ZIndex>
+                      <ZIndex>23</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -939,24 +821,5 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>27</ZIndex>
-                      <CanGrow>true</CanGrow>
-                      <Value />
-                    </Textbox>
-                  </ReportItems>
-                </TableCell>
-                <TableCell>
-                  <ReportItems>
-                    <Textbox Name="textbox29">
-                      <rd:DefaultName>textbox29</rd:DefaultName>
-                      <Style>
-                        <BorderWidth>
-                          <Default>0.5pt</Default>
-                        </BorderWidth>
-                        <PaddingLeft>2pt</PaddingLeft>
-                        <PaddingRight>2pt</PaddingRight>
-                        <PaddingTop>2pt</PaddingTop>
-                        <PaddingBottom>2pt</PaddingBottom>
-                      </Style>
-                      <ZIndex>26</ZIndex>
+                      <ZIndex>22</ZIndex>
                       <CanGrow>true</CanGrow>
                       <Value />
@@ -975,7 +838,7 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>25</ZIndex>
-                      <CanGrow>true</CanGrow>
-                      <Value>Prowizja:</Value>
+                      <ZIndex>21</ZIndex>
+                      <CanGrow>true</CanGrow>
+                      <Value>Suma prowizji:</Value>
                     </Textbox>
                   </ReportItems>
@@ -1001,7 +864,7 @@
                         <PaddingBottom>2pt</PaddingBottom>
                       </Style>
-                      <ZIndex>24</ZIndex>
-                      <CanGrow>true</CanGrow>
-                      <Value>=(SUM(Fields!Netto.Value)-SUM(Fields!Prowizja.Value))*0.75</Value>
+                      <ZIndex>20</ZIndex>
+                      <CanGrow>true</CanGrow>
+                      <Value>=SUM(Fields!Prowizja.Value)</Value>
                     </Textbox>
                   </ReportItems>
