root/trunk/RaportySQL/RankingKlientow.rdl @ 1001

Wersja 145, 23.1 KB (wprowadzona przez dorota, 17 years temu)

stary RankingKlientow? wg daty wystawienia faktury

Line 
1<?xml version="1.0" encoding="utf-8"?>
2<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2005/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
3  <DataSources>
4    <DataSource Name="BAZA_REKLAM">
5      <rd:DataSourceID>6aff36d3-99e3-4498-b130-668a3f7f6816</rd:DataSourceID>
6      <DataSourceReference>BAZA_REKLAM</DataSourceReference>
7    </DataSource>
8  </DataSources>
9  <InteractiveHeight>29.7cm</InteractiveHeight>
10  <ReportParameters>
11    <ReportParameter Name="prawa_agencje">
12      <DataType>String</DataType>
13      <Nullable>true</Nullable>
14      <Prompt>prawa_agencje</Prompt>
15      <Hidden>true</Hidden>
16    </ReportParameter>
17    <ReportParameter Name="rok">
18      <DataType>Integer</DataType>
19      <DefaultValue>
20        <DataSetReference>
21          <DataSetName>ListaLat</DataSetName>
22          <ValueField>ID</ValueField>
23        </DataSetReference>
24      </DefaultValue>
25      <Prompt>rok</Prompt>
26      <ValidValues>
27        <DataSetReference>
28          <DataSetName>ListaLat</DataSetName>
29          <ValueField>ID</ValueField>
30          <LabelField>ID</LabelField>
31        </DataSetReference>
32      </ValidValues>
33    </ReportParameter>
34    <ReportParameter Name="agencja">
35      <DataType>String</DataType>
36      <DefaultValue>
37        <DataSetReference>
38          <DataSetName>listaAgencji</DataSetName>
39          <ValueField>Symbol</ValueField>
40        </DataSetReference>
41      </DefaultValue>
42      <AllowBlank>true</AllowBlank>
43      <Prompt>agencja</Prompt>
44      <ValidValues>
45        <DataSetReference>
46          <DataSetName>listaAgencji</DataSetName>
47          <ValueField>Symbol</ValueField>
48          <LabelField>Symbol</LabelField>
49        </DataSetReference>
50      </ValidValues>
51      <MultiValue>true</MultiValue>
52    </ReportParameter>
53  </ReportParameters>
54  <rd:DrawGrid>true</rd:DrawGrid>
55  <InteractiveWidth>21cm</InteractiveWidth>
56  <rd:GridSpacing>0.25cm</rd:GridSpacing>
57  <rd:SnapToGrid>true</rd:SnapToGrid>
58  <RightMargin>1cm</RightMargin>
59  <LeftMargin>1cm</LeftMargin>
60  <BottomMargin>1cm</BottomMargin>
61  <rd:ReportID>f3f671a1-0511-4033-887b-276f76f5bbdb</rd:ReportID>
62  <PageWidth>21cm</PageWidth>
63  <DataSets>
64    <DataSet Name="RankingKlientow">
65      <Fields>
66        <Field Name="FirstName">
67          <DataField>FirstName</DataField>
68          <rd:TypeName>System.String</rd:TypeName>
69        </Field>
70        <Field Name="Lastname">
71          <DataField>LastName</DataField>
72          <rd:TypeName>System.String</rd:TypeName>
73        </Field>
74        <Field Name="WARTOSC">
75          <DataField>WARTOSC</DataField>
76          <rd:TypeName>System.Decimal</rd:TypeName>
77        </Field>
78        <Field Name="ILOSC">
79          <DataField>ILOSC</DataField>
80          <rd:TypeName>System.Int32</rd:TypeName>
81        </Field>
82        <Field Name="SYMBOL_AKWIZYTORA">
83          <DataField>SYMBOL AKWIZYTORA</DataField>
84          <rd:TypeName>System.String</rd:TypeName>
85        </Field>
86        <Field Name="rok">
87          <DataField>rok</DataField>
88          <rd:TypeName>System.Int32</rd:TypeName>
89        </Field>
90        <Field Name="symbol">
91          <DataField>Symbol</DataField>
92          <rd:TypeName>System.String</rd:TypeName>
93        </Field>
94      </Fields>
95      <Filters>
96        <Filter>
97          <FilterExpression>=Fields!symbol.Value</FilterExpression>
98          <Operator>In</Operator>
99          <FilterValues>
100            <FilterValue>=Parameters!agencja.Value</FilterValue>
101          </FilterValues>
102        </Filter>
103        <Filter>
104          <FilterExpression>=Fields!rok.Value</FilterExpression>
105          <Operator>Equal</Operator>
106          <FilterValues>
107            <FilterValue>=Parameters!rok.Value</FilterValue>
108          </FilterValues>
109        </Filter>
110      </Filters>
111      <Query>
112        <DataSourceName>BAZA_REKLAM</DataSourceName>
113        <CommandText>SELECT     K.FirstName, K.LastName, CONVERT(money, SUM(R.NETTO)) AS WARTOSC, COUNT(*) AS ILOSC, R.[SYMBOL AKWIZYTORA],
114                      YEAR(R.[FAKTURA DATA WYSTAWIENIA]) AS rok, A2.Symbol
115FROM         REKLAMA AS R INNER JOIN
116                      KLIENCI AS K ON R.CustomerID = K.CustomerID INNER JOIN
117                      AGENCI AS A1 ON R.[SYMBOL AKWIZYTORA] = A1.Symbol INNER JOIN
118                      AGENCJE AS A2 ON A1.ID_AGENCJI = A2.Id_agencji
119GROUP BY K.FirstName, K.LastName, R.[SYMBOL AKWIZYTORA], YEAR(R.[FAKTURA DATA WYSTAWIENIA]), A2.Symbol,
120                      R.[ZATWIERDZONO DO DRUKU]
121HAVING      (ABS(R.[ZATWIERDZONO DO DRUKU]) = 1)
122ORDER BY CONVERT(money, SUM(R.NETTO)) DESC</CommandText>
123      </Query>
124    </DataSet>
125    <DataSet Name="listaAgencji">
126      <Fields>
127        <Field Name="Id_agencji">
128          <DataField>Id_agencji</DataField>
129          <rd:TypeName>System.Int32</rd:TypeName>
130        </Field>
131        <Field Name="Symbol">
132          <DataField>Symbol</DataField>
133          <rd:TypeName>System.String</rd:TypeName>
134        </Field>
135      </Fields>
136      <Query>
137        <DataSourceName>BAZA_REKLAM</DataSourceName>
138        <CommandText>SELECT        Id_agencji, Symbol
139FROM            AGENCJE where aktywna=1 and (@prawa_agencje is null or @prawa_agencje= Id_agencji)</CommandText>
140        <QueryParameters>
141          <QueryParameter Name="@prawa_agencje">
142            <Value>=Parameters!prawa_agencje.Value</Value>
143          </QueryParameter>
144        </QueryParameters>
145        <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
146      </Query>
147    </DataSet>
148    <DataSet Name="ListaLat">
149      <Fields>
150        <Field Name="ID">
151          <DataField />
152          <rd:TypeName>System.Int32</rd:TypeName>
153        </Field>
154      </Fields>
155      <Query>
156        <DataSourceName>BAZA_REKLAM</DataSourceName>
157        <CommandText>select distinct(year([data zamówienia])) from reklama where [data zamówienia] is not null and year([data zamówienia])&lt;=2008 order by year([data zamówienia]) desc</CommandText>
158        <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
159      </Query>
160    </DataSet>
161  </DataSets>
162  <Code />
163  <Width>19cm</Width>
164  <Body>
165    <ColumnSpacing>1cm</ColumnSpacing>
166    <ReportItems>
167      <Textbox Name="textbox6">
168        <rd:DefaultName>textbox6</rd:DefaultName>
169        <Top>0.75cm</Top>
170        <Width>18cm</Width>
171        <Style>
172          <Color>Red</Color>
173          <FontSize>8pt</FontSize>
174          <FontWeight>700</FontWeight>
175          <TextAlign>Center</TextAlign>
176          <PaddingLeft>2pt</PaddingLeft>
177          <PaddingRight>2pt</PaddingRight>
178          <PaddingTop>2pt</PaddingTop>
179          <PaddingBottom>2pt</PaddingBottom>
180        </Style>
181        <ZIndex>2</ZIndex>
182        <CanGrow>true</CanGrow>
183        <Left>0.5cm</Left>
184        <Height>0.5cm</Height>
185        <Value>Raport na podstawie reklam do roku 2008.</Value>
186      </Textbox>
187      <Table Name="table1">
188        <ZIndex>1</ZIndex>
189        <DataSetName>RankingKlientow</DataSetName>
190        <Top>1.25cm</Top>
191        <Width>18cm</Width>
192        <Details>
193          <TableRows>
194            <TableRow>
195              <TableCells>
196                <TableCell>
197                  <ReportItems>
198                    <Textbox Name="FirstName">
199                      <rd:DefaultName>FirstName</rd:DefaultName>
200                      <Style>
201                        <BorderColor>
202                          <Default>LightGrey</Default>
203                        </BorderColor>
204                        <BorderStyle>
205                          <Default>Solid</Default>
206                        </BorderStyle>
207                        <BorderWidth>
208                          <Default>0.5pt</Default>
209                        </BorderWidth>
210                        <FontSize>8pt</FontSize>
211                        <TextAlign>Center</TextAlign>
212                        <VerticalAlign>Middle</VerticalAlign>
213                        <PaddingLeft>2pt</PaddingLeft>
214                        <PaddingRight>2pt</PaddingRight>
215                        <PaddingTop>2pt</PaddingTop>
216                        <PaddingBottom>2pt</PaddingBottom>
217                      </Style>
218                      <ZIndex>5</ZIndex>
219                      <CanGrow>true</CanGrow>
220                      <Value>=Fields!FirstName.Value</Value>
221                    </Textbox>
222                  </ReportItems>
223                </TableCell>
224                <TableCell>
225                  <ReportItems>
226                    <Textbox Name="Lastname">
227                      <rd:DefaultName>Lastname</rd:DefaultName>
228                      <Style>
229                        <BorderColor>
230                          <Default>LightGrey</Default>
231                        </BorderColor>
232                        <BorderStyle>
233                          <Default>Solid</Default>
234                        </BorderStyle>
235                        <BorderWidth>
236                          <Default>0.5pt</Default>
237                        </BorderWidth>
238                        <FontSize>8pt</FontSize>
239                        <TextAlign>Center</TextAlign>
240                        <VerticalAlign>Middle</VerticalAlign>
241                        <PaddingLeft>2pt</PaddingLeft>
242                        <PaddingRight>2pt</PaddingRight>
243                        <PaddingTop>2pt</PaddingTop>
244                        <PaddingBottom>2pt</PaddingBottom>
245                      </Style>
246                      <ZIndex>4</ZIndex>
247                      <CanGrow>true</CanGrow>
248                      <Value>=Fields!Lastname.Value</Value>
249                    </Textbox>
250                  </ReportItems>
251                </TableCell>
252                <TableCell>
253                  <ReportItems>
254                    <Textbox Name="WARTOSC">
255                      <rd:DefaultName>WARTOSC</rd:DefaultName>
256                      <Style>
257                        <BorderColor>
258                          <Default>LightGrey</Default>
259                        </BorderColor>
260                        <BorderStyle>
261                          <Default>Solid</Default>
262                        </BorderStyle>
263                        <BorderWidth>
264                          <Default>0.5pt</Default>
265                        </BorderWidth>
266                        <FontSize>8pt</FontSize>
267                        <Format>C</Format>
268                        <TextAlign>Center</TextAlign>
269                        <VerticalAlign>Middle</VerticalAlign>
270                        <PaddingLeft>2pt</PaddingLeft>
271                        <PaddingRight>2pt</PaddingRight>
272                        <PaddingTop>2pt</PaddingTop>
273                        <PaddingBottom>2pt</PaddingBottom>
274                        <Language>pl</Language>
275                      </Style>
276                      <ZIndex>3</ZIndex>
277                      <CanGrow>true</CanGrow>
278                      <Value>=Fields!WARTOSC.Value</Value>
279                    </Textbox>
280                  </ReportItems>
281                </TableCell>
282                <TableCell>
283                  <ReportItems>
284                    <Textbox Name="ILOSC">
285                      <rd:DefaultName>ILOSC</rd:DefaultName>
286                      <Style>
287                        <BorderColor>
288                          <Default>LightGrey</Default>
289                        </BorderColor>
290                        <BorderStyle>
291                          <Default>Solid</Default>
292                        </BorderStyle>
293                        <BorderWidth>
294                          <Default>0.5pt</Default>
295                        </BorderWidth>
296                        <FontSize>8pt</FontSize>
297                        <TextAlign>Center</TextAlign>
298                        <VerticalAlign>Middle</VerticalAlign>
299                        <PaddingLeft>2pt</PaddingLeft>
300                        <PaddingRight>2pt</PaddingRight>
301                        <PaddingTop>2pt</PaddingTop>
302                        <PaddingBottom>2pt</PaddingBottom>
303                      </Style>
304                      <ZIndex>2</ZIndex>
305                      <CanGrow>true</CanGrow>
306                      <Value>=Fields!ILOSC.Value</Value>
307                    </Textbox>
308                  </ReportItems>
309                </TableCell>
310                <TableCell>
311                  <ReportItems>
312                    <Textbox Name="SYMBOL_AKWIZYTORA">
313                      <rd:DefaultName>SYMBOL_AKWIZYTORA</rd:DefaultName>
314                      <Style>
315                        <BorderColor>
316                          <Default>LightGrey</Default>
317                        </BorderColor>
318                        <BorderStyle>
319                          <Default>Solid</Default>
320                        </BorderStyle>
321                        <BorderWidth>
322                          <Default>0.5pt</Default>
323                        </BorderWidth>
324                        <FontSize>8pt</FontSize>
325                        <TextAlign>Center</TextAlign>
326                        <VerticalAlign>Middle</VerticalAlign>
327                        <PaddingLeft>2pt</PaddingLeft>
328                        <PaddingRight>2pt</PaddingRight>
329                        <PaddingTop>2pt</PaddingTop>
330                        <PaddingBottom>2pt</PaddingBottom>
331                      </Style>
332                      <ZIndex>1</ZIndex>
333                      <CanGrow>true</CanGrow>
334                      <Value>=Fields!SYMBOL_AKWIZYTORA.Value</Value>
335                    </Textbox>
336                  </ReportItems>
337                </TableCell>
338                <TableCell>
339                  <ReportItems>
340                    <Textbox Name="symbol">
341                      <rd:DefaultName>symbol</rd:DefaultName>
342                      <Style>
343                        <BorderColor>
344                          <Default>LightGrey</Default>
345                        </BorderColor>
346                        <BorderStyle>
347                          <Default>Solid</Default>
348                        </BorderStyle>
349                        <BorderWidth>
350                          <Default>0.5pt</Default>
351                        </BorderWidth>
352                        <FontSize>8pt</FontSize>
353                        <VerticalAlign>Middle</VerticalAlign>
354                        <PaddingLeft>2pt</PaddingLeft>
355                        <PaddingRight>2pt</PaddingRight>
356                        <PaddingTop>2pt</PaddingTop>
357                        <PaddingBottom>2pt</PaddingBottom>
358                      </Style>
359                      <CanGrow>true</CanGrow>
360                      <Value>=Fields!symbol.Value</Value>
361                    </Textbox>
362                  </ReportItems>
363                </TableCell>
364              </TableCells>
365              <Height>0.63492cm</Height>
366            </TableRow>
367          </TableRows>
368        </Details>
369        <Header>
370          <TableRows>
371            <TableRow>
372              <TableCells>
373                <TableCell>
374                  <ColSpan>2</ColSpan>
375                  <ReportItems>
376                    <Textbox Name="textbox2">
377                      <rd:DefaultName>textbox2</rd:DefaultName>
378                      <Style>
379                        <BackgroundColor>WhiteSmoke</BackgroundColor>
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>8pt</FontSize>
390                        <FontWeight>700</FontWeight>
391                        <TextAlign>Center</TextAlign>
392                        <VerticalAlign>Middle</VerticalAlign>
393                        <PaddingLeft>2pt</PaddingLeft>
394                        <PaddingRight>2pt</PaddingRight>
395                        <PaddingTop>2pt</PaddingTop>
396                        <PaddingBottom>2pt</PaddingBottom>
397                      </Style>
398                      <ZIndex>10</ZIndex>
399                      <CanGrow>true</CanGrow>
400                      <Value>KLIENT</Value>
401                    </Textbox>
402                  </ReportItems>
403                </TableCell>
404                <TableCell>
405                  <ReportItems>
406                    <Textbox Name="textbox4">
407                      <rd:DefaultName>textbox4</rd:DefaultName>
408                      <Style>
409                        <BackgroundColor>WhiteSmoke</BackgroundColor>
410                        <BorderColor>
411                          <Default>LightGrey</Default>
412                        </BorderColor>
413                        <BorderStyle>
414                          <Default>Solid</Default>
415                        </BorderStyle>
416                        <BorderWidth>
417                          <Default>0.5pt</Default>
418                        </BorderWidth>
419                        <FontSize>8pt</FontSize>
420                        <FontWeight>700</FontWeight>
421                        <TextAlign>Center</TextAlign>
422                        <VerticalAlign>Middle</VerticalAlign>
423                        <PaddingLeft>2pt</PaddingLeft>
424                        <PaddingRight>2pt</PaddingRight>
425                        <PaddingTop>2pt</PaddingTop>
426                        <PaddingBottom>2pt</PaddingBottom>
427                      </Style>
428                      <ZIndex>9</ZIndex>
429                      <CanGrow>true</CanGrow>
430                      <Value>WARTOŚĆ</Value>
431                    </Textbox>
432                  </ReportItems>
433                </TableCell>
434                <TableCell>
435                  <ReportItems>
436                    <Textbox Name="textbox11">
437                      <rd:DefaultName>textbox11</rd:DefaultName>
438                      <Style>
439                        <BackgroundColor>WhiteSmoke</BackgroundColor>
440                        <BorderColor>
441                          <Default>LightGrey</Default>
442                        </BorderColor>
443                        <BorderStyle>
444                          <Default>Solid</Default>
445                        </BorderStyle>
446                        <BorderWidth>
447                          <Default>0.5pt</Default>
448                        </BorderWidth>
449                        <FontSize>8pt</FontSize>
450                        <FontWeight>700</FontWeight>
451                        <TextAlign>Center</TextAlign>
452                        <VerticalAlign>Middle</VerticalAlign>
453                        <PaddingLeft>2pt</PaddingLeft>
454                        <PaddingRight>2pt</PaddingRight>
455                        <PaddingTop>2pt</PaddingTop>
456                        <PaddingBottom>2pt</PaddingBottom>
457                      </Style>
458                      <ZIndex>8</ZIndex>
459                      <CanGrow>true</CanGrow>
460                      <Value>ILOŚĆ</Value>
461                    </Textbox>
462                  </ReportItems>
463                </TableCell>
464                <TableCell>
465                  <ReportItems>
466                    <Textbox Name="textbox5">
467                      <rd:DefaultName>textbox5</rd:DefaultName>
468                      <Style>
469                        <BackgroundColor>WhiteSmoke</BackgroundColor>
470                        <BorderColor>
471                          <Default>LightGrey</Default>
472                        </BorderColor>
473                        <BorderStyle>
474                          <Default>Solid</Default>
475                        </BorderStyle>
476                        <BorderWidth>
477                          <Default>0.5pt</Default>
478                        </BorderWidth>
479                        <FontSize>8pt</FontSize>
480                        <FontWeight>700</FontWeight>
481                        <TextAlign>Center</TextAlign>
482                        <VerticalAlign>Middle</VerticalAlign>
483                        <PaddingLeft>2pt</PaddingLeft>
484                        <PaddingRight>2pt</PaddingRight>
485                        <PaddingTop>2pt</PaddingTop>
486                        <PaddingBottom>2pt</PaddingBottom>
487                      </Style>
488                      <ZIndex>7</ZIndex>
489                      <CanGrow>true</CanGrow>
490                      <Value>AGENT</Value>
491                    </Textbox>
492                  </ReportItems>
493                </TableCell>
494                <TableCell>
495                  <ReportItems>
496                    <Textbox Name="textbox3">
497                      <rd:DefaultName>textbox3</rd:DefaultName>
498                      <Style>
499                        <BackgroundColor>WhiteSmoke</BackgroundColor>
500                        <BorderColor>
501                          <Default>LightGrey</Default>
502                        </BorderColor>
503                        <BorderStyle>
504                          <Default>Solid</Default>
505                        </BorderStyle>
506                        <BorderWidth>
507                          <Default>0.5pt</Default>
508                        </BorderWidth>
509                        <FontSize>8pt</FontSize>
510                        <FontWeight>700</FontWeight>
511                        <TextAlign>Center</TextAlign>
512                        <VerticalAlign>Middle</VerticalAlign>
513                        <PaddingLeft>2pt</PaddingLeft>
514                        <PaddingRight>2pt</PaddingRight>
515                        <PaddingTop>2pt</PaddingTop>
516                        <PaddingBottom>2pt</PaddingBottom>
517                      </Style>
518                      <ZIndex>6</ZIndex>
519                      <CanGrow>true</CanGrow>
520                      <Value>AGENCJA</Value>
521                    </Textbox>
522                  </ReportItems>
523                </TableCell>
524              </TableCells>
525              <Height>0.63492cm</Height>
526            </TableRow>
527          </TableRows>
528        </Header>
529        <TableColumns>
530          <TableColumn>
531            <Width>4cm</Width>
532          </TableColumn>
533          <TableColumn>
534            <Width>3.75cm</Width>
535          </TableColumn>
536          <TableColumn>
537            <Width>2.5cm</Width>
538          </TableColumn>
539          <TableColumn>
540            <Width>2.5cm</Width>
541          </TableColumn>
542          <TableColumn>
543            <Width>2.5cm</Width>
544          </TableColumn>
545          <TableColumn>
546            <Width>2.75cm</Width>
547          </TableColumn>
548        </TableColumns>
549        <Left>0.5cm</Left>
550      </Table>
551      <Textbox Name="textbox1">
552        <rd:DefaultName>textbox1</rd:DefaultName>
553        <Width>18cm</Width>
554        <Style>
555          <FontSize>12pt</FontSize>
556          <FontWeight>700</FontWeight>
557          <TextAlign>Center</TextAlign>
558          <PaddingLeft>2pt</PaddingLeft>
559          <PaddingRight>2pt</PaddingRight>
560          <PaddingTop>2pt</PaddingTop>
561          <PaddingBottom>2pt</PaddingBottom>
562        </Style>
563        <CanGrow>true</CanGrow>
564        <Left>0.5cm</Left>
565        <Height>0.63492cm</Height>
566        <Value>RANKING KLIENTÓW - wg daty wystawienia faktury </Value>
567      </Textbox>
568    </ReportItems>
569    <Height>2.51984cm</Height>
570  </Body>
571  <Language>en-US</Language>
572  <TopMargin>1cm</TopMargin>
573  <PageHeight>29.7cm</PageHeight>
574</Report>
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.