root/trunk/RaportySQL/IloscOgloszen.rdl @ 972

Wersja 906, 19.2 KB (wprowadzona przez sylwek, 16 years temu)

Re #228 Zatwierdzenie blokowane przez skrypt pre-commit (kod wyjścia 1) z wyjściem

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>ce992e3a-ee47-4a43-9ee2-2f96c0fa4b24</rd:DataSourceID>
6      <DataSourceReference>BAZA_REKLAM</DataSourceReference>
7    </DataSource>
8  </DataSources>
9  <InteractiveHeight>11in</InteractiveHeight>
10  <ReportParameters>
11    <ReportParameter Name="tytul">
12      <DataType>Integer</DataType>
13      <DefaultValue>
14        <DataSetReference>
15          <DataSetName>Tytuly</DataSetName>
16          <ValueField>TYTUŁ_NR</ValueField>
17        </DataSetReference>
18      </DefaultValue>
19      <Prompt>Tytuł</Prompt>
20      <ValidValues>
21        <DataSetReference>
22          <DataSetName>Tytuly</DataSetName>
23          <ValueField>TYTUŁ_NR</ValueField>
24          <LabelField>TYTUŁ_TXT</LabelField>
25        </DataSetReference>
26      </ValidValues>
27    </ReportParameter>
28    <ReportParameter Name="wydanie">
29      <DataType>String</DataType>
30      <Prompt>Wydanie</Prompt>
31    </ReportParameter>
32  </ReportParameters>
33  <rd:DrawGrid>true</rd:DrawGrid>
34  <InteractiveWidth>8.5in</InteractiveWidth>
35  <rd:GridSpacing>0.25cm</rd:GridSpacing>
36  <rd:SnapToGrid>true</rd:SnapToGrid>
37  <RightMargin>1.5cm</RightMargin>
38  <LeftMargin>1.5cm</LeftMargin>
39  <BottomMargin>1.5cm</BottomMargin>
40  <rd:ReportID>e1bb9641-732d-4c7c-8003-91c70a6052b1</rd:ReportID>
41  <PageWidth>21cm</PageWidth>
42  <DataSets>
43    <DataSet Name="BAZA_REKLAM">
44      <Fields>
45        <Field Name="DZIAŁ_TXT">
46          <DataField>DZIAŁ_TXT</DataField>
47          <rd:TypeName>System.String</rd:TypeName>
48        </Field>
49        <Field Name="ROZDZIAŁ_TXT">
50          <DataField>ROZDZIAŁ_TXT</DataField>
51          <rd:TypeName>System.String</rd:TypeName>
52        </Field>
53        <Field Name="sort_dzial">
54          <DataField>sort_dzial</DataField>
55          <rd:TypeName>System.Int16</rd:TypeName>
56        </Field>
57        <Field Name="sort_rozdzial">
58          <DataField>sort_rozdzial</DataField>
59          <rd:TypeName>System.Int16</rd:TypeName>
60        </Field>
61        <Field Name="n">
62          <DataField>n</DataField>
63          <rd:TypeName>System.Int32</rd:TypeName>
64        </Field>
65      </Fields>
66      <Query>
67        <DataSourceName>BAZA_REKLAM</DataSourceName>
68        <CommandText>SELECT DZIAŁ_TXT, ROZDZIAŁ_TXT, sort_dzial, sort_rozdzial, COUNT(*) AS n
69FROM
70( SELECT dz.DZIAŁ_TXT, rozdz.ROZDZIAŁ_TXT,
71  (case when rozdz.Podzial_Na_Marki = 1 and dz.Podzial_Na_Marki = 1 then dd.Marka else '-' end) AS marka,
72  dz.[Sort_Order] as sort_dzial, rozdz.SORT_ORDER as sort_rozdzial
73  FROM (
74     SELECT * FROM DANE_OGL_SQL..DANE WHERE NR_WYDANIA&lt;=@wydanie AND OGL_TYTUL=@tytul AND (NR_WYDANIA+krotnosc)&gt;@wydanie AND WSTRZYMANE=0 AND DELETED=0
75   ) dd
76  INNER JOIN DANE_OGL_SQL..OGL_DZIAŁ dz ON dd.OGL_TYTUL = dz.TYTUL AND dd.OGL_DZIAL = dz.DZIAŁ_NR
77  INNER JOIN DANE_OGL_SQL..OGL_ROZDZIAŁ rozdz ON dd.OGL_TYTUL = rozdz.TYTUŁ AND dd.OGL_ROZDZ = rozdz.ROZDZIAŁ_NR
78) sel1
79GROUP BY DZIAŁ_TXT, ROZDZIAŁ_TXT, sort_dzial, sort_rozdzial
80ORDER BY sort_dzial, sort_rozdzial;</CommandText>
81        <QueryParameters>
82          <QueryParameter Name="@wydanie">
83            <Value>=Parameters!wydanie.Value</Value>
84          </QueryParameter>
85          <QueryParameter Name="@tytul">
86            <Value>=Parameters!tytul.Value</Value>
87          </QueryParameter>
88        </QueryParameters>
89        <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
90      </Query>
91    </DataSet>
92    <DataSet Name="Tytuly">
93      <Fields>
94        <Field Name="TYTUŁ_NR">
95          <DataField>TYTUŁ_NR</DataField>
96          <rd:TypeName>System.Int16</rd:TypeName>
97        </Field>
98        <Field Name="TYTUŁ_TXT">
99          <DataField>TYTUŁ_TXT</DataField>
100          <rd:TypeName>System.String</rd:TypeName>
101        </Field>
102      </Fields>
103      <Query>
104        <DataSourceName>BAZA_REKLAM</DataSourceName>
105        <CommandText>SELECT TYTUŁ_NR, TYTUŁ_TXT FROM DANE_OGL_SQL..TYTUŁY WHERE Aktywny&lt;&gt;0 ORDER BY TYTUŁ_TXT</CommandText>
106        <rd:UseGenericDesigner>true</rd:UseGenericDesigner>
107      </Query>
108    </DataSet>
109  </DataSets>
110  <Width>14.75cm</Width>
111  <Body>
112    <ColumnSpacing>1cm</ColumnSpacing>
113    <ReportItems>
114      <Textbox Name="textbox1">
115        <rd:DefaultName>textbox1</rd:DefaultName>
116        <Style>
117          <FontFamily>Tahoma</FontFamily>
118          <FontSize>14pt</FontSize>
119          <FontWeight>700</FontWeight>
120          <TextAlign>Center</TextAlign>
121          <PaddingLeft>2pt</PaddingLeft>
122          <PaddingRight>2pt</PaddingRight>
123          <PaddingTop>2pt</PaddingTop>
124          <PaddingBottom>2pt</PaddingBottom>
125        </Style>
126        <ZIndex>1</ZIndex>
127        <CanGrow>true</CanGrow>
128        <Height>0.75cm</Height>
129        <Value>="Ilość ogłoszeń w wydaniu " + Parameters!tytul.Label + " " + Parameters!wydanie.Value</Value>
130      </Textbox>
131      <Table Name="table1">
132        <DataSetName>BAZA_REKLAM</DataSetName>
133        <Top>1.25cm</Top>
134        <TableGroups>
135          <TableGroup>
136            <Grouping Name="table1_DZIAŁ_TXT">
137              <GroupExpressions>
138                <GroupExpression>=Fields!DZIAŁ_TXT.Value</GroupExpression>
139              </GroupExpressions>
140            </Grouping>
141            <Sorting>
142              <SortBy>
143                <SortExpression>=Fields!DZIAŁ_TXT.Value</SortExpression>
144                <Direction>Ascending</Direction>
145              </SortBy>
146            </Sorting>
147            <Header>
148              <TableRows>
149                <TableRow>
150                  <TableCells>
151                    <TableCell>
152                      <ColSpan>2</ColSpan>
153                      <ReportItems>
154                        <Textbox Name="DZIAŁ_TXTtextbox">
155                          <Style>
156                            <BackgroundColor>WhiteSmoke</BackgroundColor>
157                            <BorderColor>
158                              <Default>LightGrey</Default>
159                            </BorderColor>
160                            <BorderStyle>
161                              <Default>Solid</Default>
162                            </BorderStyle>
163                            <FontSize>9pt</FontSize>
164                            <FontWeight>700</FontWeight>
165                            <VerticalAlign>Middle</VerticalAlign>
166                            <PaddingLeft>2pt</PaddingLeft>
167                            <PaddingRight>2pt</PaddingRight>
168                            <PaddingTop>2pt</PaddingTop>
169                            <PaddingBottom>2pt</PaddingBottom>
170                          </Style>
171                          <ZIndex>7</ZIndex>
172                          <CanGrow>true</CanGrow>
173                          <Value>=Fields!DZIAŁ_TXT.Value</Value>
174                        </Textbox>
175                      </ReportItems>
176                    </TableCell>
177                    <TableCell>
178                      <ReportItems>
179                        <Textbox Name="textbox10">
180                          <rd:DefaultName>textbox10</rd:DefaultName>
181                          <Style>
182                            <BackgroundColor>WhiteSmoke</BackgroundColor>
183                            <BorderColor>
184                              <Default>LightGrey</Default>
185                            </BorderColor>
186                            <BorderStyle>
187                              <Default>Solid</Default>
188                            </BorderStyle>
189                            <FontSize>9pt</FontSize>
190                            <FontWeight>700</FontWeight>
191                            <Format>N0</Format>
192                            <VerticalAlign>Middle</VerticalAlign>
193                            <PaddingLeft>2pt</PaddingLeft>
194                            <PaddingRight>2pt</PaddingRight>
195                            <PaddingTop>2pt</PaddingTop>
196                            <PaddingBottom>2pt</PaddingBottom>
197                          </Style>
198                          <ZIndex>6</ZIndex>
199                          <CanGrow>true</CanGrow>
200                          <Value>=SUM(Fields!n.Value)</Value>
201                        </Textbox>
202                      </ReportItems>
203                    </TableCell>
204                  </TableCells>
205                  <Height>0.75cm</Height>
206                </TableRow>
207              </TableRows>
208            </Header>
209          </TableGroup>
210        </TableGroups>
211        <Width>12.75001cm</Width>
212        <Details>
213          <TableRows>
214            <TableRow>
215              <TableCells>
216                <TableCell>
217                  <ReportItems>
218                    <Textbox Name="DZIAŁ_TXT">
219                      <rd:DefaultName>DZIAŁ_TXT</rd:DefaultName>
220                      <HideDuplicates>BAZA_REKLAM</HideDuplicates>
221                      <Style>
222                        <BorderColor>
223                          <Default>LightGrey</Default>
224                        </BorderColor>
225                        <FontSize>9pt</FontSize>
226                        <VerticalAlign>Middle</VerticalAlign>
227                        <PaddingLeft>2pt</PaddingLeft>
228                        <PaddingRight>2pt</PaddingRight>
229                        <PaddingTop>2pt</PaddingTop>
230                        <PaddingBottom>2pt</PaddingBottom>
231                      </Style>
232                      <ZIndex>2</ZIndex>
233                      <CanGrow>true</CanGrow>
234                      <Value />
235                    </Textbox>
236                  </ReportItems>
237                </TableCell>
238                <TableCell>
239                  <ReportItems>
240                    <Textbox Name="ROZDZIAŁ_TXT">
241                      <rd:DefaultName>ROZDZIAŁ_TXT</rd:DefaultName>
242                      <Style>
243                        <BorderColor>
244                          <Default>LightGrey</Default>
245                        </BorderColor>
246                        <BorderStyle>
247                          <Default>Solid</Default>
248                        </BorderStyle>
249                        <FontSize>9pt</FontSize>
250                        <VerticalAlign>Middle</VerticalAlign>
251                        <PaddingLeft>2pt</PaddingLeft>
252                        <PaddingRight>2pt</PaddingRight>
253                        <PaddingTop>2pt</PaddingTop>
254                        <PaddingBottom>2pt</PaddingBottom>
255                      </Style>
256                      <ZIndex>1</ZIndex>
257                      <CanGrow>true</CanGrow>
258                      <Value>=Fields!ROZDZIAŁ_TXT.Value</Value>
259                    </Textbox>
260                  </ReportItems>
261                </TableCell>
262                <TableCell>
263                  <ReportItems>
264                    <Textbox Name="n">
265                      <rd:DefaultName>n</rd:DefaultName>
266                      <Style>
267                        <BorderColor>
268                          <Default>LightGrey</Default>
269                        </BorderColor>
270                        <BorderStyle>
271                          <Default>Solid</Default>
272                        </BorderStyle>
273                        <FontSize>9pt</FontSize>
274                        <Format>N0</Format>
275                        <VerticalAlign>Middle</VerticalAlign>
276                        <PaddingLeft>2pt</PaddingLeft>
277                        <PaddingRight>2pt</PaddingRight>
278                        <PaddingTop>2pt</PaddingTop>
279                        <PaddingBottom>2pt</PaddingBottom>
280                      </Style>
281                      <CanGrow>true</CanGrow>
282                      <Value>=Fields!n.Value</Value>
283                    </Textbox>
284                  </ReportItems>
285                </TableCell>
286              </TableCells>
287              <Height>0.6cm</Height>
288            </TableRow>
289          </TableRows>
290          <Visibility>
291            <Hidden>true</Hidden>
292            <ToggleItem>DZIAŁ_TXTtextbox</ToggleItem>
293          </Visibility>
294        </Details>
295        <Header>
296          <TableRows>
297            <TableRow>
298              <TableCells>
299                <TableCell>
300                  <ReportItems>
301                    <Textbox Name="textbox2">
302                      <rd:DefaultName>textbox2</rd:DefaultName>
303                      <Style>
304                        <BackgroundColor>Gainsboro</BackgroundColor>
305                        <BorderColor>
306                          <Default>LightGrey</Default>
307                        </BorderColor>
308                        <BorderStyle>
309                          <Default>Solid</Default>
310                        </BorderStyle>
311                        <FontSize>11pt</FontSize>
312                        <FontWeight>700</FontWeight>
313                        <VerticalAlign>Middle</VerticalAlign>
314                        <PaddingLeft>2pt</PaddingLeft>
315                        <PaddingRight>2pt</PaddingRight>
316                        <PaddingTop>2pt</PaddingTop>
317                        <PaddingBottom>2pt</PaddingBottom>
318                      </Style>
319                      <ZIndex>10</ZIndex>
320                      <CanGrow>true</CanGrow>
321                      <Value>Dział</Value>
322                    </Textbox>
323                  </ReportItems>
324                </TableCell>
325                <TableCell>
326                  <ReportItems>
327                    <Textbox Name="textbox3">
328                      <rd:DefaultName>textbox3</rd:DefaultName>
329                      <Style>
330                        <BackgroundColor>Gainsboro</BackgroundColor>
331                        <BorderColor>
332                          <Default>LightGrey</Default>
333                        </BorderColor>
334                        <BorderStyle>
335                          <Default>Solid</Default>
336                        </BorderStyle>
337                        <FontSize>11pt</FontSize>
338                        <FontWeight>700</FontWeight>
339                        <VerticalAlign>Middle</VerticalAlign>
340                        <PaddingLeft>2pt</PaddingLeft>
341                        <PaddingRight>2pt</PaddingRight>
342                        <PaddingTop>2pt</PaddingTop>
343                        <PaddingBottom>2pt</PaddingBottom>
344                      </Style>
345                      <ZIndex>9</ZIndex>
346                      <CanGrow>true</CanGrow>
347                      <Value>Rozdział</Value>
348                    </Textbox>
349                  </ReportItems>
350                </TableCell>
351                <TableCell>
352                  <ReportItems>
353                    <Textbox Name="textbox4">
354                      <rd:DefaultName>textbox4</rd:DefaultName>
355                      <Style>
356                        <BackgroundColor>Gainsboro</BackgroundColor>
357                        <BorderColor>
358                          <Default>LightGrey</Default>
359                        </BorderColor>
360                        <BorderStyle>
361                          <Default>Solid</Default>
362                        </BorderStyle>
363                        <FontSize>11pt</FontSize>
364                        <FontWeight>700</FontWeight>
365                        <TextAlign>Center</TextAlign>
366                        <VerticalAlign>Middle</VerticalAlign>
367                        <PaddingLeft>2pt</PaddingLeft>
368                        <PaddingRight>2pt</PaddingRight>
369                        <PaddingTop>2pt</PaddingTop>
370                        <PaddingBottom>2pt</PaddingBottom>
371                      </Style>
372                      <ZIndex>8</ZIndex>
373                      <CanGrow>true</CanGrow>
374                      <Value>ilość</Value>
375                    </Textbox>
376                  </ReportItems>
377                </TableCell>
378              </TableCells>
379              <Height>0.55873cm</Height>
380            </TableRow>
381          </TableRows>
382          <RepeatOnNewPage>true</RepeatOnNewPage>
383        </Header>
384        <TableColumns>
385          <TableColumn>
386            <Width>2.32509cm</Width>
387          </TableColumn>
388          <TableColumn>
389            <Width>8.68743cm</Width>
390          </TableColumn>
391          <TableColumn>
392            <Width>1.73749cm</Width>
393          </TableColumn>
394        </TableColumns>
395        <Footer>
396          <TableRows>
397            <TableRow>
398              <TableCells>
399                <TableCell>
400                  <ReportItems>
401                    <Textbox Name="textbox5">
402                      <rd:DefaultName>textbox5</rd:DefaultName>
403                      <Style>
404                        <FontSize>9pt</FontSize>
405                        <PaddingLeft>2pt</PaddingLeft>
406                        <PaddingRight>2pt</PaddingRight>
407                        <PaddingTop>2pt</PaddingTop>
408                        <PaddingBottom>2pt</PaddingBottom>
409                      </Style>
410                      <ZIndex>5</ZIndex>
411                      <CanGrow>true</CanGrow>
412                      <Value />
413                    </Textbox>
414                  </ReportItems>
415                </TableCell>
416                <TableCell>
417                  <ReportItems>
418                    <Textbox Name="textbox6">
419                      <rd:DefaultName>textbox6</rd:DefaultName>
420                      <Style>
421                        <FontSize>9pt</FontSize>
422                        <PaddingLeft>2pt</PaddingLeft>
423                        <PaddingRight>2pt</PaddingRight>
424                        <PaddingTop>2pt</PaddingTop>
425                        <PaddingBottom>2pt</PaddingBottom>
426                      </Style>
427                      <ZIndex>4</ZIndex>
428                      <CanGrow>true</CanGrow>
429                      <Value />
430                    </Textbox>
431                  </ReportItems>
432                </TableCell>
433                <TableCell>
434                  <ReportItems>
435                    <Textbox Name="textbox7">
436                      <rd:DefaultName>textbox7</rd:DefaultName>
437                      <Style>
438                        <BackgroundColor>LightGrey</BackgroundColor>
439                        <BorderColor>
440                          <Default>LightGrey</Default>
441                        </BorderColor>
442                        <BorderStyle>
443                          <Default>Solid</Default>
444                        </BorderStyle>
445                        <FontSize>9pt</FontSize>
446                        <FontWeight>800</FontWeight>
447                        <Format>N0</Format>
448                        <PaddingLeft>2pt</PaddingLeft>
449                        <PaddingRight>2pt</PaddingRight>
450                        <PaddingTop>2pt</PaddingTop>
451                        <PaddingBottom>2pt</PaddingBottom>
452                      </Style>
453                      <ZIndex>3</ZIndex>
454                      <CanGrow>true</CanGrow>
455                      <Value>=SUM(Fields!n.Value)</Value>
456                    </Textbox>
457                  </ReportItems>
458                </TableCell>
459              </TableCells>
460              <Height>0.75cm</Height>
461            </TableRow>
462          </TableRows>
463        </Footer>
464        <Left>1cm</Left>
465      </Table>
466    </ReportItems>
467    <Height>3.90873cm</Height>
468  </Body>
469  <Language>pl-PL</Language>
470  <TopMargin>1.5cm</TopMargin>
471  <PageHeight>29.7cm</PageHeight>
472</Report>
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.