| 226 | | <CommandText>SELECT DISTINCT |
| 227 | | W.Agencja, |
| 228 | | LOWER(W.Symbol) AS Agent, |
| 229 | | A.[ImiÄ] AS Imie, |
| 230 | | A.Nazwisko, |
| 231 | | COUNT(DISTINCT W.ID_FAKTURY) AS IloscFaktur, |
| 232 | | SUM(W.Netto) AS Netto, |
| 233 | | ROUND(SUM(W.Netto * W.procentProwizji), 2) AS Prowizja, |
| 234 | | A.Pracownicy AS Pracownik |
| 235 | | FROM WplywyByTytul W |
| 236 | | LEFT OUTER JOIN AGENCI A ON A.Symbol=W.Symbol |
| 237 | | INNER JOIN [Plan] P ON A.Symbol=P.Symbol |
| 238 | | WHERE (YEAR(W.dataWplaty) = @rok) AND (MONTH(W.dataWplaty) = @miesiac) |
| 239 | | AND (W.SystemKsiegowyId IN (@systemKsiegowy)) |
| 240 | | AND (@prawa_agent IS NULL OR W.Symbol=@prawa_agent) |
| | 208 | <CommandText>SELECT P.idFaktury, P.NrFaktury, P.Agencja, P.Agent, A.[ImiÄ] As Imie, A.Nazwisko, Netto, Netto*procentProwizji AS Prowizja, A.Pracownicy |
| | 209 | FROM Prowizje P |
| | 210 | INNER JOIN Agenci A ON A.Symbol=P.Agent |
| | 211 | WHERE Rok=@rok AND Ms=@miesiac |
| | 212 | AND (@prawa_agent IS NULL OR P.Agent=@prawa_agent) |
| 388 | | <Width>17.02645cm</Width> |
| | 337 | <TableGroups> |
| | 338 | <TableGroup> |
| | 339 | <Grouping Name="table1_Group1"> |
| | 340 | <GroupExpressions> |
| | 341 | <GroupExpression>=Fields!Agent.Value</GroupExpression> |
| | 342 | </GroupExpressions> |
| | 343 | </Grouping> |
| | 344 | <Header> |
| | 345 | <TableRows> |
| | 346 | <TableRow> |
| | 347 | <TableCells> |
| | 348 | <TableCell> |
| | 349 | <ReportItems> |
| | 350 | <Textbox Name="textbox30"> |
| | 351 | <Style> |
| | 352 | <BorderColor> |
| | 353 | <Default>LightGrey</Default> |
| | 354 | </BorderColor> |
| | 355 | <BorderStyle> |
| | 356 | <Default>Solid</Default> |
| | 357 | </BorderStyle> |
| | 358 | <BorderWidth> |
| | 359 | <Default>0.5pt</Default> |
| | 360 | </BorderWidth> |
| | 361 | <FontSize>9pt</FontSize> |
| | 362 | <TextAlign>Center</TextAlign> |
| | 363 | <VerticalAlign>Middle</VerticalAlign> |
| | 364 | <PaddingLeft>2pt</PaddingLeft> |
| | 365 | <PaddingRight>2pt</PaddingRight> |
| | 366 | <PaddingTop>2pt</PaddingTop> |
| | 367 | <PaddingBottom>2pt</PaddingBottom> |
| | 368 | </Style> |
| | 369 | <ZIndex>17</ZIndex> |
| | 370 | <CanGrow>true</CanGrow> |
| | 371 | <Value>=Fields!agencja.Value</Value> |
| | 372 | </Textbox> |
| | 373 | </ReportItems> |
| | 374 | </TableCell> |
| | 375 | <TableCell> |
| | 376 | <ReportItems> |
| | 377 | <Textbox Name="ImiÄ"> |
| | 378 | <rd:DefaultName>ImiÄ</rd:DefaultName> |
| | 379 | <Style> |
| | 380 | <BorderColor> |
| | 381 | <Default>LightGrey</Default> |
| | 382 | </BorderColor> |
| | 383 | <BorderStyle> |
| | 384 | <Default>Solid</Default> |
| | 385 | </BorderStyle> |
| | 386 | <BorderWidth> |
| | 387 | <Default>0.5pt</Default> |
| | 388 | </BorderWidth> |
| | 389 | <FontSize>9pt</FontSize> |
| | 390 | <TextAlign>Center</TextAlign> |
| | 391 | <VerticalAlign>Middle</VerticalAlign> |
| | 392 | <PaddingLeft>2pt</PaddingLeft> |
| | 393 | <PaddingRight>2pt</PaddingRight> |
| | 394 | <PaddingTop>2pt</PaddingTop> |
| | 395 | <PaddingBottom>2pt</PaddingBottom> |
| | 396 | </Style> |
| | 397 | <ZIndex>16</ZIndex> |
| | 398 | <CanGrow>true</CanGrow> |
| | 399 | <Value>=Fields!Imie.Value</Value> |
| | 400 | </Textbox> |
| | 401 | </ReportItems> |
| | 402 | </TableCell> |
| | 403 | <TableCell> |
| | 404 | <ReportItems> |
| | 405 | <Textbox Name="textbox16"> |
| | 406 | <Style> |
| | 407 | <BorderColor> |
| | 408 | <Default>LightGrey</Default> |
| | 409 | </BorderColor> |
| | 410 | <BorderStyle> |
| | 411 | <Default>Solid</Default> |
| | 412 | </BorderStyle> |
| | 413 | <BorderWidth> |
| | 414 | <Default>0.5pt</Default> |
| | 415 | </BorderWidth> |
| | 416 | <FontSize>9pt</FontSize> |
| | 417 | <TextAlign>Center</TextAlign> |
| | 418 | <VerticalAlign>Middle</VerticalAlign> |
| | 419 | <PaddingLeft>2pt</PaddingLeft> |
| | 420 | <PaddingRight>2pt</PaddingRight> |
| | 421 | <PaddingTop>2pt</PaddingTop> |
| | 422 | <PaddingBottom>2pt</PaddingBottom> |
| | 423 | </Style> |
| | 424 | <ZIndex>15</ZIndex> |
| | 425 | <CanGrow>true</CanGrow> |
| | 426 | <Value>=Fields!Nazwisko.Value</Value> |
| | 427 | </Textbox> |
| | 428 | </ReportItems> |
| | 429 | </TableCell> |
| | 430 | <TableCell> |
| | 431 | <ReportItems> |
| | 432 | <Textbox Name="textbox2"> |
| | 433 | <Style> |
| | 434 | <BorderColor> |
| | 435 | <Default>LightGrey</Default> |
| | 436 | </BorderColor> |
| | 437 | <BorderStyle> |
| | 438 | <Default>Solid</Default> |
| | 439 | </BorderStyle> |
| | 440 | <BorderWidth> |
| | 441 | <Default>0.5pt</Default> |
| | 442 | </BorderWidth> |
| | 443 | <FontSize>9pt</FontSize> |
| | 444 | <Format>g</Format> |
| | 445 | <TextAlign>Center</TextAlign> |
| | 446 | <VerticalAlign>Middle</VerticalAlign> |
| | 447 | <PaddingLeft>2pt</PaddingLeft> |
| | 448 | <PaddingRight>2pt</PaddingRight> |
| | 449 | <PaddingTop>2pt</PaddingTop> |
| | 450 | <PaddingBottom>2pt</PaddingBottom> |
| | 451 | <Language>pl</Language> |
| | 452 | </Style> |
| | 453 | <ZIndex>14</ZIndex> |
| | 454 | <CanGrow>true</CanGrow> |
| | 455 | <Value>=CountDistinct(Fields!idFaktury.Value, "table1_Group1")</Value> |
| | 456 | </Textbox> |
| | 457 | </ReportItems> |
| | 458 | </TableCell> |
| | 459 | <TableCell> |
| | 460 | <ReportItems> |
| | 461 | <Textbox Name="textbox13"> |
| | 462 | <rd:DefaultName>textbox13</rd:DefaultName> |
| | 463 | <Style> |
| | 464 | <PaddingLeft>2pt</PaddingLeft> |
| | 465 | <PaddingRight>2pt</PaddingRight> |
| | 466 | <PaddingTop>2pt</PaddingTop> |
| | 467 | <PaddingBottom>2pt</PaddingBottom> |
| | 468 | </Style> |
| | 469 | <ZIndex>13</ZIndex> |
| | 470 | <CanGrow>true</CanGrow> |
| | 471 | <Value /> |
| | 472 | </Textbox> |
| | 473 | </ReportItems> |
| | 474 | </TableCell> |
| | 475 | <TableCell> |
| | 476 | <ReportItems> |
| | 477 | <Textbox Name="textbox10"> |
| | 478 | <Style> |
| | 479 | <BorderColor> |
| | 480 | <Default>LightGrey</Default> |
| | 481 | </BorderColor> |
| | 482 | <BorderStyle> |
| | 483 | <Default>Solid</Default> |
| | 484 | </BorderStyle> |
| | 485 | <BorderWidth> |
| | 486 | <Default>0.5pt</Default> |
| | 487 | </BorderWidth> |
| | 488 | <FontSize>9pt</FontSize> |
| | 489 | <Format>C</Format> |
| | 490 | <TextAlign>Center</TextAlign> |
| | 491 | <VerticalAlign>Middle</VerticalAlign> |
| | 492 | <PaddingLeft>2pt</PaddingLeft> |
| | 493 | <PaddingRight>2pt</PaddingRight> |
| | 494 | <PaddingTop>2pt</PaddingTop> |
| | 495 | <PaddingBottom>2pt</PaddingBottom> |
| | 496 | <Language>pl</Language> |
| | 497 | </Style> |
| | 498 | <ZIndex>12</ZIndex> |
| | 499 | <CanGrow>true</CanGrow> |
| | 500 | <Value>=Sum(Fields!Netto.Value)</Value> |
| | 501 | </Textbox> |
| | 502 | </ReportItems> |
| | 503 | </TableCell> |
| | 504 | <TableCell> |
| | 505 | <ReportItems> |
| | 506 | <Textbox Name="textbox8"> |
| | 507 | <Style> |
| | 508 | <BorderColor> |
| | 509 | <Default>LightGrey</Default> |
| | 510 | </BorderColor> |
| | 511 | <BorderStyle> |
| | 512 | <Default>Solid</Default> |
| | 513 | </BorderStyle> |
| | 514 | <BorderWidth> |
| | 515 | <Default>0.5pt</Default> |
| | 516 | </BorderWidth> |
| | 517 | <FontSize>9pt</FontSize> |
| | 518 | <Format>C</Format> |
| | 519 | <TextAlign>Center</TextAlign> |
| | 520 | <VerticalAlign>Middle</VerticalAlign> |
| | 521 | <PaddingLeft>2pt</PaddingLeft> |
| | 522 | <PaddingRight>2pt</PaddingRight> |
| | 523 | <PaddingTop>2pt</PaddingTop> |
| | 524 | <PaddingBottom>2pt</PaddingBottom> |
| | 525 | <Language>pl</Language> |
| | 526 | </Style> |
| | 527 | <ZIndex>11</ZIndex> |
| | 528 | <CanGrow>true</CanGrow> |
| | 529 | <Value>=Sum(Fields!Prowizja.Value)</Value> |
| | 530 | </Textbox> |
| | 531 | </ReportItems> |
| | 532 | </TableCell> |
| | 533 | </TableCells> |
| | 534 | <Height>0.63492cm</Height> |
| | 535 | </TableRow> |
| | 536 | </TableRows> |
| | 537 | </Header> |
| | 538 | </TableGroup> |
| | 539 | </TableGroups> |
| | 540 | <Width>17.77645cm</Width> |
| 394 | | <ReportItems> |
| 395 | | <Textbox Name="Symbol"> |
| 396 | | <rd:DefaultName>Symbol</rd:DefaultName> |
| 397 | | <Style> |
| 398 | | <BorderColor> |
| 399 | | <Default>LightGrey</Default> |
| 400 | | </BorderColor> |
| 401 | | <BorderStyle> |
| 402 | | <Default>Solid</Default> |
| 403 | | </BorderStyle> |
| 404 | | <BorderWidth> |
| 405 | | <Default>0.5pt</Default> |
| 406 | | </BorderWidth> |
| 407 | | <FontSize>9pt</FontSize> |
| 408 | | <TextAlign>Center</TextAlign> |
| 409 | | <VerticalAlign>Middle</VerticalAlign> |
| 410 | | <PaddingLeft>2pt</PaddingLeft> |
| 411 | | <PaddingRight>2pt</PaddingRight> |
| 412 | | <PaddingTop>2pt</PaddingTop> |
| 413 | | <PaddingBottom>2pt</PaddingBottom> |
| 414 | | </Style> |
| 415 | | <ZIndex>6</ZIndex> |
| 416 | | <CanGrow>true</CanGrow> |
| 417 | | <Value>=Fields!agencja.Value</Value> |
| 418 | | </Textbox> |
| 419 | | </ReportItems> |
| 420 | | </TableCell> |
| 421 | | <TableCell> |
| 422 | | <ReportItems> |
| 423 | | <Textbox Name="SYMBOL_AKWIZYTORA"> |
| 424 | | <rd:DefaultName>SYMBOL_AKWIZYTORA</rd:DefaultName> |
| 425 | | <Style> |
| 426 | | <BorderColor> |
| 427 | | <Default>LightGrey</Default> |
| 428 | | </BorderColor> |
| 429 | | <BorderStyle> |
| 430 | | <Default>Solid</Default> |
| 431 | | </BorderStyle> |
| 432 | | <BorderWidth> |
| 433 | | <Default>0.5pt</Default> |
| 434 | | </BorderWidth> |
| 435 | | <FontSize>9pt</FontSize> |
| 436 | | <TextAlign>Center</TextAlign> |
| 437 | | <VerticalAlign>Middle</VerticalAlign> |
| 438 | | <PaddingLeft>2pt</PaddingLeft> |
| 439 | | <PaddingRight>2pt</PaddingRight> |
| 440 | | <PaddingTop>2pt</PaddingTop> |
| 441 | | <PaddingBottom>2pt</PaddingBottom> |
| 442 | | </Style> |
| 443 | | <ZIndex>5</ZIndex> |
| 444 | | <CanGrow>true</CanGrow> |
| 445 | | <Value>=Fields!agent.Value</Value> |
| 446 | | </Textbox> |
| 447 | | </ReportItems> |
| 448 | | </TableCell> |
| 449 | | <TableCell> |
| 450 | | <ReportItems> |
| 451 | | <Textbox Name="IloscFaktur"> |
| 452 | | <Style> |
| 453 | | <BorderColor> |
| 454 | | <Default>LightGrey</Default> |
| 455 | | </BorderColor> |
| 456 | | <BorderStyle> |
| 457 | | <Default>Solid</Default> |
| 458 | | </BorderStyle> |
| 459 | | <BorderWidth> |
| 460 | | <Default>0.5pt</Default> |
| 461 | | </BorderWidth> |
| 462 | | <FontSize>9pt</FontSize> |
| 463 | | <TextAlign>Center</TextAlign> |
| 464 | | <VerticalAlign>Middle</VerticalAlign> |
| 465 | | <PaddingLeft>2pt</PaddingLeft> |
| 466 | | <PaddingRight>2pt</PaddingRight> |
| 467 | | <PaddingTop>2pt</PaddingTop> |
| 468 | | <PaddingBottom>2pt</PaddingBottom> |
| 469 | | </Style> |
| 470 | | <ZIndex>4</ZIndex> |
| 471 | | <CanGrow>true</CanGrow> |
| 472 | | <Value>=Fields!IloscFaktur.Value</Value> |
| 473 | | </Textbox> |
| 474 | | </ReportItems> |
| 475 | | </TableCell> |
| 476 | | <TableCell> |
| 477 | | <ReportItems> |
| 478 | | <Textbox Name="ImiÄ"> |
| 479 | | <rd:DefaultName>ImiÄ</rd:DefaultName> |
| 480 | | <Style> |
| 481 | | <BorderColor> |
| 482 | | <Default>LightGrey</Default> |
| 483 | | </BorderColor> |
| 484 | | <BorderStyle> |
| 485 | | <Default>Solid</Default> |
| 486 | | </BorderStyle> |
| 487 | | <BorderWidth> |
| 488 | | <Default>0.5pt</Default> |
| 489 | | </BorderWidth> |
| 490 | | <FontSize>9pt</FontSize> |
| 491 | | <TextAlign>Center</TextAlign> |
| 492 | | <VerticalAlign>Middle</VerticalAlign> |
| | 546 | <ColSpan>4</ColSpan> |
| | 547 | <ReportItems> |
| | 548 | <Textbox Name="textbox11"> |
| | 549 | <rd:DefaultName>textbox11</rd:DefaultName> |
| | 550 | <Style> |
| | 551 | <BorderColor> |
| | 552 | <Default>LightGrey</Default> |
| | 553 | </BorderColor> |
| | 554 | <BorderWidth> |
| | 555 | <Default>0.5pt</Default> |
| | 556 | </BorderWidth> |
| 873 | | <Textbox Name="textbox8"> |
| 874 | | <rd:DefaultName>textbox8</rd:DefaultName> |
| 875 | | <Style> |
| 876 | | <BorderColor> |
| 877 | | <Default>LightGrey</Default> |
| 878 | | </BorderColor> |
| 879 | | <BorderStyle> |
| 880 | | <Default>Solid</Default> |
| 881 | | </BorderStyle> |
| 882 | | <BorderWidth> |
| 883 | | <Default>0.5pt</Default> |
| 884 | | </BorderWidth> |
| 885 | | <FontSize>9pt</FontSize> |
| 886 | | <TextAlign>Center</TextAlign> |
| 887 | | <VerticalAlign>Middle</VerticalAlign> |
| 888 | | <PaddingLeft>2pt</PaddingLeft> |
| 889 | | <PaddingRight>2pt</PaddingRight> |
| 890 | | <PaddingTop>2pt</PaddingTop> |
| 891 | | <PaddingBottom>2pt</PaddingBottom> |
| 892 | | </Style> |
| 893 | | <ZIndex>12</ZIndex> |
| | 939 | <Textbox Name="textbox20"> |
| | 940 | <rd:DefaultName>textbox20</rd:DefaultName> |
| | 941 | <Style> |
| | 942 | <BorderColor> |
| | 943 | <Default>LightGrey</Default> |
| | 944 | </BorderColor> |
| | 945 | <BorderStyle> |
| | 946 | <Default>Solid</Default> |
| | 947 | </BorderStyle> |
| | 948 | <BorderWidth> |
| | 949 | <Default>0.5pt</Default> |
| | 950 | </BorderWidth> |
| | 951 | <FontSize>9pt</FontSize> |
| | 952 | <TextAlign>Center</TextAlign> |
| | 953 | <VerticalAlign>Middle</VerticalAlign> |
| | 954 | <PaddingLeft>2pt</PaddingLeft> |
| | 955 | <PaddingRight>2pt</PaddingRight> |
| | 956 | <PaddingTop>2pt</PaddingTop> |
| | 957 | <PaddingBottom>2pt</PaddingBottom> |
| | 958 | </Style> |
| | 959 | <ZIndex>9</ZIndex> |
| | 960 | <CanGrow>true</CanGrow> |
| | 961 | <Value /> |
| | 962 | </Textbox> |
| | 963 | </ReportItems> |
| | 964 | </TableCell> |
| | 965 | <TableCell> |
| | 966 | <ReportItems> |
| | 967 | <Textbox Name="textbox36"> |
| | 968 | <Style> |
| | 969 | <BorderColor> |
| | 970 | <Default>LightGrey</Default> |
| | 971 | </BorderColor> |
| | 972 | <BorderStyle> |
| | 973 | <Default>Solid</Default> |
| | 974 | </BorderStyle> |
| | 975 | <BorderWidth> |
| | 976 | <Default>0.5pt</Default> |
| | 977 | </BorderWidth> |
| | 978 | <FontSize>9pt</FontSize> |
| | 979 | <TextAlign>Center</TextAlign> |
| | 980 | <VerticalAlign>Middle</VerticalAlign> |
| | 981 | <PaddingLeft>2pt</PaddingLeft> |
| | 982 | <PaddingRight>2pt</PaddingRight> |
| | 983 | <PaddingTop>2pt</PaddingTop> |
| | 984 | <PaddingBottom>2pt</PaddingBottom> |
| | 985 | </Style> |
| | 986 | <ZIndex>8</ZIndex> |