summaryrefslogtreecommitdiff
path: root/helpcontent2/source/text/shared/explorer/database/rep_main.xhp
blob: ee3e9162f48f1c70683fad30fc90f62eec7f1da6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
<?xml version="1.0" encoding="UTF-8"?>



<!--
 ***********************************************************************
 *
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 * 
 * Copyright 2008 by Sun Microsystems, Inc.
 *
 * OpenOffice.org - a multi-platform office productivity suite
 *
 * $RCSfile: rep_main.xhp,v $
 * $Revision: 1.7 $
 *
 * This file is part of OpenOffice.org.
 *
 * OpenOffice.org is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3
 * only, as published by the Free Software Foundation.
 *
 * OpenOffice.org is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License version 3 for more details
 * (a copy is included in the LICENSE file that accompanied this code).
 *
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with OpenOffice.org.  If not, see
 * <http://www.openoffice.org/license.html>
 * for a copy of the LGPLv3 License.
 *
 ************************************************************************
 -->


		<helpdocument version="1.0">
<meta>
<topic id="textsharedexplorerdatabaserep_mainxml" indexer="include" status="PUBLISH">
<title id="tit" xml-lang="en-US">Report Builder</title>
<filename>/text/shared/explorer/database/rep_main.xhp</filename>
</topic>
</meta>
<body>
<bookmark xml-lang="en-US" branch="index" id="bm_id1614429"><bookmark_value>Report Builder</bookmark_value>
</bookmark>
<paragraph role="heading" id="hd_id8773155" xml-lang="en-US" level="1" l10n="NEW"><variable id="rep_main"><link href="text/shared/explorer/database/rep_main.xhp">Report Builder</link>
</variable></paragraph>
<paragraph role="paragraph" id="par_id5248573" xml-lang="en-US" l10n="NEW">The Report Builder is a tool to create your own database reports. Unlike with the <link href="text/shared/autopi/01100000.xhp">Report Wizard</link>, using the Report Builder you can take control to design the report the way you want. The generated report is a Writer document that you can edit, too.</paragraph>
<paragraph role="note" id="par_id7128818" xml-lang="en-US" l10n="NEW">To use the Report Builder, the Report Builder extension must be installed. In addition, the Java Runtime Environment (JRE) software must be installed, and this software must be selected in %PRODUCTNAME.</paragraph>
<paragraph role="heading" id="hd_id3753776" xml-lang="en-US" level="2" l10n="NEW">To Install the Report Builder Extension</paragraph>
<list type="ordered">
<listitem>
<paragraph role="paragraph" id="par_id5284279" xml-lang="en-US" l10n="NEW">Choose Tools - Extension Manager to open the <link href="text/shared/01/packagemanager.xhp">Extension Manager</link>.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id4494766" xml-lang="en-US" l10n="NEW">Click the link "Get more extensions here". This opens your web browser at the address <link href="http://extensions.services.openoffice.org">http://extensions.services.openoffice.org</link> and shows a list of available extensions.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id7858516" xml-lang="en-US" l10n="NEW">Find the Sun Report Builder extension. Click at the icon or the "click here" text link. This opens the download page for the extension.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id973540" xml-lang="en-US" l10n="NEW">Click the "Get it!" icon. The file "sun-report-builder.oxt" will be downloaded to your computer.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id4680928" xml-lang="en-US" l10n="NEW">Switch back from your web browser to the %PRODUCTNAME window. The Extension Manager should still be visible.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id9014252" xml-lang="en-US" l10n="NEW">In the Extension Manager, click Add to open the Add extensions dialog.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id6011841" xml-lang="en-US" l10n="NEW">Select the "sun-report-builder.oxt" file that you downloaded. Click Open.</paragraph>
<paragraph role="paragraph" id="par_id2591326" xml-lang="en-US" l10n="NEW">This starts the installation of the Sun Report Builder extension.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id6201666" xml-lang="en-US" l10n="NEW">Read the license. If you accept the license, click Accept to continue the installation.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id208136" xml-lang="en-US" l10n="NEW">Click Close to close the Extension Manager.</paragraph>
</listitem>
</list>
<paragraph role="heading" id="hd_id556047" xml-lang="en-US" level="3" l10n="NEW">To install the JRE software</paragraph>
<paragraph role="paragraph" id="par_id4515823" xml-lang="en-US" l10n="NEW">The Report Builder requires an installed Java Runtime Environment (JRE).</paragraph>
<list type="ordered">
<listitem>
<paragraph role="paragraph" id="par_id4044312" xml-lang="en-US" l10n="NEW">Choose Tools - Options - %PRODUCTNAME - <link href="text/shared/optionen/java.xhp">Java</link>.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id1369060" xml-lang="en-US" l10n="NEW">Wait up to one minute, while %PRODUCTNAME collects information on installed Java software on your system.</paragraph>
<paragraph role="paragraph" id="par_id860927" xml-lang="en-US" l10n="NEW">If a recent JRE version is found on your system, you see an entry in the list.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id8581804" xml-lang="en-US" l10n="NEW">Click the option button in front of the entry to enable this JRE version for use in %PRODUCTNAME.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id7730033" xml-lang="en-US" l10n="NEW">Ensure that <emph>Use a Java runtime environment</emph> is enabled.</paragraph>
</listitem>
</list>
<paragraph role="paragraph" id="par_id6317636" xml-lang="en-US" l10n="NEW">If no JRE version is found on your system, open your web browser and download the JRE software from <link href="http://www.java.com">http://www.java.com</link>. Install the JRE software. Then restart %PRODUCTNAME and open Tools - Options - %PRODUCTNAME - Java again.</paragraph>
<paragraph role="heading" id="hd_id9759514" xml-lang="en-US" level="2" l10n="NEW">To open the Report Builder</paragraph>
<list type="ordered">
<listitem>
<paragraph role="paragraph" id="par_id9076509" xml-lang="en-US" l10n="NEW">Open a Base file or create a new database. The database must contain at least one table with at least one data field and a primary key field.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id7050691" xml-lang="en-US" l10n="NEW">Click the Reports icon in the Base window, then choose Create Report in Design View.</paragraph>
<paragraph role="paragraph" id="par_id7118747" xml-lang="en-US" l10n="NEW">The Report Builder window opens. </paragraph>
</listitem>
</list>
<paragraph role="paragraph" id="par_id8283639" xml-lang="en-US" l10n="NEW">The Report Builder is divided into three parts. On the top you see the menu, with the toolbars below.</paragraph>
<paragraph role="paragraph" id="par_id2291024" xml-lang="en-US" l10n="NEW">On the right you see the Properties window with the property values of the currently selected object.</paragraph>
<paragraph role="paragraph" id="par_id2100589" xml-lang="en-US" l10n="NEW">The left part of the Report Builder window shows the Report Builder view. The Report Builder view is initially divided into three sections, from top to bottom:</paragraph>
<list type="unordered">
<listitem>
<paragraph role="paragraph" id="par_id5022125" xml-lang="en-US" l10n="NEW">
<emph>Page Header</emph> - drag control fields with fixed text into the Page Header area</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id6844386" xml-lang="en-US" l10n="NEW">
<emph>Detail</emph> - drag and drop database fields into the Detail area</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id7018646" xml-lang="en-US" l10n="NEW">
<emph>Page Footer</emph> - drag control fields with fixed text into the Page Footer area</paragraph>
</listitem>
</list>
<paragraph role="paragraph" id="par_id5857112" xml-lang="en-US" l10n="NEW">To insert an additional <emph>Report Header</emph> and <emph>Report Footer</emph> area choose <item type="menuitem">Edit - Insert Report Header/Footer</item>. These areas contain text that appears at the start and end of the whole report.</paragraph><comment>id="par_id2685323" l10n="NEW"If you want a multi-column report, choose Format - Page, click the Columns tab, and set the number of columns. Now you can also specify a Column Header and Column Footer in the Report Builder view.</comment><comment>column header/footer</comment><paragraph role="paragraph" id="par_id6042664" xml-lang="en-US" l10n="NEW">Click the "-" icon in front of an area name to collapse that area to one line in the Report Builder view. The "-" icon changes to a "+" icon, and you can click this to expand the area again.</paragraph>
<paragraph role="paragraph" id="par_id1589098" xml-lang="en-US" l10n="NEW">You insert database fields by drag-and-drop into the Detail area. See the section "To insert fields into the report" below.</paragraph>
<paragraph role="paragraph" id="par_id1278420" xml-lang="en-US" l10n="NEW">In addition, you can click the Label Field or Text Box icon in the toolbar, then drag a rectangle in the Page Header or Page Footer area, to define a text that is the same on all pages. You enter the text in the Label box of the corresponding Properties window. You can also add graphics by using the Graphics icon.</paragraph>
<paragraph role="heading" id="par_id7479476" xml-lang="en-US" level="2" l10n="NEW">To connect the report to a database table</paragraph>
<paragraph role="paragraph" id="par_id3099154" xml-lang="en-US" l10n="NEW">First you must connect the report to a database table.</paragraph>
<list type="ordered">
<listitem>
<paragraph role="paragraph" id="par_id2218390" xml-lang="en-US" l10n="NEW">Move the mouse to the Properties view. You see two tab pages General and Data.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id7771538" xml-lang="en-US" l10n="NEW">On the Data tab page, click Content to open the combo box.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id366527" xml-lang="en-US" l10n="NEW">Select the table for that you want to create the report.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id7996459" xml-lang="en-US" l10n="NEW">After selecting the table, press the <item type="keycode">Tab</item> key to leave the Content box.</paragraph>
</listitem>
</list>
<paragraph role="paragraph" id="par_id2531815" xml-lang="en-US" l10n="NEW">The Add Field window opens automatically and shows all fields of the selected table.</paragraph>
<paragraph role="heading" id="par_id5927304" xml-lang="en-US" level="2" l10n="NEW">To insert fields into the report</paragraph>
<paragraph role="paragraph" id="par_id4503921" xml-lang="en-US" l10n="NEW">The Add Field window helps you to insert the table entries in the report. Click the Add Field icon in the toolbar to open the Add Field window.</paragraph>
<list type="ordered">
<listitem>
<paragraph role="paragraph" id="par_id4051026" xml-lang="en-US" l10n="NEW">Drag and drop the field names one by one from the Add Field window into the Detail area of the report. Position the fields as you like. Use the icons in the toolbars to align the fields.</paragraph>
<paragraph role="paragraph" id="par_id3397320" xml-lang="en-US" l10n="NEW">It is not possible to overlap the fields. If you drop a table field on the Detail area, then a label and a text box are inserted.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id3059785" xml-lang="en-US" l10n="NEW">You can also insert text that should be the same on every page of the report. Click the Label Field icon 
<image id="img_id5605334" src="res/commandimagelist/sc_label.png" width="0.0902inch" height="0.0902inch" localize="true"><alt id="alt_id5605334" xml-lang="en-US">label field icon</alt>
	</image>, then drag a rectangle in the Page Header or Page Footer area. Edit the Label property to show the text you want.</paragraph>
</listitem>
</list><comment>Align at Section toolbar</comment>
<bookmark xml-lang="en-US" branch="hid/.uno:SectionAlignLeft" id="bm_id7889950" localize="false"/><paragraph role="paragraph" id="par_id7657399" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Select two or more objects and click this icon to align the objects at the left margin of the area.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/.uno:SectionAlignRight" id="bm_id3236182" localize="false"/><paragraph role="paragraph" id="par_id8925138" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Select two or more objects and click this icon to align the objects at the right margin of the area.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/.uno:SectionAlignTop" id="bm_id1251258" localize="false"/><paragraph role="paragraph" id="par_id5461897" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Select two or more objects and click this icon to align the objects at the top margin of the area.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/.uno:SectionAlignBottom" id="bm_id8111819" localize="false"/><paragraph role="paragraph" id="par_id8919339" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Select two or more objects and click this icon to align the objects at the bottom margin of the area.</ahelp></paragraph><comment>Object Resizing toolbar</comment>
<bookmark xml-lang="en-US" branch="hid/.uno:SmallestWidth" id="bm_id9116794" localize="false"/><paragraph role="paragraph" id="par_id4634235" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Select two or more objects and click this icon to resize the objects to the smallest width.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/.uno:SmallestHeight" id="bm_id4381847" localize="false"/><paragraph role="paragraph" id="par_id1393475" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Select two or more objects and click this icon to resize the objects to the smallest height.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/.uno:GreatestWidth" id="bm_id1336710" localize="false"/><paragraph role="paragraph" id="par_id6571550" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Select two or more objects and click this icon to resize the objects to the greatest width.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/.uno:GreatestHeight" id="bm_id1221655" localize="false"/><paragraph role="paragraph" id="par_id5376140" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Select two or more objects and click this icon to resize the objects to the greatest height.</ahelp></paragraph><comment>Report Controls toolbar</comment>
<bookmark xml-lang="en-US" branch="hid/.uno:HFixedLine" id="bm_id4408093" localize="false"/><paragraph role="paragraph" id="par_id9611499" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Inserts a horizontal line to the current area.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/.uno:VFixedLine" id="bm_id6949369" localize="false"/><paragraph role="paragraph" id="par_id6765953" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">Inserts a vertical line to the current area.</ahelp></paragraph>
<paragraph role="paragraph" id="par_id1511581" xml-lang="en-US" l10n="NEW">After inserting fields in the Detail view, the report is ready for execution.</paragraph>
<paragraph role="heading" id="par_id4881740" xml-lang="en-US" level="2" l10n="NEW">To execute a report</paragraph>
<list type="unordered">
<listitem>
<paragraph role="paragraph" id="par_id8286385" xml-lang="en-US" l10n="NEW">Click the Execute Report icon 
<image id="img_id3380230" src="res/commandimagelist/sc_executereport.png" width="0.1665inch" height="0.1665inch"><alt id="alt_id3380230" xml-lang="en-US">execute report icon</alt>
	</image> on the toolbar.</paragraph>
</listitem>
</list>
<paragraph role="paragraph" id="par_id2354197" xml-lang="en-US" l10n="NEW">A Writer document opens and shows the report you have created, which contains all values of the database table which you have insert.</paragraph>
<paragraph role="paragraph" id="par_id2485122" xml-lang="en-US" l10n="NEW">If the database contents did change, execute the report again to update the result report.<comment>automatic? message?</comment></paragraph>
<paragraph role="heading" id="hd_id8746910" xml-lang="en-US" level="2" l10n="NEW">To edit a report</paragraph>
<paragraph role="paragraph" id="par_id9636524" xml-lang="en-US" l10n="NEW">First decide if you want to edit the generated report, which is a static Writer document, or if you want to edit the Report Builder view and then generate a new report based on the new design.</paragraph>
<paragraph role="paragraph" id="par_id5941648" xml-lang="en-US" l10n="NEW">The Writer document is opened read-only. To edit the Writer document, click Edit File 
<image id="img_id8237556" src="res/commandimagelist/sc_editdoc.png" width="0.222inch" height="0.222inch"><alt id="alt_id8237556" xml-lang="en-US">edit file icon</alt>
	</image> on the Standard toolbar.<comment>saved automatically with the Base file?</comment></paragraph>
<paragraph role="paragraph" id="par_id8307138" xml-lang="en-US" l10n="CHG">If you want to edit the Report Builder view, you can change some of its properties.</paragraph>
<paragraph role="paragraph" id="par_id7138889" xml-lang="en-US" l10n="NEW">Click in the Details area. Then in the Properties window, change some properties, for example the background color.</paragraph>
<paragraph role="paragraph" id="par_id9869380" xml-lang="en-US" l10n="NEW">After finishing, click the Execute Report icon 
<image id="Graphic2" src="res/commandimagelist/sc_executereport.png" width="0.1665inch" height="0.1665inch"><alt id="alt_" xml-lang="en-US">execute report icon</alt>
	</image> to create a new report.</paragraph>
<paragraph role="paragraph" id="par_id12512" xml-lang="en-US" l10n="NEW">If you close the Report Builder, you will be asked if the report should be saved. Click Yes, give the report a name, and click OK.<comment>report part of Base file?</comment></paragraph>
<paragraph role="heading" id="par_id2676168" xml-lang="en-US" level="2" l10n="NEW">Sorting the report</paragraph>
<paragraph role="paragraph" id="par_id2626422" xml-lang="en-US" l10n="NEW">Without sorting or grouping, the records will be inserted into the report in the order in which they are retrieved from the database.</paragraph>
<list type="ordered">
<listitem>
<paragraph role="paragraph" id="par_id1743827" xml-lang="en-US" l10n="NEW">Open the Report Builder view and click the Sorting and Grouping icon 
<image id="img_id9557786" src="res/commandimagelist/sc_dbsortingandgrouping.png" width="0.1665inch" height="0.1665inch"><alt id="alt_id9557786" xml-lang="en-US">sorting and grouping icon</alt>
	</image> on the toolbar. You see the <link href="text/shared/explorer/database/rep_sort.xhp">Sorting and Grouping</link> dialog.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id4331797" xml-lang="en-US" l10n="NEW">In the Groups box, click the field which you want as the first sort field, and set the Sorting property.<comment>what meaning has the order of fields / move up down button?</comment></paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id4191717" xml-lang="en-US" l10n="NEW">Execute the report.</paragraph>
</listitem>
</list>
<paragraph role="heading" id="par_id2318796" xml-lang="en-US" level="2" l10n="NEW">Grouping</paragraph>
<list type="ordered">
<listitem>
<paragraph role="paragraph" id="par_id399182" xml-lang="en-US" l10n="NEW">Open the Report Builder view and click the Sorting and Grouping icon 
<image id="Graphic21" src="res/commandimagelist/sc_dbsortingandgrouping.png" width="0.1665inch" height="0.1665inch"><alt id="alt_" xml-lang="en-US">sorting and grouping icon</alt>
	</image> on the toolbar. You see the <link href="text/shared/explorer/database/rep_sort.xhp">Sorting and Grouping</link> dialog.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id7588732" xml-lang="en-US" l10n="NEW">In the Groups box, open the Group Header list box and select to show a group header.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id95828" xml-lang="en-US" l10n="NEW">Click the Add Field icon 
<image id="Graphic3" src="res/commandimagelist/sc_addfield.png" width="0.2201inch" height="0.2201inch"><alt id="alt_" xml-lang="en-US">add field icon</alt>
	</image> to open the Add Field window.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id5675527" xml-lang="en-US" l10n="NEW">Drag-and-drop the field entry that you want to group into the group header section. Then drag-and-drop the remaining fields into the Detail section.</paragraph>
</listitem>
<listitem>
<paragraph role="paragraph" id="par_id3496200" xml-lang="en-US" l10n="NEW">Execute the report. The report shows the grouped records.</paragraph>
</listitem>
</list>
<paragraph role="paragraph" id="par_id7599108" xml-lang="en-US" l10n="NEW">If you like to sort and group, open the Report Builder view, then open the Sorting and Grouping dialog. Select to show a Group Header for the fields that you want to group, and select to hide the Group Header for the fields that you want to be sorted. Close the Sorting and Grouping window and execute the report.</paragraph>
<paragraph role="heading" id="par_id888698" xml-lang="en-US" level="2" l10n="NEW">Updating and printing your data</paragraph>
<paragraph role="paragraph" id="par_id3394573" xml-lang="en-US" l10n="NEW">When you insert some new data or edit data in the table, a new report will show the updated data.</paragraph>
<paragraph role="paragraph" id="par_id7594225" xml-lang="en-US" l10n="NEW">Click the Reports icon 
<image id="img_id4678487" src="dbaccess/res/reports_32.png" width="0.222inch" height="0.222inch"><alt id="alt_id4678487" xml-lang="en-US">reports icon</alt>
	</image> and double-click your last saved report. A new Writer document will be created which shows the new data.</paragraph>
<paragraph role="paragraph" id="par_id8147221" xml-lang="en-US" l10n="NEW">To print a report, choose <item type="menuitem">File - Print</item> from the Writer document.</paragraph>
</body>
</helpdocument>