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