1<?xml version="1.0" encoding="UTF-8"?>
2
3<!--***********************************************************
4 *
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements.  See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership.  The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License.  You may obtain a copy of the License at
12 *
13 *   http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied.  See the License for the
19 * specific language governing permissions and limitations
20 * under the License.
21 *
22 ***********************************************************-->
23
24<helpdocument version="1.0">
25<meta>
26<topic id="textswriter0104090006xml" indexer="include">
27<title id="tit" xml-lang="en-US">Database</title>
28<filename>/text/swriter/01/04090006.xhp</filename>
29</topic>
30</meta>
31<body>
32<section id="datenbank">
33<bookmark xml-lang="en-US" branch="hid/SW_HID_FLD_DB" id="bm_id3151315" localize="false"/>
34<paragraph role="heading" id="hd_id3153536" xml-lang="en-US" level="1" l10n="U" oldref="1"><link href="text/swriter/01/04090006.xhp" name="Database">Database</link></paragraph>
35<paragraph role="paragraph" id="par_id3154471" xml-lang="en-US" l10n="U" oldref="2">You can insert fields from any database, for example, address fields, into your document.</paragraph>
36</section>
37<section id="howtoget">
38<embed href="text/swriter/00/00000404.xhp#felddatenbank"/>
39</section>
40<bookmark xml-lang="en-US" branch="hid/sw:ListBox:TP_FLD_DB:LB_DBTYPE" id="bm_id3154566" localize="false"/>
41<paragraph role="paragraph" id="par_id090220080439090" xml-lang="en-US" l10n="NEW"><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>
42<embed href="text/swriter/01/04090001.xhp#feldtyp"/>
43<table id="tbl_id3155894">
44<tablerow>
45<tablecell>
46<paragraph role="tablehead" id="par_id3154196" xml-lang="en-US" l10n="U" oldref="3">Field type</paragraph>
47</tablecell>
48<tablecell>
49<paragraph role="tablehead" id="par_id3149484" xml-lang="en-US" l10n="U" oldref="4">Meaning</paragraph>
50</tablecell>
51</tablerow>
52<tablerow>
53<tablecell>
54<paragraph role="tablecontent" id="par_id3149096" xml-lang="en-US" l10n="U" oldref="5">Any Record</paragraph>
55</tablecell>
56<tablecell>
57<paragraph role="tablecontent" id="par_id3151257" xml-lang="en-US" l10n="U" oldref="6">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>
58<paragraph role="tablecontent" id="par_id3147100" xml-lang="en-US" l10n="U" oldref="7">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>
59</tablecell>
60</tablerow>
61<tablerow>
62<tablecell>
63<paragraph role="tablecontent" id="par_id3153632" xml-lang="en-US" l10n="U" oldref="8">Database Name</paragraph>
64</tablecell>
65<tablecell>
66<paragraph role="tablecontent" id="par_id3152776" xml-lang="en-US" l10n="U" oldref="9">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>
67</tablecell>
68</tablerow>
69<tablerow>
70<tablecell>
71<paragraph role="tablecontent" id="par_id3149167" xml-lang="en-US" l10n="U" oldref="15">Mail merge field</paragraph>
72</tablecell>
73<tablecell>
74<paragraph role="tablecontent" id="par_id3145779" xml-lang="en-US" l10n="U" oldref="16">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>
75</tablecell>
76</tablerow>
77<tablerow>
78<tablecell>
79<paragraph role="tablecontent" id="par_id3151372" xml-lang="en-US" l10n="U" oldref="12">Next record</paragraph>
80</tablecell>
81<tablecell>
82<paragraph role="tablecontent" id="par_id3150114" xml-lang="en-US" l10n="U" oldref="13">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>
83<paragraph role="tablecontent" id="par_id3155861" xml-lang="en-US" l10n="U" oldref="14">You can use the "Next record" field to insert the contents of consecutive records between the mail merge fields in a document.</paragraph>
84</tablecell>
85</tablerow>
86<tablerow>
87<tablecell>
88<paragraph role="tablecontent" id="par_id3147412" xml-lang="en-US" l10n="U" oldref="10">Record number</paragraph>
89</tablecell>
90<tablecell>
91<paragraph role="tablecontent" id="par_id3147495" xml-lang="en-US" l10n="U" oldref="11">Inserts the number of the selected database record.</paragraph>
92</tablecell>
93</tablerow>
94</table>
95<embed href="text/swriter/01/04090001.xhp#hinweis"/>
96<bookmark xml-lang="en-US" branch="hid/SW_HID_DB_SELECTION_TLB" id="bm_id3145262" localize="false"/>
97<paragraph role="heading" id="hd_id3149565" xml-lang="en-US" level="2" l10n="U" oldref="17">Database Selection</paragraph>
98<paragraph role="paragraph" id="par_id3145268" xml-lang="en-US" l10n="U" oldref="18"><ahelp hid="HID_DB_SELECTION_TLB">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>
99<bookmark xml-lang="en-US" branch="hid/sw:Edit:TP_FLD_DB:ED_DBCONDITION" id="bm_id3150559" localize="false"/>
100<paragraph role="paragraph" id="par_id0902200804391084" xml-lang="en-US" l10n="NEW"><ahelp hid="." visibility="hidden">For fields linked to a condition, enter the criteria here.</ahelp></paragraph>
101<embed href="text/swriter/01/04090003.xhp#bedingung"/>
102<paragraph role="paragraph" id="par_id3147739" xml-lang="en-US" l10n="U" oldref="19">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>
103<bookmark xml-lang="en-US" branch="hid/sw:Edit:TP_FLD_DB:ED_DBSETNUMBER" id="bm_id3149831" localize="false"/>
104<paragraph role="heading" id="hd_id3146336" xml-lang="en-US" level="2" l10n="U" oldref="20">Record number</paragraph>
105<paragraph role="paragraph" id="par_id3149836" xml-lang="en-US" l10n="U" oldref="21"><ahelp hid="SW:EDIT:TP_FLD_DB:ED_DBSETNUMBER">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>
106<paragraph role="note" id="par_id3153305" xml-lang="en-US" l10n="U" oldref="22">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>
107<paragraph role="heading" id="hd_id3156109" xml-lang="en-US" level="2" l10n="U" oldref="23">Format</paragraph>
108<paragraph role="paragraph" id="par_id3156122" xml-lang="en-US" l10n="CHG" oldref="24"><ahelp hid=".">Select the format of the field that you want to insert. This option is available for numerical, boolean, date and time fields.</ahelp><comment>see #i64135</comment></paragraph>
109<bookmark xml-lang="en-US" branch="hid/sw:RadioButton:TP_FLD_DB:RB_DBOWNFORMAT" id="bm_id3150915" localize="false"/>
110<paragraph role="heading" id="hd_id3150904" xml-lang="en-US" level="3" l10n="U" oldref="25">From database</paragraph>
111<paragraph role="paragraph" id="par_id3150922" xml-lang="en-US" l10n="U" oldref="26"><ahelp hid="SW:RADIOBUTTON:TP_FLD_DB:RB_DBOWNFORMAT">Uses the format defined in the selected database.</ahelp></paragraph>
112<bookmark xml-lang="en-US" branch="hid/sw:PushButton:TP_FLD_DB:PB_ADDDB" id="bm_id5024262" localize="false"/>
113<paragraph role="heading" id="par_idN1076E" xml-lang="en-US" level="3" l10n="NEW">Browse</paragraph>
114<paragraph role="paragraph" id="par_idN10772" xml-lang="en-US" l10n="NEW"><ahelp hid="878711313">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>
115<bookmark xml-lang="en-US" branch="hid/sw:RadioButton:TP_FLD_DB:RB_DBFORMAT" id="bm_id3154326" localize="false"/>
116<paragraph role="heading" id="hd_id3155084" xml-lang="en-US" level="3" l10n="U" oldref="27">User defined</paragraph>
117<paragraph role="paragraph" id="par_id3154333" xml-lang="en-US" l10n="U" oldref="28"><ahelp hid="SW:RADIOBUTTON:TP_FLD_DB:RB_DBFORMAT">Applies the format that you select in the <emph>List of user-defined formats</emph>.</ahelp></paragraph>
118<bookmark xml-lang="en-US" branch="hid/sw:ListBox:TP_FLD_DB:LB_DBNUMFORMAT" id="bm_id3150084" localize="false"/>
119<bookmark xml-lang="en-US" branch="hid/sw:ListBox:TP_FLD_DB:LB_DBFORMAT" id="bm_id3150087" localize="false"/>
120<paragraph role="heading" id="hd_id3146948" xml-lang="en-US" level="3" l10n="U" oldref="29">List of user-defined formats</paragraph>
121<paragraph role="paragraph" id="par_id3150093" xml-lang="en-US" l10n="U" oldref="30"><ahelp hid="SW:LISTBOX:TP_FLD_DB:LB_DBFORMAT">Lists the available user-defined formats.</ahelp></paragraph>
122<bookmark xml-lang="en-US" branch="hid/SW_HID_PRINT_AS_MERGE" id="bm_id1835383" localize="false"/>
123<paragraph role="heading" id="par_idN107FF" xml-lang="en-US" level="2" l10n="NEW">Printing a form letter</paragraph>
124<paragraph role="paragraph" id="par_idN10803" xml-lang="en-US" l10n="NEW"><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>
125<paragraph role="heading" id="par_idN10812" xml-lang="en-US" level="3" l10n="NEW">Do not show warning again</paragraph>
126<paragraph role="paragraph" id="par_idN10816" xml-lang="en-US" l10n="CHG"><ahelp hid=".">Suppresses this dialog from now on. There is no easy way to get it back!</ahelp></paragraph>
127</body>
128</helpdocument>
129