summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/swriter/01/04090006.xhp
blob: 8a88c95839d9ef297323187a06444221674361b0 (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
<?xml version="1.0" encoding="UTF-8"?>
<helpdocument version="1.0">

<!--
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 * This file incorporates work covered by the following license notice:
 *
 *   Licensed to the Apache Software Foundation (ASF) under one or more
 *   contributor license agreements. See the NOTICE file distributed
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 -->


<meta>
<topic id="textswriter0104090006xml" indexer="include">
<title id="tit" xml-lang="en-US">Database</title>
<filename>/text/swriter/01/04090006.xhp</filename>
</topic>
</meta>
<body>
<section id="database">
<bookmark xml-lang="en-US" branch="hid/modules/swriter/ui/flddbpage/@@nowidget@@" id="bm_@@nowidget@@" localize="false"/>
<bookmark xml-lang="en-US" branch="hid/modules/swriter/ui/flddbpage/FldDbPage" id="bm_id3151315" localize="false"/>
<paragraph role="heading" id="hd_id3153536" xml-lang="en-US" level="1"><link href="text/swriter/01/04090006.xhp" name="Database">Database</link></paragraph>
<paragraph role="paragraph" id="par_id3154471" xml-lang="en-US"><ahelp hid=".">You can insert fields from any database, for example, address fields, into your document.</ahelp></paragraph>
</section>
<section id="howtoget">
<embed href="text/swriter/00/00000404.xhp#felddatenbank"/>
</section>
<bookmark xml-lang="en-US" branch="hid/modules/swriter/ui/flddbpage/type" id="bm_id3154566" localize="false"/>
<paragraph role="paragraph" id="par_id090220080439090" xml-lang="en-US"><ahelp hid="." visibility="hidden">Lists the available field types. To add a field to your document, click a field type, click a field in the <emph>Select </emph>list, and then click <emph>Insert</emph>.</ahelp></paragraph>
<embed href="text/swriter/01/04090001.xhp#fieldtype"/>
<table id="tbl_id3155894">
<tablerow>
<tablecell>
<paragraph role="tablehead" id="par_id3154196" xml-lang="en-US">Field type</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablehead" id="par_id3149484" xml-lang="en-US">Meaning</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3149096" xml-lang="en-US">Any Record</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3151257" xml-lang="en-US">Inserts the contents of the database field that you specify in the <emph>Record Number</emph> box as a mail merge field if the <link href="text/swriter/01/04090200.xhp" name="Condition"><emph>Condition</emph></link> that you enter is met. Only records selected by a multiple selection in the data source view are considered.</paragraph>
<paragraph role="tablecontent" id="par_id3147100" xml-lang="en-US">You can use this field to insert several records into a document. Simply insert the <emph>Any Record</emph> field in front of the form letter fields that use a certain record.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3153632" xml-lang="en-US">Database Name</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3152776" xml-lang="en-US">Inserts the name of the database table selected in the <emph>Database selection </emph>box. The "Database Name" field is a global field, that is, if you insert a different database name in your document, the contents of all previously inserted "Database Name" fields are updated.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3149167" xml-lang="en-US">Mail merge field</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3145779" xml-lang="en-US">Inserts the name of a database field as a placeholder, so that you can create a mail merge document. The field content is automatically inserted when you print the form letter.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3151372" xml-lang="en-US">Next record</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3150114" xml-lang="en-US">Inserts the contents of the next mail merge field in your document, if the condition that you define is met. The records that you want to include must be selected in the data source view.</paragraph>
<paragraph role="tablecontent" id="par_id3155861" xml-lang="en-US">You can use the "Next record" field to insert the contents of consecutive records between the mail merge fields in a document.</paragraph>
</tablecell>
</tablerow>
<tablerow>
<tablecell>
<paragraph role="tablecontent" id="par_id3147412" xml-lang="en-US">Record number</paragraph>
</tablecell>
<tablecell>
<paragraph role="tablecontent" id="par_id3147495" xml-lang="en-US">Inserts the number of the selected database record.</paragraph>
</tablecell>
</tablerow>
</table>
<embed href="text/swriter/01/04090003.xhp#selectnote"/>
<bookmark xml-lang="en-US" branch="hid/modules/swriter/ui/flddbpage/select" id="bm_id3145262" localize="false"/>
<paragraph role="heading" id="hd_id3149565" xml-lang="en-US" level="2">Database Selection</paragraph>
<paragraph role="paragraph" id="par_id3145268" xml-lang="en-US"><ahelp hid="modules/swriter/ui/flddbpage/select">Select the database table or the database query that you want the field to refer to.</ahelp> You can include fields from more than one database or query in a document.</paragraph>
<bookmark xml-lang="en-US" branch="hid/modules/swriter/ui/flddbpage/condition" id="bm_id3150559" localize="false"/>
<paragraph role="paragraph" id="par_id0902200804391084" xml-lang="en-US"><ahelp hid="." visibility="hidden">For fields linked to a condition, enter the criteria here.</ahelp></paragraph>
<embed href="text/swriter/01/04090003.xhp#condition"/>
<paragraph role="paragraph" id="par_id3147739" xml-lang="en-US">If you want, you can assign a condition that must be met before the contents of the "Any Record" and "Next Record" fields are inserted. The default condition is "True", that is, the condition is always true if you do not change the condition text.</paragraph>
<bookmark xml-lang="en-US" branch="hid/modules/swriter/ui/flddbpage/recnumber" id="bm_id3149831" localize="false"/>
<paragraph role="heading" id="hd_id3146336" xml-lang="en-US" level="2">Record number</paragraph>
<paragraph role="paragraph" id="par_id3149836" xml-lang="en-US"><ahelp hid="modules/swriter/ui/flddbpage/recnumber">Enter the number of the record that you want to insert when the condition that you specify is met.</ahelp> The record number corresponds to the current selection in the data source view. For example, if you select the last 5 records in a database containing 10 records, the number of the first record will be 1, and not 6.</paragraph>
<paragraph role="note" id="par_id3153305" xml-lang="en-US">If you refer to fields in a different database (or in a different table or query within the same database), $[officename] determines the record number relative to the current selection.</paragraph>
<paragraph role="heading" id="hd_id3156109" xml-lang="en-US" level="2">Format</paragraph>
<paragraph role="paragraph" id="par_id3156122" xml-lang="en-US">Select the format of the field that you want to insert. This option is available for numerical, boolean, date and time fields.<comment>see #i64135</comment></paragraph>
<bookmark xml-lang="en-US" branch="hid/modules/swriter/ui/flddbpage/fromdatabasecb" id="bm_id3150915" localize="false"/>
<paragraph role="heading" id="hd_id3150904" xml-lang="en-US" level="3">From database</paragraph>
<paragraph role="paragraph" id="par_id3150922" xml-lang="en-US"><ahelp hid="modules/swriter/ui/flddbpage/fromdatabasecb">Uses the format defined in the selected database.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/modules/swriter/ui/flddbpage/browse" id="bm_id5024262" localize="false"/>
<paragraph role="heading" id="par_idN1076E" xml-lang="en-US" level="3">Browse</paragraph>
<paragraph role="paragraph" id="par_idN10772" xml-lang="en-US"><ahelp hid="modules/swriter/ui/flddbpage/browse">Opens a file open dialog where you can select a database file (*.odb). The selected file is added to the Databases Selection list.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/modules/swriter/ui/flddbpage/userdefinedcb" id="bm_id3154326" localize="false"/>
<paragraph role="heading" id="hd_id3155084" xml-lang="en-US" level="3">User defined</paragraph>
<paragraph role="paragraph" id="par_id3154333" xml-lang="en-US"><ahelp hid="modules/swriter/ui/flddbpage/userdefinedcb">Applies the format that you select in the <emph>List of user-defined formats</emph>.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/modules/swriter/ui/flddbpage/numformat" id="bm_id3150084" localize="false"/>
<bookmark xml-lang="en-US" branch="hid/modules/swriter/ui/flddbpage/format" id="bm_id3150087" localize="false"/>
<paragraph role="heading" id="hd_id3146948" xml-lang="en-US" level="3">List of user-defined formats</paragraph>
<paragraph role="paragraph" id="par_id3150093" xml-lang="en-US"><ahelp hid=".">Lists the available user-defined formats.</ahelp></paragraph>
<bookmark xml-lang="en-US" branch="hid/modules/swriter/ui/printmergedialog/PrintMergeDialog" id="bm_id1835383" localize="false"/>
<paragraph role="heading" id="par_idN107FF" xml-lang="en-US" level="2">Printing a form letter</paragraph>
<paragraph role="paragraph" id="par_idN10803" xml-lang="en-US"><ahelp hid=".">When you print a document that contains database fields, a dialog asks you if you want to print a form letter. If you answer Yes, the <link href="text/swriter/01/01150000.xhp">Mail Merge</link> dialog opens where you can select the database records to print.</ahelp></paragraph>
</body>
</helpdocument>