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