xref: /AOO41X/main/offapi/com/sun/star/report/XReportComponent.idl (revision d1766043198e81d0bcfc626e12893e7b4d7e31ca)
1*d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3*d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4*d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5*d1766043SAndrew Rist * distributed with this work for additional information
6*d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7*d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8*d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9*d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir *
11*d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13*d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14*d1766043SAndrew Rist * software distributed under the License is distributed on an
15*d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17*d1766043SAndrew Rist * specific language governing permissions and limitations
18*d1766043SAndrew Rist * under the License.
19cdf0e10cSrcweir *
20*d1766043SAndrew Rist *************************************************************/
21*d1766043SAndrew Rist
22*d1766043SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_report_XReportComponent_idl__
24cdf0e10cSrcweir#define __com_sun_star_report_XReportComponent_idl__
25cdf0e10cSrcweir
26cdf0e10cSrcweir#ifndef __com_sun_star_container_XChild_idl__
27cdf0e10cSrcweir#include <com/sun/star/container/XChild.idl>
28cdf0e10cSrcweir#endif
29cdf0e10cSrcweir
30cdf0e10cSrcweir#ifndef __com_sun_star_lang_XComponent_idl__
31cdf0e10cSrcweir#include <com/sun/star/lang/XComponent.idl>
32cdf0e10cSrcweir#endif
33cdf0e10cSrcweir
34cdf0e10cSrcweir#ifndef __com_sun_star_container_XNamed_idl__
35cdf0e10cSrcweir#include <com/sun/star/container/XNamed.idl>
36cdf0e10cSrcweir#endif
37cdf0e10cSrcweir
38cdf0e10cSrcweir#ifndef __com_sun_star_beans_XPropertySet_idl__
39cdf0e10cSrcweir#include <com/sun/star/beans/XPropertySet.idl>
40cdf0e10cSrcweir#endif
41cdf0e10cSrcweir#ifndef __com_sun_star_util_XCloneable_idl__
42cdf0e10cSrcweir#include <com/sun/star/util/XCloneable.idl>
43cdf0e10cSrcweir#endif
44cdf0e10cSrcweir#ifndef __com_sun_star_awt_XControlModel_idl__
45cdf0e10cSrcweir#include <com/sun/star/awt/XControlModel.idl>
46cdf0e10cSrcweir#endif
47cdf0e10cSrcweir#ifndef __com_sun_star_drawing_XShape_idl__
48cdf0e10cSrcweir#include <com/sun/star/drawing/XShape.idl>
49cdf0e10cSrcweir#endif
50cdf0e10cSrcweir
51cdf0e10cSrcweir//=============================================================================
52cdf0e10cSrcweir
53cdf0e10cSrcweir module com {  module sun {  module star {  module report {
54cdf0e10cSrcweir
55cdf0e10cSrcweirpublished interface XSection;
56cdf0e10cSrcweir
57cdf0e10cSrcweir//=============================================================================
58cdf0e10cSrcweir/** describes a component which may be part of a report.
59cdf0e10cSrcweir
60cdf0e10cSrcweir    @see XReportDefinition
61cdf0e10cSrcweir */
62cdf0e10cSrcweirpublished interface XReportComponent
63cdf0e10cSrcweir{
64cdf0e10cSrcweir    interface com::sun::star::util::XCloneable;
65cdf0e10cSrcweir    /** identifies the component as a candidate for being part of a report.
66cdf0e10cSrcweir        <p>This interface also provides the access to the component's parent.</p>
67cdf0e10cSrcweir     */
68cdf0e10cSrcweir    interface com::sun::star::container::XChild;
69cdf0e10cSrcweir
70cdf0e10cSrcweir    /** allows life-time control of report components.
71cdf0e10cSrcweir     */
72cdf0e10cSrcweir    interface com::sun::star::lang::XComponent;
73cdf0e10cSrcweir
74cdf0e10cSrcweir    interface com::sun::star::drawing::XShape;
75cdf0e10cSrcweir
76cdf0e10cSrcweir    /** gives access to the properties.
77cdf0e10cSrcweir    */
78cdf0e10cSrcweir    interface com::sun::star::beans::XPropertySet;
79cdf0e10cSrcweir
80cdf0e10cSrcweir    /** the name of the component.
81cdf0e10cSrcweir     */
82cdf0e10cSrcweir    [attribute,bound] string Name
83cdf0e10cSrcweir    {
84cdf0e10cSrcweir        set raises ( com::sun::star::beans::PropertyVetoException );
85cdf0e10cSrcweir    };
86cdf0e10cSrcweir
87cdf0e10cSrcweir    /** specifies the height of the control.
88cdf0e10cSrcweir     */
89cdf0e10cSrcweir    [attribute,bound] long Height;
90cdf0e10cSrcweir
91cdf0e10cSrcweir    /** specifies the horizontal position of the control.
92cdf0e10cSrcweir     */
93cdf0e10cSrcweir    [attribute,bound] long PositionX;
94cdf0e10cSrcweir
95cdf0e10cSrcweir    /** specifies the vertical position of the control.
96cdf0e10cSrcweir     */
97cdf0e10cSrcweir    [attribute,bound] long PositionY;
98cdf0e10cSrcweir
99cdf0e10cSrcweir    /** specifies the width of the control.
100cdf0e10cSrcweir     */
101cdf0e10cSrcweir    [attribute,bound] long Width;
102cdf0e10cSrcweir
103cdf0e10cSrcweir    /** specifies the border style of the control.
104cdf0e10cSrcweir
105cdf0e10cSrcweir        <pre>
106cdf0e10cSrcweir        0: No border
107cdf0e10cSrcweir        2: simple border
108cdf0e10cSrcweir        </pre>
109cdf0e10cSrcweir     */
110cdf0e10cSrcweir    [attribute,bound] short ControlBorder
111cdf0e10cSrcweir    {
112cdf0e10cSrcweir        set raises ( com::sun::star::lang::IllegalArgumentException,com::sun::star::beans::UnknownPropertyException );
113cdf0e10cSrcweir        get raises ( com::sun::star::beans::UnknownPropertyException );
114cdf0e10cSrcweir    };
115cdf0e10cSrcweir
116cdf0e10cSrcweir    //-------------------------------------------------------------------------
117cdf0e10cSrcweir
118cdf0e10cSrcweir    /** specifies the color of the border, if present
119cdf0e10cSrcweir
120cdf0e10cSrcweir        <p>Not every border style (see <member>Border</member>) may support coloring.
121cdf0e10cSrcweir        For instance, usually a border with 3D effect will ignore the BorderColor setting.</p>
122cdf0e10cSrcweir     */
123cdf0e10cSrcweir    [attribute,bound] long ControlBorderColor
124cdf0e10cSrcweir    {
125cdf0e10cSrcweir        set raises ( com::sun::star::lang::IllegalArgumentException,com::sun::star::beans::UnknownPropertyException );
126cdf0e10cSrcweir        get raises ( com::sun::star::beans::UnknownPropertyException );
127cdf0e10cSrcweir    };
128cdf0e10cSrcweir
129cdf0e10cSrcweir    /** Specifies that recurring values are printed.
130cdf0e10cSrcweir        If set to <TRUE/> then the value will be printed every time. If set to <FALSE/> then the value will only be printed once.
131cdf0e10cSrcweir        The default value is <TRUE/>.
132cdf0e10cSrcweir    */
133cdf0e10cSrcweir    [attribute,bound] boolean PrintRepeatedValues
134cdf0e10cSrcweir    {
135cdf0e10cSrcweir        set raises ( com::sun::star::beans::UnknownPropertyException );
136cdf0e10cSrcweir        get raises ( com::sun::star::beans::UnknownPropertyException );
137cdf0e10cSrcweir    };
138cdf0e10cSrcweir
139cdf0e10cSrcweir        /** is used for subreports and contains the names of columns of the parent report.
140cdf0e10cSrcweir    <p> These columns are typically the foreign key fields of the parent report.
141cdf0e10cSrcweir    The values of theses columns are used to identify the data for the subreport.
142cdf0e10cSrcweir    Each time the parent report changes it's current row, the subreport requeries
143cdf0e10cSrcweir    it's data based on the values of the master fields.</p>
144cdf0e10cSrcweir    <p>If the report is no sub report (e.g. it's parent is not a report itself), this
145cdf0e10cSrcweir    property is not evaluated.</p>
146cdf0e10cSrcweir
147cdf0e10cSrcweir    */
148cdf0e10cSrcweir    [attribute,bound] sequence<string> MasterFields
149cdf0e10cSrcweir    {
150cdf0e10cSrcweir        set raises ( com::sun::star::beans::UnknownPropertyException );
151cdf0e10cSrcweir        get raises ( com::sun::star::beans::UnknownPropertyException );
152cdf0e10cSrcweir    };
153cdf0e10cSrcweir
154cdf0e10cSrcweir    /**is used for subreports and contains the names of the columns of the subreport
155cdf0e10cSrcweir    which are related to the master fields of the parent report.
156cdf0e10cSrcweir    <p>Entries in this sequence can either denote column names in the sub report,
157cdf0e10cSrcweir    or paramater names.<br/>
158cdf0e10cSrcweir    For instance, you could base the report on the SQL statement
159cdf0e10cSrcweir    <code>SELECT * FROM invoices WHERE cust_ref = :cid</code>, and add <code>cid</code>
160cdf0e10cSrcweir    to the DetailFields property. In this case, the parameter will be filled from
161cdf0e10cSrcweir    the corresponding master field.<br/>
162cdf0e10cSrcweir    Alternatively, you could simply base your report on the table <code>invoices</code>,
163cdf0e10cSrcweir    and add the column name <code>cust_ref</code> to the DetailFields. In this case,
164cdf0e10cSrcweir    and implicit filter clause <code>WHERE cust_ref = :&lt;new_param_name&gt;</code> will
165cdf0e10cSrcweir    be created, and the artificial parameter will be filled from the corresponding
166cdf0e10cSrcweir    master field.<br/>
167cdf0e10cSrcweir    If a string in this property denotes both a column name and a parameter name, it
168cdf0e10cSrcweir    is undefined which way it is interpreted, but implementations of the service are required
169cdf0e10cSrcweir    to either decide for the paramter or the column, and proceed as usual.
170cdf0e10cSrcweir    </p>
171cdf0e10cSrcweir    <p>The columns specified herein typically represent a part of the primary key
172cdf0e10cSrcweir    fields or their aliases of the detail report.</p>
173cdf0e10cSrcweir    <p>If the report is no sub report (e.g. it's parent is not a report itself), this
174cdf0e10cSrcweir    property is not evaluated.</p>
175cdf0e10cSrcweir    *
176cdf0e10cSrcweir    */
177cdf0e10cSrcweir    [attribute,bound] sequence<string> DetailFields
178cdf0e10cSrcweir    {
179cdf0e10cSrcweir        set raises ( com::sun::star::beans::UnknownPropertyException );
180cdf0e10cSrcweir        get raises ( com::sun::star::beans::UnknownPropertyException );
181cdf0e10cSrcweir    };
182cdf0e10cSrcweir
183cdf0e10cSrcweir
184cdf0e10cSrcweir    /** Specifies the section where the control belongs to.
185cdf0e10cSrcweir        This is a shortcut to get control hierachy up.
186cdf0e10cSrcweir        This value is <NULL/> when the control was not inserted in any section.
187cdf0e10cSrcweir    */
188cdf0e10cSrcweir    [attribute,readonly] com::sun::star::report::XSection Section;
189cdf0e10cSrcweir};
190cdf0e10cSrcweir
191cdf0e10cSrcweir//=============================================================================
192cdf0e10cSrcweir
193cdf0e10cSrcweir}; }; }; };
194cdf0e10cSrcweir
195cdf0e10cSrcweir/*=============================================================================
196cdf0e10cSrcweir
197cdf0e10cSrcweir=============================================================================*/
198cdf0e10cSrcweir#endif
199