1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_report_XReportDefinition_idl__
24#define __com_sun_star_report_XReportDefinition_idl__
25
26#ifndef __com_sun_star_report_XReportComponent_idl__
27#include <com/sun/star/report/XReportComponent.idl>
28#endif
29#ifndef __com_sun_star_report_XFunctionsSupplier_idl__
30#include <com/sun/star/report/XFunctionsSupplier.idl>
31#endif
32#ifndef __com_sun_star_view_PaperOrientation_idl__
33#include <com/sun/star/view/PaperOrientation.idl>
34#endif
35#ifndef __com_sun_star_container_NoSuchElementException_idl__
36#include <com/sun/star/container/NoSuchElementException.idl>
37#endif
38#ifndef __com_sun_star_style_GraphicLocation_idl__
39#include <com/sun/star/style/GraphicLocation.idl>
40#endif
41#ifndef __com_sun_star_view_PaperFormat_idl__
42#include <com/sun/star/view/PaperFormat.idl>
43#endif
44#ifndef __com_sun_star_util_XClosable_idl__
45#include <com/sun/star/util/XCloseable.idl>
46#endif
47#ifndef __com_sun_star_ui_XUIConfigurationManagerSupplier_idl__
48#include <com/sun/star/ui/XUIConfigurationManagerSupplier.idl>
49#endif
50#ifndef __com_sun_star_document_XDocumentSubStorageSupplier_idl__
51#include <com/sun/star/document/XDocumentSubStorageSupplier.idl>
52#endif
53#ifndef __com_sun_star_frame_XModel_idl__
54#include <com/sun/star/frame/XModel.idl>
55#endif
56#ifndef __com_sun_star_document_XViewDataSupplier_idl__
57#include <com/sun/star/document/XViewDataSupplier.idl>
58#endif
59#ifndef __com_sun_star_frame_XLoadable_idl__
60#include <com/sun/star/frame/XLoadable.idl>
61#endif
62#ifndef __com_sun_star_embed_XVisualObject_idl__
63#include <com/sun/star/embed/XVisualObject.idl>
64#endif
65#ifndef __com_sun_star_embed_XStorageBasedDocument_idl__
66#include <com/sun/star/document/XStorageBasedDocument.idl>
67#endif
68#ifndef __com_sun_star_awt_Size_idl__
69#include <com/sun/star/awt/Size.idl>
70#endif
71#ifndef __com_sun_star_util_XModifiable2_idl__
72#include <com/sun/star/util/XModifiable2.idl>
73#endif
74#ifndef __com_sun_star_document_XEventBroadcaster_idl__
75#include <com/sun/star/document/XEventBroadcaster.idl>
76#endif
77#ifndef __com_sun_star_lang_DisposedException_idl__
78#include <com/sun/star/lang/DisposedException.idl>
79#endif
80#ifndef __com_sun_star_style_XStyleFamiliesSupplier_idl__
81#include <com/sun/star/style/XStyleFamiliesSupplier.idl>
82#endif
83
84module com {  module sun {  module star {  module sdbc {
85published interface XConnection;
86};};};};
87//=============================================================================
88
89 module com {  module sun {  module star {  module report {
90
91     published interface XSection;
92     published interface XGroups;
93//=============================================================================
94
95/** identifies a <type>XReportComponent</type> as being a (sub-) report.
96
97    <p>This interface does not really provide an own functionality, it is only for easier
98    runtime identification of report components.</p>
99
100    <p>A report fulfills several tasks, like storing the structure of its
101    report components and it provides the
102    event environment for its contained elements.</p>
103
104    @see XReportComponent
105 */
106published interface XReportDefinition
107{
108    /** allows the access to the model embedded in the database storage.
109    */
110    interface com::sun::star::frame::XModel;
111
112    /** offers a simple way to initialize a component.
113    */
114    interface com::sun::star::frame::XLoadable;
115
116    /** represents common visualisation functionality for the embedded report.
117    */
118    interface com::sun::star::embed::XVisualObject;
119
120    /** allows to initialize the document with a storage.
121    */
122    interface com::sun::star::document::XStorageBasedDocument;
123
124    /** gives access to some properties describing all open views to a document.
125    */
126    interface com::sun::star::document::XViewDataSupplier;
127
128    /** allows to close the document.
129    */
130    interface com::sun::star::util::XCloseable;
131
132    /** allows to retrieve the user interface configuration manager related to an object.
133    */
134    interface com::sun::star::ui::XUIConfigurationManagerSupplier;
135
136    interface com::sun::star::document::XDocumentSubStorageSupplier;
137
138    /** provides access to the collection of style families.
139
140        <p>A spreadsheet document contains 2 families of styles:
141        "PageStyles" and "CellStyles".</p>
142     */
143    interface com::sun::star::style::XStyleFamiliesSupplier;
144
145    //-------------------------------------------------------------------------
146    /** a storable document should provide information about his modify state
147
148        <p>
149        With this interface it's possible too, to reset the modify state.
150        That can be neccessary to prevent code against problem during closing
151        of the document without saving any changes.
152        </p>
153     */
154    interface com::sun::star::util::XModifiable2;
155
156    /** allows the creation of sub reports.
157    */
158    interface XReportComponent;
159
160    /** gives access to functions defined in the report definition.
161    */
162    interface XFunctionsSupplier;
163
164    /** makes it possible to register listeners which are called whenever
165        a document event occurs.
166        This is a workaround due to the fact that this interface can not be directly inherited from <type scope="com::sun::star::document">XEventBroadcaster</type>
167        because the methods addEventListener and removeEventListener are already defined in <type scope="com::sun::star::lang">XComponent</type>.
168        A queryInterface call is still supported to the <type scope="com::sun::star::document">XEventBroadcaster</type> interface.
169     */
170    com::sun::star::document::XEventBroadcaster getEventBroadcaster()
171        raises( ::com::sun::star::lang::DisposedException,
172                ::com::sun::star::uno::Exception );
173
174    /** returns a sequence of the currently supported output formats.
175    */
176    sequence<string> getAvailableMimeTypes()
177        raises( ::com::sun::star::lang::DisposedException,
178                ::com::sun::star::uno::Exception );
179
180    //-------------------------------------------------------------------------
181
182    /** Represents the output format (media (mime) type) of the resulting document when executing this report.
183    */
184    [attribute,bound] string MimeType
185    {
186        set raises (com::sun::star::lang::IllegalArgumentException);
187    };
188
189    /** Represents the title of the report in print preview.
190    */
191    [attribute,bound] string Caption;
192
193    /** Specifies whether groups in a multi column report are kept together.
194        @see com.sun.star.report.GroupKeepTogether
195    */
196    [attribute,bound] short GroupKeepTogether
197    {
198        set raises (com::sun::star::lang::IllegalArgumentException);
199    };
200
201    /** Represents the location of the page header.
202        @see ReportPrintOption
203    */
204    [attribute,bound] short PageHeaderOption;
205
206    /** Represents the location of the page footer.
207        @see ReportPrintOption
208    */
209    [attribute,bound] short PageFooterOption;
210
211
212    /** is the command which should be executed, the type of command depends
213    on the CommandType.
214    <p>In case of a <member>CommandType</member> of <member>CommandType::COMMAND</member>,
215    means in case the <member>Command</member> specifies an SQL statement, the inherited
216    <member scope="com::sun::star::sdbc">RowSet::EscapeProcessing</member>
217    becomes relevant:<br/>
218    It then can be to used to specify whether the SQL statement should be analyzed on the
219    client side before sending it to the database server.<br/>
220    The default value for <member scope="com::sun::star::sdbc">RowSet::EscapeProcessing</member>
221    is <TRUE/>. By switching it to <FALSE/>, you can pass backend-specific SQL statements,
222    which are not standard SQL, to your database.</p>
223
224
225    @see com::sun::star::sdb::CommandType
226    */
227    [attribute,bound] string Command;
228
229    /** specifies the type of the command to be executed to retrieve a result set.
230
231        <p><member>Command</member> needs to be interpreted depending on the value of this property.</p>
232
233        <p>This property is only meaningfull together with the <member>Command</member>
234        property, thus either <em>both</em> or <em>none</em> of them are present.</p>
235
236        @see com::sun::star::sdb::CommandType
237     */
238    [attribute,bound] long CommandType;
239
240    /** specifies an addtional filter to optinally use.
241
242        <p>The Filter string has to form a SQL WHERE-clause, <em>without</em> the WHERE-string itself.</p>
243
244        <p>If a <member>DataSourceName</member>, <member>Command</member> and <member>CommandType</member>
245        are specified, a <type>RowSet</type> can be created with this information. If the results provided by the
246        row set are to be additionally filtered, the Filter property can be used.</p>
247
248        <p>Note that the Filter property does not make sense if a <member>ResultSet</member> has been specified
249        in the DataAccessDescriptor.</p>
250
251        @see com::sun::star::sdb::RowSet
252        @see ResultSet
253    */
254    [attribute,bound] string Filter;
255
256    /** specifies if the <member>Command</member> should be analyzed on the client side before sending it
257        to the database server.
258
259        <p>The default value of this property is <TRUE/>. By switching it to <FALSE/>, you can pass
260        backend-specific SQL statements, which are not standard SQL, to your database.</p>
261
262        <p>This property is usually present together with the <member>Command</member> and
263        <member>CommandType</member> properties, and is evaluated if and only if <member>CommandType</member>
264        equals <member>CommandType::COMMAND</member>.</p>
265    */
266    [attribute,bound] boolean EscapeProcessing;
267
268    /** specifies the active connection which is used to create the resulting report.
269    */
270    [attribute,bound] com::sun::star::sdbc::XConnection ActiveConnection
271    {
272        set raises (com::sun::star::lang::IllegalArgumentException);
273    };
274
275    /** is the name of the datasource to use, this could be a named datasource
276        or the URL of a data access component.
277     */
278    [attribute,bound] string DataSourceName;
279
280    /** Defines that the report header is on.
281        Default is <FALSE/>.
282    */
283    [attribute,bound] boolean ReportHeaderOn;
284
285    /** Defines that the report footer is on.
286        Default is <FALSE/>.
287    */
288    [attribute,bound] boolean ReportFooterOn;
289
290    /** Defines that the page header is on.
291        Default is <TRUE/>.
292    */
293    [attribute,bound] boolean PageHeaderOn;
294
295    /** Defines that the page footer is on.
296        Default is <TRUE/>.
297    */
298    [attribute,bound] boolean PageFooterOn;
299
300    /** Represents the groups of the report.
301    */
302    [attribute,readonly] com::sun::star::report::XGroups Groups;
303
304    /** returns the report header if the <member>ReportHeaderOn</member>is <TRUE/>.
305        @throws <type scope="com::sun::star::container">NoSuchElementException</type>
306            If the report has the report header disabled.
307        @see XSection
308    */
309    [attribute,readonly] com::sun::star::report::XSection ReportHeader
310    {
311        get raises (com::sun::star::container::NoSuchElementException);
312    };
313
314    /** returns the page header if the <member>PageHeaderOn</member>is <TRUE/>.
315        @throws <type scope="com::sun::star::container">NoSuchElementException</type>
316            If the report has the page header disabled.
317        @see XSection
318    */
319    [attribute,readonly] com::sun::star::report::XSection PageHeader
320    {
321        get raises (com::sun::star::container::NoSuchElementException);
322    };
323
324    /** returns the detail section.
325        @see XSection
326    */
327    [attribute,readonly] com::sun::star::report::XSection Detail;
328
329    /** returns the page footer if the <member>PageFooterOn</member>is <TRUE/>.
330        @throws <type scope="com::sun::star::container">NoSuchElementException</type>
331            If the report has the page footer disabled.
332        @see XSection
333    */
334    [attribute,readonly] com::sun::star::report::XSection PageFooter
335    {
336        get raises (com::sun::star::container::NoSuchElementException);
337    };
338
339    /** returns the report footer if the <member>ReportFooterOn</member>is <TRUE/>.
340        @throws <type scope="com::sun::star::container">NullPointerException</type>
341            If the report has the report footer disabled.
342        @see XSection
343    */
344    [attribute,readonly] com::sun::star::report::XSection ReportFooter
345    {
346        get raises (com::sun::star::container::NoSuchElementException);
347    };
348};
349
350published service ReportDefinition : XReportDefinition;
351//=============================================================================
352
353}; }; }; };
354
355/*=============================================================================
356
357=============================================================================*/
358#endif
359