Sybase 2 manual

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
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500

Ir a la página of

Buen manual de instrucciones

Las leyes obligan al vendedor a entregarle al comprador, junto con el producto, el manual de instrucciones Sybase 2. La falta del manual o facilitar información incorrecta al consumidor constituyen una base de reclamación por no estar de acuerdo el producto con el contrato. Según la ley, está permitido adjuntar un manual de otra forma que no sea en papel, lo cual últimamente es bastante común y los fabricantes nos facilitan un manual gráfico, su versión electrónica Sybase 2 o vídeos de instrucciones para usuarios. La condición es que tenga una forma legible y entendible.

¿Qué es un manual de instrucciones?

El nombre proviene de la palabra latina “instructio”, es decir, ordenar. Por lo tanto, en un manual Sybase 2 se puede encontrar la descripción de las etapas de actuación. El propósito de un manual es enseñar, facilitar el encendido o el uso de un dispositivo o la realización de acciones concretas. Un manual de instrucciones también es una fuente de información acerca de un objeto o un servicio, es una pista.

Desafortunadamente pocos usuarios destinan su tiempo a leer manuales Sybase 2, sin embargo, un buen manual nos permite, no solo conocer una cantidad de funcionalidades adicionales del dispositivo comprado, sino también evitar la mayoría de fallos.

Entonces, ¿qué debe contener el manual de instrucciones perfecto?

Sobre todo, un manual de instrucciones Sybase 2 debe contener:
- información acerca de las especificaciones técnicas del dispositivo Sybase 2
- nombre de fabricante y año de fabricación del dispositivo Sybase 2
- condiciones de uso, configuración y mantenimiento del dispositivo Sybase 2
- marcas de seguridad y certificados que confirmen su concordancia con determinadas normativas

¿Por qué no leemos los manuales de instrucciones?

Normalmente es por la falta de tiempo y seguridad acerca de las funcionalidades determinadas de los dispositivos comprados. Desafortunadamente la conexión y el encendido de Sybase 2 no es suficiente. El manual de instrucciones siempre contiene una serie de indicaciones acerca de determinadas funcionalidades, normas de seguridad, consejos de mantenimiento (incluso qué productos usar), fallos eventuales de Sybase 2 y maneras de solucionar los problemas que puedan ocurrir durante su uso. Al final, en un manual se pueden encontrar los detalles de servicio técnico Sybase en caso de que las soluciones propuestas no hayan funcionado. Actualmente gozan de éxito manuales de instrucciones en forma de animaciones interesantes o vídeo manuales que llegan al usuario mucho mejor que en forma de un folleto. Este tipo de manual ayuda a que el usuario vea el vídeo entero sin saltarse las especificaciones y las descripciones técnicas complicadas de Sybase 2, como se suele hacer teniendo una versión en papel.

¿Por qué vale la pena leer los manuales de instrucciones?

Sobre todo es en ellos donde encontraremos las respuestas acerca de la construcción, las posibilidades del dispositivo Sybase 2, el uso de determinados accesorios y una serie de informaciones que permiten aprovechar completamente sus funciones y comodidades.

Tras una compra exitosa de un equipo o un dispositivo, vale la pena dedicar un momento para familiarizarse con cada parte del manual Sybase 2. Actualmente se preparan y traducen con dedicación, para que no solo sean comprensibles para los usuarios, sino que también cumplan su función básica de información y ayuda.

Índice de manuales de instrucciones

  • Página 1

    Dat aWindow Designer User ’ s Guide Dat aW indow .NET ™ 2.0[...]

  • Página 2

    DOCUMENT ID: DC00043-01- 0200-01 LAST REVISED: March 2006 Copyright © 20 04-2006 by Sy base, Inc. All righ ts reserved. This publicatio n pertains to S ybase software and to any subsequent release until otherwise indicate d in new editions or technic al notes. Information in thi s document is subject t o change without noti ce. T he software descr[...]

  • Página 3

    Content s Data Win dow De si gne r User’s Gu ide iii About This B ook ................................................................................................................ .......... xv PART 1 THE DATAWINDOW DESIGNER ENVIRONM ENT CHAPTER 1 Working with DataWindow Designer .. ......................... .................. 3 About DataWind[...]

  • Página 4

    Contents iv DataW indow .NET How your DataWindow Designer environment is managed ........... 32 About the registry .................................................................... 32 About the initialization file ........................................................ 33 CHAPTER 2 Worki ng with Libraries ........... .......................... [...]

  • Página 5

    Conte nts Dat aWindow D esigner Us er ’s Guide v Closing a table ......................................................................... 70 Dropping a table ...................................................................... 70 Viewing pending SQL changes ............................................... 71 Printing the table definition ......[...]

  • Página 6

    Contents vi DataW indow .NET Using Quick Select ....................................................................... 112 Selecting a table .................................................................... 113 Selecting columns ................................................................. 114 Specifying sorting criteria ...................[...]

  • Página 7

    Conte nts Dat aWindow D esigner Us er ’s Guide vii Working in a grid DataWindow object ................................... 166 Saving data in an external file ...................................................... 168 Saving the data as PDF ........................................................ 168 Saving the data in HTML Table format .........[...]

  • Página 8

    Contents viii DataW indow .NET Adding buttons to a DataWindow object ............................... 210 Adding graphs to a DataWindow object ................................ 213 Adding InkPicture controls to a DataWindow object.............. 213 Adding reports to a DataWindow object ................................ 214 Reorganizing controls in a D[...]

  • Página 9

    Conte nts Dat aWindow D esigner Us er ’s Guide ix The DropDownDataWindow edit style ................................... 249 The InkEdit edit style ............................................................. 251 Defining a code table ................................................................... 251 How code tables are implemented .........[...]

  • Página 10

    Contents x DataW indow .NET Format ................................................................................... 307 Height .................................................................................... 307 Pen.Color .............................................................................. 308 Pen.Style ............................[...]

  • Página 11

    Conte nts Dat aWindow D esigner Us er ’s Guide xi Enhancing crosstabs .................................................................... 344 Specifying basic properties ................................................... 345 Modifying the data associated with the crosstab ................... 346 Changing the names used for the columns and rows [...]

  • Página 12

    Contents xii DataW indow .NET Composite and nested reports .............................................. 395 CDATA sections .................................................................... 397 Comments ............................................................................. 397 Processing instructions .....................................[...]

  • Página 13

    Conte nts Dat aWindow D esigner Us er ’s Guide xiii APPEND IX B The Extended Attribute S ystem Tables ........................ ............ 453 About the extended attribute system tables ................................. 453 The extended attribute system tables .......................................... 454 Edit style types for the PBCatEdt tabl [...]

  • Página 14

    Contents xiv DataW indow .NET[...]

  • Página 15

    Data Win dow De si gne r User’s Gu ide xv About This Book Audience This boo k is written for programmers who need to design DataW indow® objects. DataW indow objects ar e used to ret rieve, present , and manipu late data from a relational database or ot her source. Y ou can use the DataW i ndow objects that you build in DataW indow Designer to c[...]

  • Página 16

    xvi Dat aWindow .NET • The Sy base Produ ct Manuals W e b site is an onl ine versio n of the SyBoo ks CD that you can access using a standard W eb browser . In addition to product manuals , you will find links to EB Fs/Maintenance, T echnical Documents, C ase Manageme nt, Solved Cases , newsgroups , and the Sybas e De velop er Ne twork . T o acce[...]

  • Página 17

    PA R T 1 The Da t aWin dow Designer Environmen t This part in troduces you to DataWindow Desi gner and describe s how to work in and manag e its environment . It also desc ribes how to work with databases, tables, view s, and exten ded attribute s.[...]

  • Página 18

    [...]

  • Página 19

    Data Win dow De si gne r User’s Gu ide 3 CHAPTER 1 W orking with Dat aWindow Designer About thi s chapter This chapter descri bes the basics of working w ith DataW indow Designer and its painters. Conten ts To p i c P a g e About DataW indow Design er 4 The DataW indow Designer e nvironment 4 W orking with projects 6 W orking with DataW indow obj[...]

  • Página 20

    About DataWindow Designer 4 Dat aWindow .NET About Dat aWindow De signer DataW indow Designer is a tool that creates DataW indow objects for use in applications. A DataW indow object is an object that you use to retrieve and manipu late data from a r elational data base or other d ata source. The foll owing DataW indow object r etrieves and updates[...]

  • Página 21

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 5 If you ha ve used Data Window Des igner before Y ou can open an existing p roject by se lecting Open Project or Recent Projects from the File menu, or Open Project from the pop-up menu in the System T ree. When Da taWind ow Designer s tar ts When DataW i ndow Desi[...]

  • Página 22

    Working with projects 6 Dat aWindow .NET Buttons on the PowerBar Fro m left to right on the PowerBar , here are the buttons and what you can do after yo u click a button: Custo mi zi ng the PowerBar Y ou can customize th e PowerBar . For ex ample, you can move it to dif ferent locations and add button s for oper ations you perform freq uently . For[...]

  • Página 23

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 7 ❖ T o create a new project: 1 Click the New b utton in the PowerBar , or select File>New from the menu bar . 2 On the Project page in the New dialog box, select the pro ject icon and click OK. 3 Browse to the location where you want to store the project and t[...]

  • Página 24

    Working with DataWi ndow objects 8 Dat aWindow .NET Creating new Dat a Window objects T o create new DataW indow objects, use the New bu tton in the PowerBar . ❖ T o create a new object: 1 Click the New butto n in the PowerBar , or select File>New from t he menu bar . 2 In the New dialog box , select th e DataW indow t ab page. 3 Select an ico[...]

  • Página 25

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 9 2 In the Open dialog box, select one or more libraries in the Library pane and then select the object you wan t to open. 3 Click OK. The object opens in the DataWindow painter . Running or previewin g Dat aWindow object s T o preview a DataW indow object, use th e[...]

  • Página 26

    Working in painters 10 Dat aWindow .NET W orking in p ainte rs The DataW indow Desi gner painter s are listed in T able 1-1. T able 1-1: DataWi ndow Designer pai nters Using views in painters Most of t he Dat aW i ndow Des igner painter s have views. Each vi ew provides a specific way of viewing or modify ing the object y ou are working on or a spe[...]

  • Página 27

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 11 Displaying t he titl e bar For most views a title bar does not permanently display at the top of a pane (because it is often unnecessary). But you can display a title bar for any pane either temporarily or permanently . ❖ T o displa y a title bar: 1 Place the p[...]

  • Página 28

    Working in painters 12 Dat aWindow .NET A gray outline appears in the pane: 2 Drag the outline to the new locati on. The outline chan ges size as you drag it. When the pointer is o ver the middle of a pane, the outline fills the pan e. As you drag the pointer toward any border , the outline becomes a narrow rectangle adjacent to that bo rder . When[...]

  • Página 29

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 13 ❖ T o move a view in a st acked p ane: • Place the pointer anywhere on the view’ s tab, hold down th e left mouse button, an d start mov ing the view . Y ou can now move the view as in the prev ious procedure. If you want to rearrange the views in a pane, y[...]

  • Página 30

    Working in painters 14 Dat aWindow .NET ❖ T o add a new view to the p ainter window : 1 Select V iew from the menu bar and then s elect the view you wan t to add. The view displays in a new p ane in a new row . 2 Move the pane where you want it . For ho w to move pan es, see “Moving and resizing panes a nd views” on page 1 1. ❖ T o remov e [...]

  • Página 31

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 15 2 Click the N ew Layout button ( second from the left at the top of the dialo g box). 3 T ype an appro priate name in the text box and click OK. Restoring th e default lay out Y ou can restore the d efault layout at any time by selecting V iews>Layout>Defau[...]

  • Página 32

    Working in painters 16 Dat aWindow .NET Defining colors Y ou can define custom colo rs to use in most painters and in o bjects you create. ❖ T o defin e custom co lors: 1 In a painter that uses custom color s, select Design>Custom Colors from the menu bar . The Col or dialog b ox displ ays: 2 Define your cu stom colors: Area of the Col or dia [...]

  • Página 33

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 17 W orkin g with to ols In addition to painters , DataW in dow Designer provides you with some other tools t o help you w ith your work. Y ou can open mo st tools f rom the T ools menu, the Po werBar , or the T ools page in the New d ialog box. T ool su mm ary T ab[...]

  • Página 34

    Working with tools 18 Dat aWindow .NET Editing ac tiv iti es The file editor provides a full set of basic editi ng faci lities including: • Openi ng, savi ng, and pri nting fi les • Cutti ng, copying, pasting, and clearing se lected text • Finding an d replacing text • Undoin g changes • Comme nting and u ncommenting l ines • Impo rting[...]

  • Página 35

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 19 When you mo ve the poin ter over entrie s on the T o-Do list, the pointer chan ges to a hand if it is over a linked entry . Y ou can export or impor t a T o-Do List by sel ecting Impor t or Export fro m the pop-up men u. Doing thi s is useful if you w ant to move[...]

  • Página 36

    Setting properties 20 Dat aWindow .NET Sett ing prop erties In Dat aW indow De sig ner , you set pr op erti es on pages that di sp l ay i n a t abb ed dialog box or in a view in a painter . In the DataW indow painter , you set object properties in the Properties view . In the Database pa inter , you set proper ties in the Object Details view . For [...]

  • Página 37

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 21 • Select Properties from the pop-up me nu of an o bject, control, library name, or tab le or column name • Select Object > Properties or Entry >Properties from the menu bar (de pendi ng on th e pain ter you are working in) • Click the Properties butto[...]

  • Página 38

    Using toolbars 22 Dat aWindow .NET For example, the d own ar row next to the T ext button in the DataW indow painter displays the Co ntrols drop-down toolbar , which has a button for each control you can place on a DataW indow object: Default butto n replaced The button you select f rom a drop- down too lbar replaces the default b utton on the main[...]

  • Página 39

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 23 Moving toolbars using the mouse Y ou can use the mo use to move a to olbar . ❖ T o move a toolbar w ith the mou se: 1 Position the pointer on the grab bar at the left of th e toolbar or on any vertical line s eparating g roups of buttons. 2 Press an d hold the [...]

  • Página 40

    Using toolbars 24 Dat aWindow .NET The Cust omize dialog box dis plays. 3 Click the palette of buttons you want to use in the Select pa lette g r oup. 4 Choose a button fr om the Selected palette bo x and drag it to the posi tion you wa nt in the Cur rent tool bar box. If you ch oose a butt on from the Cus tom palette, another dial og box displ ays[...]

  • Página 41

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 25 ❖ T o delete a bu tton from a toolbar: 1 Position the pointer on the too lbar, display the pop-up menu, and select Customize. 2 In the Cur rent toolbar b ox, select t he button and dr ag it outside the Curr ent toolba r box. Resetting a toolb ar Y ou can restor[...]

  • Página 42

    Using toolbars 26 Dat aWindow .NET ❖ T o add a custom button: 1 Positi on the point er on the to olbar , display the po p-up menu, and select Customize. 2 Select Custom in the Select Palette group. The custom buttons display in th e Selected Palette box. 3 Select a custom button and drag it to where yo u want it in the Current toolbar box . The T[...]

  • Página 43

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 27 5 In the Item T ext box, specify the text associated with th e button in two parts separat ed by a comma—the text that displays on the button and text for the button 's Po werT ip: ButtonT ext, Power Tip For example: Save, Save File If you specify only one[...]

  • Página 44

    Using toolbars 28 Dat aWindow .NET The defaul t command lin e is: DataWindow /o DataWindowN ame /ro Modifying a custom button ❖ T o modi fy a custom button: 1 Positi on the point er on the to olbar , display the po p-up menu, and select Customize. 2 Double-click the butt on in the Cu rrent toolbar box. 3 Make your changes, as desc ribed in “Add[...]

  • Página 45

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 29 Using onlin e Help DataW indow Designer has online Hel p that provides both refer ence and task-oriented informatio n. Context-sensitive and reference information is provided i n W indow s Help for mat. T ask-oriented in formation is provid ed in compiled HTML He[...]

  • Página 46

    Customizing keyboard sh ortcuts 30 Dat aWindow .NET Customizing keyb oard shortcuts Y ou can associate your own key board shor tcuts wit h DataW indow Designer menu items. Tip Creating keyboard shor tcuts means you can us e the keyboard i nstead of t he mouse in many s itu ations , such as chan gi ng libraries, objects, o r connections, by creating[...]

  • Página 47

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 31 3 Press the keys you wan t for the s hortcut; t he new shor tcut displ ays in the textbo x. If you t ype a short cut that is already bei ng used, a mes sage notifies you so that you can type a dif ferent shortcut or change the exis ting short cut. ❖ T o remove [...]

  • Página 48

    How your DataWindow Designer environment is managed 32 Dat aWindow .NET Use the Printer font tab to set fonts specifically for printing. If you need to pr int multilanguage char acters, make sure you u se a font that is installed on y our prin t e r . Cha n ges yo u make in th e T ools > System Option s dialog box and fr om the Desi gn>Option[...]

  • Página 49

    CHAPTER 1 Working with DataWindow Designer Data Win dow De si gne r User’s Gu ide 33 About the init ialization file The initialization file is a text file that co ntains var iabl e s th at sp ecify your DataW indow Designer pref erences. Thes e prefer ences include information such as the l ast datab ase you conn ected to and th e PBL you a re us[...]

  • Página 50

    How your DataWindow Designer environment is managed 34 Dat aWindow .NET ❖ T o spe cify a differen t location for DW .INI: 1 Select T o ols>System Option s from the menu b ar . 2 On the General tab page, enter the path of your initializatio n file in the Initialization Path textbox. DataW indow Desi gner record s the path in the W indows regi s[...]

  • Página 51

    Data Win dow De si gne r User’s Gu ide 35 CHAPTER 2 W orking with Librari es About thi s chapter DataW indow Designer stor es all th e objects you create in libraries. This chapter describes how to work with your lib raries . Conten ts About libraries DataW indow Designer uses libr ar ies to hold objects. A library is a file with the file extensi[...]

  • Página 52

    About the Library painter 36 Dat aWindow .NET What you ca nnot do i n the Libr ary pa inte r Y ou cannot create a library or ren ame a library in the Library painter . For inform ation about cr eating a library , see “W orking with proj ects” on page 6. Y ou cannot create new Da taW indow objects or queries in the Library painter . Y ou cannot [...]

  • Página 53

    CHAPTER 2 Working with Libraries Data Win dow De si gne r User’s Gu ide 37 About sorting the Name colum n When you Click the Name column header repeatedly to s ort, the sort hap pen s in four ways : by obj ect t ype and then name i n bo th ascen di ng and des cend ing order and by obj ect name in both ascending and descending order . Y ou may not[...]

  • Página 54

    Working with li braries 38 Dat aWindow .NET Usin g drag and drop to ex pand it em s Y ou can dr ag and drop items to expand them and see the contents: For exampl e, you can d rag a libr ary fr om the T ree view and drop it in the List view to quickly d isplay the objects the library contains in the List view . For inform ation about u sing drag an [...]

  • Página 55

    CHAPTER 2 Working with Libraries Data Win dow De si gne r User’s Gu ide 39 Selecting objects In the List view , you can select one or more libraries or o bjects to act on. ❖ T o select multiple entries: • In the List view , use Ctrl+Click (for individu al entries ) and Shift+Click (for a group of ent r ies). ❖ T o selec t all entrie s: • [...]

  • Página 56

    Working with li braries 40 Dat aWindow .NET Overri ding the choices you ma de for a specif ic vie w In either the T ree view or the List view , you can overr ide your choice of object s that display in all libra ries by selecting a library , dis playing the library’ s pop-up menu, and then clearing or selecting items on the list of objects . Filt[...]

  • Página 57

    CHAPTER 2 Working with Libraries Data Win dow De si gne r User’s Gu ide 41 ❖ T o copy o r move objec t s using drag and drop: 1 In the T ree view or the List view , se lect the objects you want to co py or move. 2 Press Shift to mo ve the ent ries. Otherwise, the objects will b e copied. 3 Drag the objects to a library in either view (o r if th[...]

  • Página 58

    Working with li braries 42 Dat aWindow .NET Setting the root In either the T ree view or the List vi ew , you can set the root location o f the view . ❖ T o set the root of th e current view : 1 In either view , select V iew>Set Root from the menu bar , or select Se t Root from th e pop-up menu. 2 If yo u want the ro ot to be a direct ory o r [...]

  • Página 59

    CHAPTER 2 Working with Libraries Data Win dow De si gne r User’s Gu ide 43 Modifying comments Y ou can use commen ts to document your objects an d libraries. Y ou can associate comments with an object when yo u fi rs t s ave it in a pai nter , and you can use the Libra ry painter to: • Modify exis ting commen ts for obj ects • Add commen ts t[...]

  • Página 60

    Optimizing li braries 44 Dat aWindow .NET Deleting libraries ❖ T o dele te a library: 1 In either the T ree view or the List view , select th e lib rary you want to delet e. 2 Select Libr ary>Delete fr om the menu bar . Restrict ion Y o u cannot delete libraries in the current library list . The Delete Li brar y di alog box displays , sh ow in[...]

  • Página 61

    CHAPTER 2 Working with Libraries Data Win dow De si gne r User’s Gu ide 45 If you do not want a bac kup file If you do not want to save a backup copy of the library , clear the Save Optimized Backups ch eck box in the Li br ary painter's Design>Opt ions tab dialog box. If you clear this opt ion, the new setting remains in effect until you[...]

  • Página 62

    Exporting and importing entries 46 Dat aWindow .NET DataW indow Design er uses proj ect (.dwp) files to manage libraries. Th e following s a m ple has three libraries: lib1.pbl , lib2.pbl , and lib 3.pb l . If you delete the library listed on the applib lin e, l ib1.p bl , from the library list, you cannot migrate the project to the curren t versio[...]

  • Página 63

    CHAPTER 2 Working with Libraries Data Win dow De si gne r User’s Gu ide 47 ❖ T o export entries to text files: 1 Select the Library entries you want to export. 2 Click the Export button. or Select Ent ry>Export fro m the menu bar . The Export Library En try dialog b ox disp lays show ing the nam e of the first entry selected for export in th[...]

  • Página 64

    Creating a deployment li brary (PBD file) 48 Dat aWindow .NET 3 Click Open. The Import File Into Library Entry dialog b ox displays listing the libraries in the library search path. 4 Select the library you want to impor t the text files to . 5 Click OK. DataW indow Desi gner conver ts the speci fied text f iles to Data W indow Designer form at, re[...]

  • Página 65

    CHAPTER 2 Working with Libraries Data Win dow De si gne r User’s Gu ide 49 A PBR f ile is an ASC II text f ile in whi ch you lis t resource names (such as B MP , CUR, R LE, an d WMF f i les) an d DataWindow ob jects . ❖ T o create a PowerBui lder resource fil e (PBR file): • Using a text editor , cr eate a text file that lists all resource fi[...]

  • Página 66

    Creating a library directory report 50 Dat aWindow .NET ❖ T o crea te the libra ry directory report: 1 Select the current library . 2 Select Library>Print Directory f rom the menu bar . DataW indow Designer sends the library directory repo rt to the prin ter specified un der File>Pri nter Setup in t he menu bar .[...]

  • Página 67

    Data Win dow De si gne r User’s Gu ide 51 CHAPTER 3 Managing the Dat abase About thi s chapter Thi s c hapte r des c ribes how to m ana ge the da taba s e from withi n Data W i ndow Desig ner. Conten ts Before yo u begin Y ou work wit h relatio nal databases in DataW indow Design er. If you ar e not familiar with relational databas es, you migh t[...]

  • Página 68

    Working with database components 52 Dat aWindow .NET How you work with dat abases in Dat aWindow Designer Y ou can use DataW indow Design er to work wit h the follo wing database components: • T ables and co lumns •K e y s • Indexe s • Database views • Exte nded a ttrib utes • Add i tion al dat abase compo n ents T ables and col umns A [...]

  • Página 69

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 53 In the following illustr ation there is a join on the dept_ id column, which is a primary k ey for the de pa rtm ent table and a foreign key for th e employee tab le: For more i nformation, s ee “W orking with keys” on page 75. Indexes An index is a column or set of col[...]

  • Página 70

    Managing databases 54 Dat aWindow .NET Extende d attribute s Extended attributes enable you to store information about a table’ s columns in special sys tem tables. U nlike tables, keys, in dexes, and da tabase views (which are DBMS-specific), extend ed attributes are DataW indow Designer-specific. The most powerf u l extended attributes determin[...]

  • Página 71

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 55 What you can do Using the Database painter, you can do the following in any DBMS to which you have been given access by the database ad ministrator: • Modify local table and column properties • Retrieve, change, and in sert data • Create new local tables or modify exi[...]

  • Página 72

    Using the Database painter 56 Dat aWindow .NET Views i n the Databa se pai nt e r T a b le 3-1 lists the views available in the Database painter . T able 3-1: Database painter v iews View De scri ptio n Activit y Log Displays th e SQL synta x gener ated by the a ctions yo u execute. Columns Used to create and/ or modify a table’ s columns (former[...]

  • Página 73

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 57 Draggin g and dropping Y ou can select certain database ob jects from th e Objects view and drag them to the Object Details, Object Layout, Columns , and/ or ISQL views. Just positi on the pointer on t he database ob ject ’ s icon and drag it to the appropriate view . T a[...]

  • Página 74

    Using the Database painter 58 Dat aWindow .NET Modifying database preferences T o modi fy database preferences , select Des i gn>Op tions from the me nu ba r. Some preferences are s pecific to the data base connection; others are specific to the Database painter . Preferenc es on the Gener al pro p erty page The Connect T o Default Profile, Shar[...]

  • Página 75

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 59 Preferen ces on th e Object Co lors property page Y ou can set colors separately for each comp onent of the Database painter's graphical table representation: the table header , columns, indexes, primary k ey , foreign keys, and joins. Set a color pr eference by select[...]

  • Página 76

    Creating and deleting an Adaptiv e Server Anywhere database 60 Dat aWindow .NET ❖ T o stop the log: • Select S top Log from the Desi gn menu or the pop-up men u in the Activity Log view . DataW indow Desi gner stop s se nding th e generated synt ax to the Act ivity Log vi ew . Y our w ork is no long er log ged. ❖ T o sav e the log to a perman[...]

  • Página 77

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 61 3 Define other prop erties of the database as need ed. If you ar e using a non-Eng lish databas e, you can specify a code page in the Collation Sequence bo x. For complete informatio n about f illin g in the dialog box, click the Help button i n the dialog box. 4 Click OK. [...]

  • Página 78

    Working with tables 62 Dat aWindow .NET W orking with t ables When you open the Database painter , the Object view lists all tables in the current database that y ou have access to (i ncluding tables that were not created using DataW indow Designer). Y ou can create a new table or alter an existing table. Y ou can also modify table properties an d [...]

  • Página 79

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 63 5 Click the S ave button o r select Sav e from the Fi le or pop-u p menu, then enter a name for th e table in the Create New T able dialog box. DataW indow Designer subm its the pending SQL syntax statemen ts it generated to the DBMS, and the table is created. The new tabl [...]

  • Página 80

    Working with tables 64 Dat aWindow .NET Specifying column definitions When you create a new table, you must specify a definition for each column . The fields that di splay for each column in the Columns view depend on you r DBMS. Y ou might not see all of the followi ng fields, and the values th at you can enter are dep endent on the DBMS. For mor [...]

  • Página 81

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 65 Spec if ying t able propertie s In addition to adding a comment to associate with the table, you can choose the fonts that will be used to display information from the table in a DataWindow object. Y ou can specify the font, p oint size, color , and style. ❖ T o specify t[...]

  • Página 82

    Working with tables 66 Dat aWindow .NET S peci fying column extended attr ibut es In addition to addin g a comment to associate with a column , you can specify extended attributes fo r each column. An extended attribute is information specific to DataW indow Designer that en hances the d efinition of the colum n. ❖ T o specify exte nde d attribut[...]

  • Página 83

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 67 Overriding de finitions In the DataWindow painter, you can ove rride the extended attributes specified in the Database painter for a particular DataWindow object. How the in formation is stored Extended attrib utes are stored in the DataW indow Designer system tables in the[...]

  • Página 84

    Working with tables 68 Dat aWindow .NET S pecifyi ng a col umn as a picture Y ou can specify that a character colu mn can contain nam es of picture files. ❖ T o spe cify that colu mn values a re name s of picture file s: 1 On the Display prop erty page, select the Picture check b ox. When the Picture check box is selected, DataW indow Designer ex[...]

  • Página 85

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 69 Data base p ainter is DBM S aware The Database paint er gray s out or not ifi es yo u about action s that your DBMS prohibits. For complete information abo ut what you can and cannot do when you modif y a table in your DBMS, see your DBMS documen tation. ❖ T o alter a t a[...]

  • Página 86

    Working with tables 70 Dat aWindow .NET Cutting, copying, and pasting columns In the Database painter , you can use the Cut, Copy , and Paste b uttons in the PainterBar (or Cut, Copy , and Paste f rom the Edit or pop-up menu) to cut, copy , and paste one co lumn at a time within a table or b etween tables. ❖ T o cut o r copy a colu mn within a t [...]

  • Página 87

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 71 Deletin g orphaned tabl e i nfo r matio n If you drop a table outside DataWin dow Designer, information rem ains in the system tables about the table, in cludin g extended attributes for the columns. ❖ T o delete orphaned t able information from the extended attribute sys[...]

  • Página 88

    Working with tables 72 Dat aWindow .NET ❖ T o copy the SQL synt ax to the clipbo ard: • In th e Pending Syn t ax vi ew , clic k the Copy but ton or select Copy from the pop-up menu . ❖ T o sav e SQL synt ax fo r execution a t a later ti me: 1 In the Pending Syntax view , Select File>Save As. The Save Syn tax to File di alog box d isplays. [...]

  • Página 89

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 73 ❖ T o export th e synt ax of an e xisting t a ble to a log: 1 Select the table in the painter workspace. 2 Select Export Syntax fro m the Object me nu or the pop -up menu. If you selected a table and have more than one DBMS interface installed, the DBMS di alog box disp l[...]

  • Página 90

    Working with tables 74 Dat aWindow .NET T able 3-6: Extended attribute syste m tables Openi ng and disp la yi ng sy ste m t ables Y ou can open system t ables like o ther tables, in the Database pai nter . By default, DataW indow Designer show s only user- created tables in the Objects v iew . If you highligh t T ables an d select Show Sys tem T ab[...]

  • Página 91

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 75 Working with keys If your DBMS suppor ts primary and for eign keys, you can work with the keys in DataW indow Designer. Why you should u se keys If your DBMS supp orts them, you shou ld use pri mary and for eign keys t o enforce the referential integrity of your databas e. [...]

  • Página 92

    Working with keys 76 Dat aWindow .NET In the following pict ure, the Dep artment table has two key s: • A pr i m ary k ey (on de pt_id ) • A foreig n key (on dept_head_id ) If you cannot see the lines If the c olor of your window backg round makes it hard to s ee the lines f or the keys and indexes, you can set the colors for each component of [...]

  • Página 93

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 77 • Expand the table’ s tree view , right-click Primar y Key , and select New Primary Key from the pop-up menu . The Primary Key properties disp lay in the Object Details view . 2 Select one or more columns for the primary key . Columns that a re allowed in a primary k ey[...]

  • Página 94

    Working with keys 78 Dat aWindow .NET Defining foreign k eys I f your DBMS supports foreign k eys, you can define t hem in Data W indow Designer . ❖ T o create a foreign key: 1 Do one of the follo wing: • Highlight the table and click the Create For eign Key drop-down toolbar button in Painter Bar1 . • Select Object>Insert>Foreign Key f[...]

  • Página 95

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 79 Modi fyi ng key s Y ou can modify a pri mary key in D ataW indow D esigner. ❖ T o modify a primary key: 1 Do one of t he following: • Highlight the primary k ey listed in the table’ s expanded tree view and click the Properties butto n. • Select Properties from the [...]

  • Página 96

    Working with indexes 80 Dat aWindow .NET Creati ng an ind ex In Adaptive Server Anywhere dat abases In Adapt ive Server Anyw here databa ses, you sho uld not d efine an index on a column that is defined as a foreign key , because for eign keys are alread y optimized for quick reference. ❖ T o create an ind ex: 1 Do one of the follo wing: • High[...]

  • Página 97

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 81 2 In the Object Details view , select or deselect column s as needed. 3 Right-click on t he Object Detail s view and s elect Sa ve Chan ges from t he pop- up me nu . Any changes you made in the view are immediately sav ed to the table definitio n. Droppin g an index Droppin[...]

  • Página 98

    Working with database views 82 Dat aWindow .NET Y ou de fine, op en, an d mani pulate databa se vie ws in the V iew pa inter, which is similar to the Select p ainter . For more informatio n about the Select painter, see “Selecting a data source” on page 110. Up dating dat abase views Some datab ase views are logically up datable and others are [...]

  • Página 99

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 83 For information, see the section on using the SQL Select painter in “Selecting a data source” on page 1 10. The V iew painter and the SQL Select painter are similar . 6 When you h ave completed t he view , click the Return button. 7 Name the view . Include view or some [...]

  • Página 100

    Working with database views 84 Dat aWindow .NET The completed SELECT statement used to create the datab ase view displ ays i n the D e finit ion fi eld on the Gen eral page: V iew dialog box is read-o nly Y ou cannot alter the view definition in the Object Details view . T o alter a view , drop it and create another v iew . Joinin g t ables If the [...]

  • Página 101

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 85 3 T o create a join other than the equality join, click the joi n representation in the workspace. The Join di alog box di splays: 4 Select the join operator you wan t from the Join dialog b ox. If your DBMS sup por ts o uter joins, outer join options als o disp lay in the [...]

  • Página 102

    Manipulating data 86 Dat aWindow .NET Manipulating d at a As you w ork on the dat abas e, y ou often wa nt to look at exi s tin g d at a or creat e some dat a for tes ting purpos es. Y ou might also wa nt to test displa y formats, validation rules, and edit styles on real data. DataW indow Desi gner prov ides data man ipulation for su ch purposes. [...]

  • Página 103

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 87 This window is in the grid format: Only a few rows of data display at a tim e. Y ou can use the First, Prior , Next, and L ast bu ttons to move from p age to page. Modifying data Y ou can add, mo dify , o r delete rows. W hen you have f inished man ipulating th e data, you [...]

  • Página 104

    Manipulating data 88 Dat aWindow .NET Sorting rows Y ou can sort the data, but any sort criteria you define are fo r testing only and are not saved with the table or passed to the DataW indow painter . ❖ T o sort th e rows: 1 Select Rows > Sor t from th e menu ba r . The Specify Sort C olumns dialog box displays. 2 Drag the co lumns you want t[...]

  • Página 105

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 89 5 Click OK to return to the S pecify Sort C olum n s dialog box with the expressi on displa yed. If you chang e your mind Y ou can remove a column or exp ressio n from the sorting specification by simply dragging it an d releasing it outside the Columns box. 6 When you have[...]

  • Página 106

    Manipulating data 90 Dat aWindow .NET ❖ T o remov e the filter: 1 Select Rows>Filter from the menu bar . The Specify Filter dialog box displays, showin g the current filter . 2 Delete the filter expression, then click OK. Filtered row s and up dates Filtered rows are updated when you update the databas e. Viewing row information Y ou can displ[...]

  • Página 107

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 91 2 Specify the fi le from wh ich you want t o import t he data. The types of files y ou can import into the painter are show n in the Files of T ype drop-down list. 3 Click Open. DataW indow Designer reads th e data from the file. Y ou can click the Save Changes button o r s[...]

  • Página 108

    Creating and executing SQL stateme nts 92 Dat aWindow .NET 2 Choose a format for t he file. Y ou can select from several fo rmats, includ ing Power soft report (P SR), XML, and HTML. If you wan t the column headers saved in the f ile, select a file format that includes headers, s uch as Excel W ith Headers. When y ou select a with headers format, t[...]

  • Página 109

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 93 Creating stored proced ures Y ou can use the In teractive SQL view to create stored proced ures or triggers , but make sure that th e pain ter ' s SQ L st atement terminator character is not the same as the terminator character used in the s tored procedure l anguage o[...]

  • Página 110

    Creating and executing SQL stateme nts 94 Dat aWindow .NET 2 Double-click the approp riate icon to select the statement type . The Select T able dialog box display s. 3 Select the table(s) you will referen ce in the SQL statement. Y ou go to the Select, Insert, Update, or Delete painter , depending on the type of SQL statement you are p asting. The[...]

  • Página 111

    CHAPTER 3 Managing the Database Data Win dow De si gne r User’s Gu ide 95 Sybase Adaptive Serve r Enterprise stored proce dures When you use the Database painter to execute a Sybase Adaptive Server Enterprise system s tored procedur e, you must start th e syntax with the keyword EXEC or EXECUTE . For example, enter EXEC SP_L OCK . Y ou cannot exe[...]

  • Página 112

    Controlling access to the current database 96 Dat aWindow .NET Setting Sc ript and Font properties Select Design>Options from the menu bar to open the Database Prefer ences dialog box. Th e Script and Font properties are the same as those y ou can set for the file editor . For mor e information , see “Using the file e ditor” on page 17. Edit[...]

  • Página 113

    PA R T 2 Dat aWindows This part in troduces you to the many styles of DataWindows available i n DataWindow D esigner and describe s how to create and work with them.[...]

  • Página 114

    [...]

  • Página 115

    Data Win dow De si gne r User’s Gu ide 99 CHAPTER 4 Defining Dat aW indow Objects About thi s chapter This c hapter describes h ow t o defin e DataW indow object s to di s play an d manipulate data. Conten ts Abou t Dat aW indow obj ect s A DataW indow object is an object yo u use to retrie ve, present, and manipulate d ata from a relati onal dat[...]

  • Página 116

    About DataWindow ob jects 100 Dat aWindow .NET Dat aWindow object examples Y o u can display the data in the format th at best pres ents the data to you r u ser s. Edit styles If a col umn can take onl y a small number of valu es, you can h ave the data appear as rad i o b utt ons in a DataW indow object s o that u ser s kno w what their choices ar[...]

  • Página 117

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 101 Choosing a present a tion style The presentation style you select fo r a DataW indow object determines the format Dat aW indow Des igner uses to display t he DataW indow object i n the Design view . Y ou can use the format as dis played or modif y it to meet your nee[...]

  • Página 118

    Choosing a presentation style 102 Dat aWindow .NET Using the T abular style The T abular presentation style pr esents data with the data column s going across the pag e and headers abov e each column. As many rows from the database will disp lay at one time as can fit in the DataWindow object. Y ou can reor ganize th e default l ayout any w ay you [...]

  • Página 119

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 103 Using the Grid style The Grid presentation s tyle shows data in row-and-column f ormat with g rid lines separating r ows and col umns. W ith other styles, you can move text , values, and o ther objects ar ound freel y in designing the report. W ith the gr id style, t[...]

  • Página 120

    Choosing a presentation style 104 Dat aWindow .NET Maili ng labels Busi ness ca rds Name tags S pecif ying l abel properti es If you ch oose the Label style, y ou are asked to sp ecify the properties for the label after specifying the data source. Y o u can choose f rom a list of predef ined label t ypes or enter y our own sp ecifications manually [...]

  • Página 121

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 105 Using the N-Up style The N-Up style presents two or more rows of d ata next to each other . It is similar to the Label style in that you can have inform ation from several rows in the database across the pag e. However, the information is not meant to be printed on l[...]

  • Página 122

    Choosing a presentation style 106 Dat aWindow .NET Here is the DataW indow object in the Preview view: Another wa y to get multip le-column Dat aWindow objects In an n-up D ata W indow object, the dat a is dis pl ayed acros s an d t hen d own. If you want your data to go down th e page and then acr oss in multiple columns, as in a pho ne list, yo u[...]

  • Página 123

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 107 For more about th e Group presentation st yle, see Chapter 9, “ Filtering, Sorting, and Group ing Row s .” Using the Composite style The Composite presentatio n style allows you to combine multiple DataW indow objects in t he sam e objec t. It is par ticul arly h[...]

  • Página 124

    Choosing a presentation style 108 Dat aWindow .NET Using the Graph and Cross t ab styles In addition to the (p receding) text-based presentation styles , DataWi ndow Designer provides t wo styles that allow y ou to displ ay inform ation graphicall y: Graph and C rosstab. There is a graph report in the composite report in “Using the Com posite sty[...]

  • Página 125

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 109 This T reeV iew style report groups by manager ID an d state and lists empl oyee informati on and salari es : For more about th e T reeV iew presentation style, see Chapter 13, “W or king with TreeV i ew s.” Building a D at aWindow o bject Y ou use a wiz ard to b[...]

  • Página 126

    Selecting a data s ource 11 0 DataW indow .NET ❖ T o crea te a new Dat aWindow object: 1 Select File>New from the menu ba r and select the DataW indow tab. 2 Choose a pr esentation style for the DataW indow object. The presen tation styl e determines how the data is displayed. S ee “Choosing a presentat ion style” on page 1 01. When you ch[...]

  • Página 127

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 111 If the dat a is in the dat abase If the data for t he DataW indow obj ect will be retrieved from a database, choose one of th e following d ata sources: If the dat a is no t in a dat abase Select the External data s ource if: • The DataW indow object will be popula[...]

  • Página 128

    Using Quick Sel ect 11 2 DataW indow .NET Using Quick Select The easiest way to def ine a data source is us ing Quick Select. ❖ T o defin e the dat a using Quick Select: 1 Click Quick Select in the Choose Data Source dialo g box in the wizard and click Next . 2 Select the table that you will use in the DataWindow object. For mor e information , s[...]

  • Página 129

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 11 3 Selecting a table When you choos e Quick Select, the Quick Select dialog box displays. The T ables box lists tabl es and views in the curren t database. Displayi ng t able com ment s T o display a comment ab out a table, po sition the pointer o n the table and click[...]

  • Página 130

    Using Quick Sel ect 11 4 DataW indow .NET Meanin g of the up and down arrows An arrow displays next to a table to indicate its relationship to the selected table. The arrow always points in the many directio n of the relationship— toward the selected table ( up) if the sel ected table contains a fo reign key in the relationship and away from the [...]

  • Página 131

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 11 5 As you sel ect col umns, they di spl ay in t he grid at the bo ttom of the dialog box in the order in which you select them. If you want the columns to display in a differen t order in the DataW indow object , select a colum n name you want to move in the grid and d[...]

  • Página 132

    Using Quick Sel ect 11 6 DataW indow .NET As you specify s election criteria, DataW indow Desig ner builds a WHERE clause for the SELECT statement. ❖ T o specify selection criteria: 1 Click the Criteria row below the first column for which you want to select the data to retrieve. 2 Enter an expr ession, or if the column has an ed it style, select[...]

  • Página 133

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 11 7 Compar ison o perators Y ou can use the LIKE , NOT LIKE , IN , and NOT IN oper ators to compare expression s. Use LIKE to search for strings that match a predetermined pattern. Use NOT LIKE t o find strings that do not match a predet ermined pattern . When you use L[...]

  • Página 134

    Using Quick Sel ect 11 8 DataW indow .NET SQL expression examples The first six examples in this section a ll refer to a grid that contains three columns: EmpId , DeptId , a n d Sala ry . Exampl e 1 The expression <50000 in the Criteria row in the Salary column in the grid retrieves info rmation for employees whose salaries are less than $5 0,00[...]

  • Página 135

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 11 9 Exam ple 4 The expr essions 100 in the Criteria row and >3 00 in the Or row for the DeptId column, together with the expressi on <50000 in the Criteria row in the Salary column, retrieve informatio n for empl oyees wh o belo ng to: • Department 100 an d have[...]

  • Página 136

    Using Quick Sel ect 120 Dat aWindow .NET The SELECT statement that DataW indow Designer creates is: SELECT emp_id, dept_id, salary FROM employee WHERE (emp_id >= 500 AND emp_id <= 1000) AND (salary >= 30000 AND salary <= 50000) Exampl e 7 In a grid with three co lumns: Emp La st Name , Emp First Name , and Sal ary , the expre ssions LIK[...]

  • Página 137

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 121 Using SQL Select In specif ying data fo r a DataW indow object, you have mor e options for specifying complex SQL st atements when you use SQL Select as the data source. When you choo se SQL Select, you go to the Select painter , where you can paint a SELECT statemen[...]

  • Página 138

    Using SQL Select 122 Dat aWindow .NET 6 Limit the retrieved row s with WHE RE , ORDER BY , GR OUP BY , and HA VING criteria, if appropriate. For mor e informati on, see “Specifying selecti on, sort ing, and grouping criteria” o n page 130. 7 If you wan t to eliminate duplicate ro ws, select Distinct f rom the Design menu. This adds the DISTINCT[...]

  • Página 139

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 123 Below the T able Layout v iew , severa l tabbed views also disp lay by defa ult. Y ou use th e views (fo r example, Co mpute, Havi ng, Group) to spec ify the SQL Select statement in mor e detail. Y ou can turn the views on and of f from the V iew menu on the menu bar[...]

  • Página 140

    Using SQL Select 124 Dat aWindow .NET Selecting columns Y ou can click each column y ou want to include fro m th e table r epres entation s in the T able Layout view . DataW indow Designer highlights selected columns and places them in th e Selection List at the top of the Select painter . ❖ T o reorde r the selected columns : • Drag a column i[...]

  • Página 141

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 125 3 Press the T ab key to get to the next row to define another computed column, or click another tab to make addition al specifications. DataW i nd ow Desig ner adds the comp ut ed columns to th e list of columns you have s elected. Abou t comput ed columns and comput[...]

  • Página 142

    Using SQL Select 126 Dat aWindow .NET ❖ T o edit the SELECT st atement: 1 Select Design > Convert to Syntax fro m the menu bar . DataW indow Designer displays the SELEC T statement in a text window . 2 Edit the SELEC T statement. 3 Do one of the follo wing: • Select Design > Convert to G raphics from the menu b ar to return to the Select [...]

  • Página 143

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 127 The Join di alog box di splays: 4 Select the join operator you want and click OK. If your DBMS sup por ts o uter joins, outer join options als o disp lay in the Join dial og box. Using ANSI outer joins All DataWi ndow Designer database interfaces provide support for [...]

  • Página 144

    Using SQL Select 128 Dat aWindow .NET The order o f evaluation f or ANSI syn tax nested out er joins is determined by the or der of t he ON search conditio ns. This mean s th at you must create the outer joins in the intended evaluation order and add n e sted outer joins to the end of the existing seque nce, so that the second table-r eference in t[...]

  • Página 145

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 129 Equivalent s tatem ent s The syntax ge nerated when you select table A then table B and create a left outer join i s equivalent to the synt ax generate d when you sel ect table B then table A and create a right outer join. For more ab out outer j oins, see your DBMS [...]

  • Página 146

    Using SQL Select 130 Dat aWindow .NET ❖ T o defin e retrieva l argumen ts: 1 In the Select painter , select Design > Re trieva l Argum ents fr om t he menu bar . 2 Enter a name and select a datatype for each arg ument. Y ou can enter any valid SQL iden tifier for the ar gument name. Th e position number identif ies th e ar gument posit ion in [...]

  • Página 147

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 131 Dynamically selecting, sorting, an d grouping dat a Selection , sorting, and g rouping c riteria that you define in the Select painter are added to the SQL statement and processed by the DBMS as part of the retrieval. Y ou can also define selection, so rting, and g r[...]

  • Página 148

    Using SQL Select 132 Dat aWindow .NET For example, if you ar e retrieving information about emp loyees, you can limit the employees to tho se in Sales and Marketing, or to those in Sales and Marketing who make mo re than $50,00 0. ❖ T o define WHERE criteria: 1 Click the Where tab to m ake the Where view available (or select V iew>Where if the[...]

  • Página 149

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 133 For each additional exp ression, select a logical operator ( AND or OR ) to connect the multiple boolean ex pre ssion s into one e xpressi on that DataW indow Designer evaluates as true or false to limi t the rows that are retrieved. 7 Define sorti ng (S or t view) ,[...]

  • Página 150

    Using SQL Select 134 Dat aWindow .NET 4 Define li miting (Where vi ew), grouping (Group vi ew), and limit ing groups (Having view) criteria as appropria te. 5 Click the SQL Select button to return to th e DataW indow pa int e r . Defining GROUP BY crit eria Y ou can group the r etrieved r ows by sp ecifying groups that corres pond to t he GROUP BY [...]

  • Página 151

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 135 3 Continue to specify ad ditional colum ns for groupin g within the f irst grouping co lumn as needed. T o change the grouping o rder , drag the column na mes in the rig ht side to the positions you want. 4 Define sort ing ( So rt view), limiting (Where view), and li[...]

  • Página 152

    Using Query 136 Dat aWindow .NET Using Query When you cho ose Query as the data s ource, you select a predef ined SQL SELECT s tatement (a query) as specifying the data for your DataW indow object. ❖ T o de fine the da ta us ing Q uery : 1 While using any of the DataW indow wizards, click Query in the Choose Data Source dialog box. Then click Nex[...]

  • Página 153

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 137 What you do next In a script, you need to tell DataW indow Designer how to get data into the DataW indow objec t in your applicati on. T ypically , you impor t data at runt ime using a method (such as Impo rtFile and ImportString ) or d o some data manipulation and u[...]

  • Página 154

    Using Stored Procedure 138 Dat aWindow .NET • T o build the result set descr ip tio n automatically , clear the Manual Resul t Set check b ox and clic k Next. DataW indow Designer executes the stored procedure and build s the resu lt set de scriptio n for you. • T o define the r esult set descr iption manually , select the Manual Resu lt Set ch[...]

  • Página 155

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 139 The syntax is: execute sp_procname ; num arg1 = : arg1 , arg2 = : arg2 ..., argn =: arg n where sp_procnam e is the name of t he stored procedure, num is the stored procedure gr oup suf fix, and arg1 , arg2 , and ar gn are the stored procedure’ s arguments. The gro[...]

  • Página 156

    Using ADO DataSet 140 Dat aWindow .NET 2 Select the XSD file you want to us e to access the data. 3 Select one DataT able that you will use as the data source for the DataW indow object. 4 Complete the DataW indow wizard as n eeded for the presentation style you are using. When you have finis hed interacti ng with the wi zard, you go to the DataW i[...]

  • Página 157

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 141 Default s for strin g an d decimal dat atypes The System.String type does not always specify a maximum length. The length of string columns defaults t o 40 characters in the DataW i ndows. Th e System.Decimal types d o not specif y a pr ecision, and the precision def[...]

  • Página 158

    Generating and saving a DataWindo w object 142 Dat aWindow .NET 4 Change on e or more of the follow ing propert ies: 5 Click OK. About color s elections If you s elect W i ndow Background, A pplication W orkspace, Button Face, or W indow T ext fr om the C olor d rop-down li s t, t he D ata W indow object us es t he colors specified in the W indows [...]

  • Página 159

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 143 About the extended at tribute system tables and Dat aWindow objects The extended attribute system tables are a set of tables maintained b y the Database pai nter . They co ntain infor mation abo ut databas e tables an d columns. Extended attribute informatio n exten [...]

  • Página 160

    Generating and saving a DataWindo w object 144 Dat aWindow .NET Saving the DataWindow object When you have created a D ataW indow o bject, you shou ld save it. T he first time you save it you give it a name. As you work, yo u should sa ve your DataW indow object f requentl y so that you do not lo se change s. ❖ T o sav e the Dat aWindo w object: [...]

  • Página 161

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 145 3 Select the object you want. DataW indow Designer opens the Da taW indow p ainter and di splays the DataW indow object. Y ou can also open a DataW indow object by do uble- clicking it in the Sys tem T ree. T o lear n how you ca n modify an ex isting DataW i ndow obj[...]

  • Página 162

    Defining queries 146 Dat aWindow .NET Previewing the query While creating a query , you can preview it to m ake sur e it is retrieving the correct rows and columns. ❖ T o preview a q uery: 1 Select Design > Preview fr om the menu bar . DataW indow Desi gn er ret r iev es th e ro ws s at isfy ing the curr ently de fined query in a grid-style Da[...]

  • Página 163

    CHAPTER 4 Defining DataWindow Objects Data Win dow De si gne r User’s Gu ide 147 Naming th e query The query name can be any valid DataW ind ow Designer identifier up to 40 characters. When you na me queries, use a unique name to identify each one. A common con vention is to use a two-part name : a standard pref ix that identifies the object as a[...]

  • Página 164

    What's next 148 Dat aWindow .NET[...]

  • Página 165

    Data Win dow De si gne r User’s Gu ide 149 CHAPTER 5 Enhancing DataW in dow Objects About thi s chapter Before you put a Da taW indow object i nto pro duction , you can enhance it to make it easier to use and interpret data. Y o u do that in the DataW indow painter. This chapter d escribes basic enhan cements you can make to a Data W indow ob jec[...]

  • Página 166

    Working in the DataWindow painter 150 Dat aWindow .NET W orking in th e Dat aWindow p ainter The DataW i ndow painter provides views related to the DataWindow o bject you are working on. Interacting with these vi ews is how you work in the DataW indow painter. The fol l owi ng picture show s a DataW indow obj ect in the DataW indow painter with the[...]

  • Página 167

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 151 Preview vi ew The Preview view in the middle o n the le ft shows the DataW indow o bject with data as it will appear at runtime. If the Print Preview tog gle is selected, you see the DataW i ndow object as it would appear when printed. Export/Import Te m p l a t e v[...]

  • Página 168

    Working in the DataWindow painter 152 Dat aWindow .NET Underst anding the DataW indow painter Design view For m ost pr esentation s tyles, th e DataW indow pain ter Desi gn view is divid ed into areas called ba nds. Each band co rresponds to a section of the displayed DataW indow object. DataW ind ow objects with these presentatio n styles are divi[...]

  • Página 169

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 153 The header band The header band contains heading inform ation that is displayed at the top of every screen or p age. The presentation s tyle determines the cont ents of the header band: • If the presentation style is T abular , Grid , o r N-Up, the headings define[...]

  • Página 170

    Working in the DataWindow painter 154 Dat aWindow .NET How Da t aWindow Designer names the c olumns in th e Design view If the DataW indow object uses one table, the names of the column s in the Design view are th e same as the names in the table. If the DataW indow object uses more than one table, the names of the colum ns in the Design view are t[...]

  • Página 171

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 155 T able 5- 2: Drop-down toolbars in the DataW indow pain ter S tyl eBar The S tyleBar includes bu ttons for apply ing properties (s uch as bold) to selected text elements. Using the Properties view in the Dat aWindow p ainter Each part of the DataW indow object ( suc[...]

  • Página 172

    Working in the DataWindow painter 156 Dat aWindow .NET Selecting controls in the D at aWindow p ainter The DataW i ndow painter provides several ways to select controls to act o n. Y ou can select multiple controls and act on all the selected controls as a unit. For example, you can mo ve al l of them or chan ge t he fon ts used to displa y text fo[...]

  • Página 173

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 157 ❖ T o selec t controls by p osition in the Dat aWindow object: • Do one of the followi ng: • Select Edit>Select>Select Above to select all controls above the currently selected co ntrol • Select Edit>Select>Select Below to select all controls bel[...]

  • Página 174

    Using the Preview view of a DataWi ndow object 158 Dat aWindow .NET ❖ T o zoo m the displa y in the Dat aWindow p ainter: 1 Select the view you want to zoom (click in the view). Y ou can zoom the Design view , Preview view , Data V iew , and Column Specifications view . 2 Select Design>Zoom from the menu bar . 3 Select a built-in zoom p ercent[...]

  • Página 175

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 159 As the rows are being retrieve d, the Retr ieve button in the PainterBar changes to a Cancel bu tton. Y ou can click the Cancel button to sto p the retrieval. 2 T est your DataW indow object. For example, modify some d ata, update the d atabase, re-retrieve rows, an[...]

  • Página 176

    Using the Preview view of a DataWi ndow object 160 Dat aWindow .NET Dat aWindow Designer uses data cac hing Wh en DataW indow Desi gner first retrieves data, it stores th e data in ter nally . When it refreshes the Preview view , DataW indow Designer displays the stored data ins tead of retrieving rows from the databas e again. This can sa ve you a[...]

  • Página 177

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 161 • Retrieve R ows to D isk Lets you speci fy that DataW indow Desi gner should save retrieved dat a on your har d disk in a tempor ary file rather than keep the data in memo ry . When you prev iew the DataW indow object, DataW indow Designer swaps r ows of dat a fr[...]

  • Página 178

    Using the Preview view of a DataWi ndow object 162 Dat aWindow .NET T o save t he changes to the d atabase, you must appl y them, as des cribed be low . ❖ T o apply chang es to the dat abase: • Click the Update Database button. DataW indow Design er updates t he table with all the changes yo u have made . Modifying dat a at runtime Using the Pa[...]

  • Página 179

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 163 Importing data into a Dat aWindow object Y ou can impor t and display data fro m an external source and save the imported data in the database. ❖ T o import dat a into a Dat aWindo w object: 1 Select Rows>Imp ort from the menu bar . 2 Specify the fi le from wh [...]

  • Página 180

    Using the Preview view of a DataWi ndow object 164 Dat aWindow .NET Contro lling the di splay of rulers Y ou can choose whet her to displa y rulers ar ound page bo rders. ❖ T o contro l the display of rul ers in Print Previe w: • Select/deselect File>Print Preview Rulers from th e menu bar . Chang ing margi ns Y ou can dynamicall y change ma[...]

  • Página 181

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 165 The contents of the page zooms in or out as appropriate. If you enlar ge the contents so they no longer fit, DataWindow Designer creates additional pages as nee ded. Printing data Y ou can print a DataW in dow object while the Preview view is displayed. Y o u can pr[...]

  • Página 182

    Using the Preview view of a DataWi ndow object 166 Dat aWindow .NET 6 If you want to change the collating option, clear or select the Collate Copies check bo x and click OK. If you specified print to file, the Print to File d ialog box displays. 7 Enter a file name an d click OK. The extension PRN indicates that the file is prepared fo r the printe[...]

  • Página 183

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 167 2 Drag the mouse lef t or right to mov e the column. 3 Release the mouse button. ❖ T o use sp lit horizont al scrolling in a grid Dat aWin dow object : 1 T o divide the grid into two re gions that can scroll in dependently of each other , position the mouse poi nt[...]

  • Página 184

    Saving data in an external fil e 168 Dat aWindow .NET Saving data in an external file While previewin g, you can save the data retr ieved in an external file. Note th at the data and hea ders (if specified) are sav ed. Information in the f ooter or summary bands is not save d unless you are s aving as P DF or as a PSR fi le. ❖ T o sav e the dat a[...]

  • Página 185

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 169 DataW indow Designer uses a Po stScript p rinter d river speci fically designed for distilling purpo ses to conf ig ure th e PDF o utpu t. Y ou can choose to use a dif ferent Post Script p rinter dri ver if you w ant to cust omize your PostScrip t settings for gener[...]

  • Página 186

    Saving data in an external fil e 170 Dat aWindow .NET About the result s Some presentatio n styles translate bette r into HTML than others. The T ab ular , Group , Freeform, Cro sstab, and Grid presen tation st yles produ ce good resu lts. The Composite and Grap h presentation styles and nested reports pro duce HTML tables based on the result set ([...]

  • Página 187

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 171 Figure 5-1: PSR fi le About reports A report is the same as a no nupdatab le DataW indow object. Fo r more informati on, see “Reports versus DataWindow objects” on page 100. Y ou c an us e a PSR fi le to sa ve a co mple te repor t (re port de sign a nd dat a). T[...]

  • Página 188

    Modifying general DataWindow object properties 172 Dat aWindow .NET ❖ T o change the defau lt style proper ti es: 1 Positi on the pointer i n the backgroun d of the DataW indow object, d isplay the pop -up menu, and s elect Proper ties. The Prop erties view displays wi th the General page on top. 2 Click the unit of measure y ou want to use to sp[...]

  • Página 189

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 173 ❖ T o set the color of a ban d in a Dat a Window object: 1 Position the mouse pointer on the ba r that represents the band, d isplay the pop-up men u, then s elect Proper ties. 2 On the General page in the band's Pr operties view , select a color from the Col[...]

  • Página 190

    Modifying general DataWindow object properties 174 Dat aWindow .NET Specifying pointers for a DataW indow object Just as with colors, you can specify dif ferent pointers to use when the mouse is over a par t icular area of the DataW indow object. For example, yo u might want to change the pointer when the mouse is o ver a column whose d ata cannot [...]

  • Página 191

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 175 3 Select the Print Specifications tab. The Print Specifications pag e uses the units of measure you specified o n the General page. 4 Specify print specifications fo r the current DataW indow object. See T able 5 -4 for more informati on. T able 5- 4: Setting print [...]

  • Página 192

    Modifying general DataWindow object properties 176 Dat aWindow .NET Printing with newsp aper-style columns When you define a DataWindow object, you can specify that it print in multiple columns acr oss the page, like a new spaper . A typical use of newspaper -style columns is a ph one list, where yo u want to have more than o ne column of names on [...]

  • Página 193

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 177 4 Specify the number of columns acro ss the page and the width of column s in the News paper Column s Acros s and Newspaper Columns W idth properties. 5 For each control in the DataW indow object that you do not want to have appear multiple ti mes on the page (such [...]

  • Página 194

    Modifying general DataWindow object properties 178 Dat aWindow .NET The finis hed DataW indow obj ect has one s et of page heading informat ion and two columns of column header and detail informatio n. Modifying text in a DataWindow object When DataW indow Desig ner initially generates th e basic DataW indow object, it uses the following attributes[...]

  • Página 195

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 179 ❖ T o change the text properties for a text control in a Dat aWindow object: 1 Select the text control. 2 Do one of t he following: • Change the t ext proper ties in the S tyleBar . • Select the Font page in the con trol's Properties view and ch ange the [...]

  • Página 196

    Modifying general DataWindow object properties 180 Dat aWindow .NET ❖ T o change the t a b order: 1 Select Format>T ab Order from the menu bar or click the T ab Order button on PainterBar2. The cu rren t tab or der di splays . 2 Use the mouse or t he T ab key to move the po inter to the tab value yo u want to change. 3 Enter a ne w tab value i[...]

  • Página 197

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 181 ❖ T o specif y prefixes for naming c ontrols sy stematically in a Dat aWindow object: 1 Select Design>Options from the menu ba r and then select the Prefixes tab. 2 Change prefixes as d esired and click OK. ❖ T o specif y a name of a control in a Dat aWindow [...]

  • Página 198

    Modifying general DataWindow object properties 182 Dat aWindow .NET Specifying variable-height bands in a DataWindow object Sometimes DataW indow objects contain columns whose data is of var iable length. For exam ple, a Memo column in a table might be a character column that can take up to several thousand ch aracters. R eserving space for that m [...]

  • Página 199

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 183 Y ou should not u se an expression whose ru ntime value is greater than the value returned by RowHeight . For example, you shoul d not set t he height o f a column to rowh eight( ) + 30 . Such an express ion produces u npredictable results at runtime. Clipping colum[...]

  • Página 200

    Modifying general DataWindow object properties 184 Dat aWindow .NET Some chan ges you make (such as addi ng or remov ing column s) requir e DataW in dow Designer to modify the update capabilities of the DataW indow object. For more information about cont rolling updates in a DataW indow object, see Chapter 6, “C ont rolling Updates in Dat aWindow[...]

  • Página 201

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 185 If the dat a so urce is a stored pro cedure If you are mo difying the result set for a DataW indow object whose data source is a stored proced ure, the pop-u p menu for the Column Specif ication view contains the menu item S tored Proce dure. Select S tored Procedur[...]

  • Página 202

    Storing data in a DataWindow object using the Data v iew 186 Dat aWindow .NET 2 Do a n y of the foll ow ing: • Click the Insert Row button in the PainterBar to create an empty row and type a row of data . Y ou can enter as many rows as you want. • Click the Retrieve b utton in the PainterBar t o retrieve all the rows of data fr om the dat abase[...]

  • Página 203

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 187 What happens at runti me Data stored in a DataWindow object is stored within the actu al object itself, so when a window op ens showi ng s uch a DataW indow , the data is already t her e. There is no need to issue Retrieve to get the data. DataW indow .NET never ret[...]

  • Página 204

    Retrieving data 188 Dat aWindow .NET T esting in Dat aWindow Des igner Y ou can test the pr ompting fo r criteria b y retrie ving data in t he Previe w view of the DataW indow ob ject. Usin g edit sty les If a column uses a code table or the RadioButton, C heckBox, or DropDown ListBox edit st yle, an arrow disp lays in the column header and users c[...]

  • Página 205

    CHAPTER 5 Enhancing DataWindow Objects Data Win dow De si gne r User’s Gu ide 189 For example, if a DataW indow object displays on ly 10 rows at a time, DataW indow Designer only needs t o retrieve 1 0 or more ro ws before presenting the data. Then, as the user pages through the data, DataW indow Designer continues to retrieve what is necessary t[...]

  • Página 206

    Retrieving data 190 Dat aWindow .NET[...]

  • Página 207

    Data Win dow De si gne r User’s Gu ide 191 CHAPTER 6 Controlling Up dates in Dat aW indow Objects About thi s chapter When DataW indow Designer generates the basic DataW indow object, it defines w hether the data is updatable. This chapter des cribes the defaul t settings and how you can modify them. Conten ts About con trolling up d ates When Da[...]

  • Página 208

    About controlling updates 192 Dat aWindow .NET If using a Store d Procedure or External dat a source If the data s ource is S tored Procedure or External, you can us e the FindNextMod iedRow method to write your own up date code. What you can do Y ou can: • Allow updates in a DataWin dow object associated with m ultiple tables or a view; you can [...]

  • Página 209

    CHAPTER 6 Controlling Updates in DataWindow Ob jects Data Win dow De si gne r User’s Gu ide 193 Changi ng tab value s DataW indow Desi gner does no t chan ge th e tab values associated with colum ns after you chang e the update characteristics o f the DataW indow object. If you have allowe d updates t o a table in a mu ltitable Data W indow objec[...]

  • Página 210

    Specifying an identi ty column 194 Dat aWindow .NET S pecifying an identity column Many DBMSs allow you to specif y that th e value for a column in a new row is to be automatically assigned by the DBMS. This kind of column is called an identity column. Different DBMSs provide diff erent types of identity colum ns. For example, s ome DBMSs allow you[...]

  • Página 211

    CHAPTER 6 Controlling Updates in DataWindow Ob jects Data Win dow De si gne r User’s Gu ide 195 Specifying the WHERE clause for up date/delete Sometimes multiple users are accessing the same tables at the same time. In these situations , you need to decide wh en to allo w you r application to update the database. If you allow your application to [...]

  • Página 212

    Specifying the WHERE claus e for update/delete 196 Dat aWindow .NET T able 6-1: Specifyin g the WHERE clau se for UPDA TE and DELETE Exampl e Consider this situ atio n: a DataW indo w object is updating the Empl oyee tab le , whose key is Emp_ID ; all columns in the table are updatable. Supp ose the user has changed the sal ary of empl oyee 1001 fr[...]

  • Página 213

    CHAPTER 6 Controlling Updates in DataWindow Ob jects Data Win dow De si gne r User’s Gu ide 197 This statement will succeed r egar dless of whether ot her users have modified the row since your application r etrieved the r ow . For example, if another user had modified the salary to $70,000, that change will be overwrit ten when your ap plication[...]

  • Página 214

    Using stored procedures to update the database 198 Dat aWindow .NET How to choose a setti ng Consider the followin g when choosing the Key Modification setting: • If multiple rows are changed, DE LETE and INSERT always work. In some DBMSs, UPD A TE fails i f the user modi fies two keys and sets the value in one row to the original value of the ot[...]

  • Página 215

    CHAPTER 6 Controlling Updates in DataWindow Ob jects Data Win dow De si gne r User’s Gu ide 199 ❖ T o use st ored proced ures to up date the dat abase 1 In the DataWin dow painter, select Rows>Stored Procedure Update to display th e Stored Procedure Up date dialog bo x. 2 Select the tab for the SQL update meth od (Delete, Insert, or Update) [...]

  • Página 216

    Using stored procedures to update the database 200 Dat aWindow .NET If a stored procedure fo r a particul ar SQL update m ethod is not def ined, the DataW indow contr ol s ubm its the appropr iate S QL s yn tax i n th e sa me man ner it always has. Data Usin g Describe and Modif y Y ou can use t he DataW indow Describe and Modify methods to access [...]

  • Página 217

    Data Win dow De si gne r User’s Gu ide 201 CHAPTER 7 W orking with Controls in Dat aW indow Objects About thi s chapter One of the ways you can enhance a DataW indow object is to add contro ls, such as colum ns, d rawing o bjects, b uttons, and computed fields. Y ou can also change th e layout of the DataW indow object by reorga nizing, positioni[...]

  • Página 218

    Adding controls to a DataWindow object 202 Dat aWindow .NET Adding colu mns not previ ously retrieved to the dat a source T o specify that yo u want to retrieve a colu mn not previously r etrieved (that is, add a col umn to the data s ource), you m ust modify the data sour ce. See “Modifying the dat a source of a DataWindow object” on page 183.[...]

  • Página 219

    CHAPTER 7 Working with Controls in DataWindow Objects Data Win dow De si gne r User’s Gu ide 203 Adding drawing contro ls to a DataW indow object Y ou can add th e following drawing cont rols to a Da taW indow ob ject to enhance its appearance: Rectangle RoundRectangle Line Oval ❖ T o place a drawing control in a Dat aWi ndow object: 1 Select t[...]

  • Página 220

    Adding controls to a DataWindow object 204 Dat aWindow .NET ❖ T o add a group box to a Dat aWind ow object: 1 Select Insert>Con trol>Group Box from the menu bar and click in the Design vi ew . 2 W ith the group box selected, type the text to display i n the frame. 3 Move and resize the g roup box as appropriate. Adding pictures to a DataWin[...]

  • Página 221

    CHAPTER 7 Working with Controls in DataWindow Objects Data Win dow De si gne r User’s Gu ide 205 T o compute a picture name at runtime, us e the Bitmap fu nction in the expression defin ing a computed field . If you chan ge the bitm ap in the Picture control in a DataW indow object, you need to reset the original size property . The property auto[...]

  • Página 222

    Adding controls to a DataWindow object 206 Dat aWindow .NET • In the DataW indow painter, you can def ine computed fields afte r you have defin ed the SELECT statement (or other data source) . The dif ferenc e betwe en the two w ays When you define the compu ted column in the Select painter , the value is calculated by the DB MS when the data is [...]

  • Página 223

    CHAPTER 7 Working with Controls in DataWindow Objects Data Win dow De si gne r User’s Gu ide 207 In this scenario, if the user changes the price of a part in th e DataW indow object, the cost chan ges immediately . Recomme ndation If you want yo ur DBMS to do the calcu lations on th e server befo re bringing data down and you do no t need the com[...]

  • Página 224

    Adding controls to a DataWindow object 208 Dat aWindow .NET Dat aWindow expressions Y ou are entering a DataW indow expression, not a SQL expression pro cessed by the DBMS, so the expression follo ws th e rules for DataW in dow expre ssions. Referri ng to next an d previ ous rows Y ou can refer to o ther rows i n a computed field. This is p articul[...]

  • Página 225

    CHAPTER 7 Working with Controls in DataWindow Objects Data Win dow De si gne r User’s Gu ide 209 ❖ T o summarize va lues: 1 Select one or more columns in th e DataW indow object’ s detail band. 2 Select Insert>Control from the men u bar . 3 Select one of the options at the bo ttom of the cascading menu: A verage, Count, o r Sum. The same o[...]

  • Página 226

    Adding controls to a DataWindow object 210 Dat aWindow .NET 4 Click the Function button. The Functi on For T oolbar dial og box dis plays. 5 Select a function and click OK. Y ou return to the T oolbar It em Command d ialog box. 6 Specify text and microhelp that display s for the butto n, an d click OK. DataW in d ow Designer places the new button i[...]

  • Página 227

    CHAPTER 7 Working with Controls in DataWindow Objects Data Win dow De si gne r User’s Gu ide 21 1 5 Select the acti on you want t o assign to th e button from the Action drop-dow n list. For inf ormation about actions, see “Actions assignabl e to buttons in DataW indow objects” on pa ge 211. 6 If you want to add a picture to the bu tton, sele[...]

  • Página 228

    Adding controls to a DataWindow object 212 Dat aWindow .NET T able 7-2: Button acti ons for DataW indow objects Action Effect V alue A ction return code User Defined (default) Allows the dev eloper to pr ogram t he ButtonCl icke d eve nt with no interve n ing action o ccurring. 0 The r et urn code fro m the user's co ded eve nt sc r i p t. Ret[...]

  • Página 229

    CHAPTER 7 Working with Controls in DataWindow Objects Data Win dow De si gne r User’s Gu ide 213 Adding graphs to a Da t aWindow object Graphs are one of the best ways to p res ent information. Fo r examp le, if your application di splays s ales i nformation ov er the course of a year , you can easily build a graph in a DataW indow object to disp[...]

  • Página 230

    Reorganizing controls in a DataWindow objec t 214 Dat aWindow .NET The InkPicture control is fully functional on T ablet PCs . If the Microsoft T ablet PC So ftware Develo pment Kit ( SDK) 1.7 is i nstalled on other com puters, InkPicture contro ls in DataW indow objects can accept ink inp ut from the mouse. For mor e information about ink controls[...]

  • Página 231

    CHAPTER 7 Working with Controls in DataWindow Objects Data Win dow De si gne r User’s Gu ide 215 Displaying boundarie s for controls in a DataWindow object When reorganizing controls in the Design view , i t is sometimes hel pful to see how lar ge all the controls are. That way you can easily check for ov erlapping controls and make sure that the[...]

  • Página 232

    Reorganizing controls in a DataWindow objec t 216 Dat aWindow .NET Deleting controls in a DataWindow object ❖ T o dele te controls in a Dat aWindow object: 1 Select the controls you wan t to delete. 2 Select Edit>Delete from the menu bar or press the Delete key . Moving controls in a DataWindow object In a ll present ation style s excep t Grid[...]

  • Página 233

    CHAPTER 7 Working with Controls in DataWindow Objects Data Win dow De si gne r User’s Gu ide 217 • T o copy the contro l to anot her DataW indow ob ject, open th e desired DataW indow object and pas te the control. DataW indow Designer pastes the con trol at th e sam e locat ion as in the source Data W indow obj ect. If you are pas ting in to t[...]

  • Página 234

    Reorganizing controls in a DataWindow objec t 218 Dat aWindow .NET Aligning controls in a DataWindow object Often yo u want to al ign several controls or ma ke them all the same size. Y ou can use the grid to align the contr ols or you can have DataW indow Designer align them f or you. ❖ T o alig n controls in a Data Window o bject: 1 Select the [...]

  • Página 235

    CHAPTER 7 Working with Controls in DataWindow Objects Data Win dow De si gne r User’s Gu ide 219 Equalizing the size o f controls in a DataWindow object Suppos e you have sev eral control s in a DataW indow ob ject and want their sizes to be the same. Y ou can accomplish this manually or by u sing the Forma t menu. ❖ T o equali ze the siz e of [...]

  • Página 236

    Reorganizing controls in a DataWindow objec t 220 Dat aWindow .NET 2 Select the Slide options you wan t: These options are also available on PainterBar2. If you are sliding c olumns up Even blank columns have height; if you want columns to slide up, you need to specify as Autosize Height all co lumns ab ove them that might be blank and that you w a[...]

  • Página 237

    CHAPTER 7 Working with Controls in DataWindow Objects Data Win dow De si gne r User’s Gu ide 221 Positioning controls in a D at aWindow ob ject T able 7- 3 shows the properties fo r each control in a DataW indow object that determine how it is positio ned with in the DataW indow object. T able 7- 3: Position properties for controls in a DataWindo[...]

  • Página 238

    Rotating controls in a DataWindow object 222 Dat aWindow .NET Rot ating controls in a Dat aWindow objec t Cont rols that displ ay t ext s uch a s tex t controls, column s, and computed fields can be rotated from the original baselin e of the text. The Escapement option on the Font prop erty page for the co ntrol lets you specify the amount o f rota[...]

  • Página 239

    CHAPTER 7 Working with Controls in DataWindow Objects Data Win dow De si gne r User’s Gu ide 223 The origin of rotatio n is the center of the top bor der of the box containing the text. It is often helpful to use left-aligned text (General property page>Alignment>Left) because it makes it easier to position the control correctly . This exam[...]

  • Página 240

    Rotating controls in a DataWindow object 224 Dat aWindow .NET If you are using a conditional e xpression for rot ation If you ar e specifying dif ferent rotati ons dependi ng on parti cular condi tions, you mi ght need to add conditio ns to the x and y prop erties for the control t o move the control conditionally to m atch the various amounts of r[...]

  • Página 241

    Data Win dow De si gne r User’s Gu ide 225 CHAPTER 8 Displaying and V alidating Data About thi s chapter This chapt er describ es how to customize your DataW indow object by modifying the dis play val ues in columns and specifying valid ation rules. Conten ts About displaying and validating da t a When DataW indow Desi gner generate s a basic Da [...]

  • Página 242

    About display ing and validating data 226 Dat aWindow .NET Presenting the data When you generate a n ew DataW indow object, Da taW indow De signer presents the d ata according to the p roper ties already defined for a column, such as a column's display for mat and edit style. Display formats Display formats embell ish data values while stil l [...]

  • Página 243

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 227 V alidating data When data is entered in the Database pain ter or in a DataW indow object, DataW indow Designer evaluates the d ata against val idation ru les defined for that column. If the data is valid, DataW indow Designer accepts the entry; otherwise, D ataW[...]

  • Página 244

    Working with dis play formats 228 Dat aWindow .NET W orking with display formats Y o u work with display formats in the Database painter and the Dat aW indow painter. What you do i n the Databa se paint er In the Database painter , you can: • Create, m odify , and d elete named di splay formats The named d isplay formats are stored in the extende[...]

  • Página 245

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 229 Edi t styl e takes pre ceden ce If a column has an associated edit st yle, the edit style takes precedence over a display form at unless you use an EditMas k edit s tyle and check the Use Format box on the F ormat property page. For more i nformation, s ee “Abo[...]

  • Página 246

    Working with dis play formats 230 Dat aWindow .NET ❖ T o remov e a display form at from a colum n in the Dat a base pa inter: 1 In the Databa se painter Objects view , position the p ointer on the colum n, select Properties from the pop-up m enu, and select th e Display tab in the Properties view . 2 Select (None) from the list in the Display For[...]

  • Página 247

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 231 Shortcut s T o assign the Currency or Percent disp lay form at to a numeric column in a report, select the column, then click the Currency or Percent button in the PainterBar or select Form at>Currency or Format>Percent from the men u bar . Custom izing th [...]

  • Página 248

    Defining display formats 232 Dat aWindow .NET Usin g keywords Enclose display form at keywords in square brackets. For example, yo u can use the keywo rd [Genera l] when yo u want Dat aW indow Designer to d etermine the appropriate f ormat for a number . Usin g colors Y ou can def ine a color for each display format section by specifying a color ke[...]

  • Página 249

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 233 Using spe ci al chara cters T o include a character in a mas k that has special meaning in a display format, such as [, precede the character with a b ackslash (). For example, to display a single quotation mark, enter '. Setting di splay format s at runti[...]

  • Página 250

    Defining display formats 234 Dat aWindow .NET Numb er and curr ency setti ngs T o ensure that an ap plication behaves the same in ev ery country where it is deployed, DataW indow expression s and the masks used in display formats and edit masks requ ire U.S. notation for n umbers. That is, when you specify a number in a DataW indow expres sion or i[...]

  • Página 251

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 235 String display formats Stri ng display form ats can have two sect ions. The first i s required and cont ains the format for st rings; the second is optional and specifies how to rep resent NULLs : string-format;null-format In a string format m ask, each at-sign ([...]

  • Página 252

    Defining display formats 236 Dat aWindow .NET T able 8-4: Charac ters with sp ecial m eaning in da ta display fo rmats Colons, slashes , and spaces display as en tered in the mask. About 2-digi t years If us ers speci fy a 2-digi t year in a Dat aW indow object, DataW indow Des igner assumes the da te is the 20th century if the year is g reater tha[...]

  • Página 253

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 237 T able 8- 5: Date displa y format exam ples Time display format s T ime di splay fo rmats can hav e two se ctio ns. The fir st is re quired and contains the format for times; the s econd is optional and specifies how to represent NULLs : time-format;null-format S[...]

  • Página 254

    About edit styles 238 Dat aWindow .NET Ti m e k e y w o r d Y ou can use t he following keyword as a time disp lay format to specify th e format specified in th e W indows control p anel: • [T ime] Exampl es T able 8-7 shows how t he time 9:45: 33:234567 PM displ ays when dif ferent format masks ar e applied. T able 8-7: Tim e displ ay format exa[...]

  • Página 255

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 239 Edit styl es T able 8- 8 shows the available ed it styles. T able 8- 8: Edit styles For exampl e, suppose yo u have a colum n S tatus that takes one of three values: the letters A, T , and L, each repr esenting a status (Active, T erminated, or On Leave). If you [...]

  • Página 256

    Working with edit styl es 240 Dat aWindow .NET W orking with edit styles Y ou work with edit styles in the Database painter and DataWindow painter. What you do i n the Databa se paint er In the Database painter , you can: • Create, modify , and delete named edit s tyles The edit styles are s tored in the exte nded attribut e system tables. Once y[...]

  • Página 257

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 241 ❖ T o create a new edit styl e: 1 In the Database painter, select Ob ject>Ins ert>Edit S tyle from the menu bar . 2 In the Edit Styl e dialog box, s elect the edit style type fr om the S tyle drop- down list. 3 Specify the proper ties of the edit style an[...]

  • Página 258

    Defining edit styles 242 Dat aWindow .NET Working with edit styles in the DataWindow p ainter An edit style you assign to a col umn in the Database painter is used by def ault when you place the column in a DataW i ndow object. Y ou can override the edit style in the DataW indow painter b y choosing another edi t style fr om the extended attribute [...]

  • Página 259

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 243 • T o allow users to tab to the column but not change the value, check the Disp lay On l y box. • T o define a code table to determine which values are displ ayed to users and which values are st ored in the databa se, check the Use Co de T able box and enter[...]

  • Página 260

    Defining edit styles 244 Dat aWindow .NET In the preced ing example, when user s see the value Business Serv ices, the correspo nding data v alue could be 200. ❖ T o us e t he Dr opDown ListB ox ed it sty le: 1 Select Drop DownListBox from the S tyle T ype box. 2 Select the appropriate prop erties. 3 Enter the value you want to have ap pear in th[...]

  • Página 261

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 245 What happ ens The value you en ter in the T ext box becomes the display v alue, and values entered for On, Off, and Other b ecome the data values. When users check or clear the check box at runtime, DataW indow Designer enters the appropriate data valu e in its b[...]

  • Página 262

    Defining edit styles 246 Dat aWindow .NET The EditMask edit style Sometimes users need to enter data that has a fixed format. For example, in North America pho ne numbers have a 3-digit area code, f ollowed by three digit s, followed by four di gits. Y ou can de fine an edit mask that s pecifies the format to make it easier for users to enter value[...]

  • Página 263

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 247 Also, no te certai n behavior in Date edit m asks: • Entering zero for the day or mo nth causes the next valid date to be entered. For example, if the edit mask is DD/MM/YY , typing 00/11/ 01 results i n 01/11/ 01 . Y ou can override t his behavio r in the deve[...]

  • Página 264

    Defining edit styles 248 Dat aWindow .NET Usin g spin contro ls Y ou can define an e dit mask as a spin control, a box that contains up and down arrows that users can clic k to cycle throug h fixed values. For example, you can set up a code table that provides the val id entr ies in a column; users simply click an arrow to select an entry . Used th[...]

  • Página 265

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 249 T o conserve b andwidth, J avaScript f or client form atting is not included by default. T o include this s c ript , yo u can s el ect th e Clie nt Fo rmatting ch eck bo x on the W eb Generati on tab of t he DataW indow Proper ties view . The drop-d own c alenda [...]

  • Página 266

    Defining edit styles 250 Dat aWindow .NET 2 For the column getting its data from the DataWindow object, select the DropDow nDW edit s tyle. In the example, y ou wo uld specify the Dro pDownDataW in dow edit style for t he dept_ name column: 3 Click t he browse bu tton next t o the DataW indow box and select t he DataW indow object th at contains t [...]

  • Página 267

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 251 Limit on siz e of dat a value The data value for a column that uses the DropDownDataWind ow edit style is limited to 51 1 characters. The InkEdit edit style The InkEdit edit s tyle is designed for use on a T ablet PC and provides the ability to capture ink input [...]

  • Página 268

    Defining a code table 252 Dat aWindow .NET How code tables are implemented Y ou can define a code table as a property of the following column edit st yles: Edit DropDow nListB ox RadioB uttons DropDown DataW indow EditMa sk, using spin con trol The steps to specify the code table prop erty fo r each edit style are similar: yo u begin by defini ng a[...]

  • Página 269

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 253 ❖ T o define a code t able as a proper ty of the DropDo wnDataW indow ed it style: 1 Specify the colu mn that provides the di splay values in the Disp lay Column box. 2 Specify the column th at provides the data values in the Data Column box. 3 If you want to r[...]

  • Página 270

    Defining a code table 254 Dat aWindow .NET If the code table is in a DropDownListBox edit sty le, and if the colu mn has a code table that contains duplicate displa y values, then each value displays only once. Therefore, if this code table is d efined for a column in a DataW indow object that has a DropDo wnListBox edit style, Massachusetts and Rh[...]

  • Página 271

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 255 About valid ation rules When users enter d ata in a DataW indow object, you want to be sure the data is valid befor e using it to updat e the databas e. V alidation rules provide one way to do this. Y ou usually defin e validation rules in the Database paint er .[...]

  • Página 272

    Working with validation rules 256 Dat aWindow .NET At runtime In code, y ou can use the GetColumnV alidation method to obtain the validation rule for a column and the S etColumnV alidation method to change t he validation rule for a co lumn. For information abo ut the Get ColumnV a lidation and Set Colu mnV alid atio n methods, see the online help.[...]

  • Página 273

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 257 Defining validati on rules T ypically , you define validation rules in the Database pa inter , because validation rules are properties of the data itself. Once defined in the Database painter , the rules are used by defau l t each time the column is placed in a D[...]

  • Página 274

    Defining validation rules 258 Dat aWindow .NET ❖ T o modi fy a validat ion rule: 1 In the Database painter , open the Extended Attributes view . 2 In the Extended Attributes view , open th e list of validation rules. 3 Position the p ointer on the validatio n rule you want to m odify , d isplay the pop-up menu, and sel ect Propertie s. 4 In the V[...]

  • Página 275

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 259 For information about these fun ctio ns, see the DataW indow Object Refer ence. Use the notation @placeholder (where pl aceholde r is any gr oup of characte rs) to indicate the current co lumn in the rule. When you define a valid ation rule in the Database painte[...]

  • Página 276

    Defining validation rules 260 Dat aWindow .NET Customizing the err or mes sage When you define a va lidation rul e, DataW indow Designer aut omatically creates the error mes sage that displays by default when users enter an invalid value : 'Item ~'' + @ Col + '~' does not pass validation test.' Y ou can edit the string[...]

  • Página 277

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 261 ❖ T o specif y a validati on rule for a column in the Dat aWindow p ainter: 1 In the Data W ind ow pa inter , select V iew>Column Specifications from the menu bar . The Column Specification view displays. 2 Create or modi fy the valid ation expressio n. T o [...]

  • Página 278

    Defining validation rules 262 Dat aWindow .NET GetT ext returns a string. Be sure to use a data conv ersion function (s uch as Integer or Real ) if you want to compare t he entered val ue with a datatype other than st ring. For more on the GetT ext function and text patterns, see the Data W indow Object Refer ence. Referring to othe r column s Y ou[...]

  • Página 279

    CHAPTER 8 Displaying and Validati ng Data Data Win dow De si gne r User’s Gu ide 263 The Sal es table has t wo column s, Price and Commission . The validation rule for the Commis sion column is: (Number(GetText( )) >= If(price >= 1000, .10, .04)) AND (Number(GetText( )) <= If(price >= 1000, .20, .09)) A customized erro r message for t[...]

  • Página 280

    How to maintain extended attributes 264 Dat aWindow .NET[...]

  • Página 281

    Data Win dow De si gne r User’s Gu ide 265 CHAPTER 9 Filtering, Sorting, and Grouping Rows About thi s chapter This chapter d escribes how you can customize you r DataW i ndow object by doing the following in the DataWin dow painter: • Defining filters to lim it wh ich of the retrieved rows are displayed in the DataW indow object • Sortin g r[...]

  • Página 282

    Filtering rows 266 Dat aWindow .NET Usin g filters In the DataW indow painter , you can define filters to limit th e rows that display at runtime. Filters can use most DataWin dow express ion functio ns . Filters do not affect which ro ws are retrieved A filter operates against th e retrieved data. It does no t re-execute the SEL ECT statement. Def[...]

  • Página 283

    CHAPTER 9 Filtering, Sorting, and Grouping Rows Data Win dow De si gne r User’s Gu ide 267 3 (Optional) Click V erify to make sure the expression is valid. 4 Click OK. Only rows meeting the filter criter ia are display ed in the Preview view . Filtered rows and up dates Modifications of filtered rows are applied to t he database when yo u issue a[...]

  • Página 284

    Sorting rows 268 Dat aWindow .NET Howeve r , you mi ght want to sort the rows after they are re trieved. For ex ample, you might wan t to: • Offload the processing from the DBMS • Sort on an expressi on, which might not b e allowed in the SELECT statement but is allowed in DataWindow Designer ❖ T o sort th e rows: 1 Select Rows>Sort from t[...]

  • Página 285

    CHAPTER 9 Filtering, Sorting, and Grouping Rows Data Win dow De si gne r User’s Gu ide 269 Suppressin g repeating values When you sor t on a column, ther e might be several r ows with the same value in one column. Y ou can choose to suppre ss the repeating values i n that column. When you suppres s a repeating value, the v alue displays at the st[...]

  • Página 286

    Grouping rows 270 Dat aWindow .NET If you change you r mind Y ou can remove a column from the su ppress ion li st simpl y by dr agging i t and re leasing it out side the Suppress ion List b ox. Groupin g rows Y ou can group related rows together and, optionally , calculate stat istics for each group separately . For example, you might want to g rou[...]

  • Página 287

    CHAPTER 9 Filtering, Sorting, and Grouping Rows Data Win dow De si gne r User’s Gu ide 271 The followi ng screenshot shows the DataW indow object. How to do it Y ou can create a gr ouped DataW indow object in three ways: • Use the Group pres ent at ion s t yle t o create a g rou ped D ata W indow object from scrat ch ("Using the G roup p r[...]

  • Página 288

    Grouping rows 272 Dat aWindow .NET Making th e Dat aWindow control large en ough If a DataW indow object has grouped rows, each page contains all group headers (inc luding zero-height head ers) at the top of the p age. Y our DataW indow control must be lar ge enough to acco mmodate all the group headers that di splay on each page o f the report. Th[...]

  • Página 289

    CHAPTER 9 Filtering, Sorting, and Grouping Rows Data Win dow De si gne r User’s Gu ide 273 4 Drag the colum n(s) you wan t to group on from the S ource Data bo x to the Columns box. Multiple co lumns a nd multiple gro up levels Y ou can specify more than one colu mn, but all columns apply to group level one. Y ou can defin e one group level at t [...]

  • Página 290

    Grouping rows 274 Dat aWindow .NET 10 Select Color and Bord er settings and click Next. 1 1 R eview your specificatio n and click F inish. The DataW indow object displays wi th the basic gro uping pr operties set . This is an examp le of a Group s tyle DataW indow object: What DataWin dow Desi gner does As a re sult of yo ur specifi cations, Dat aW[...]

  • Página 291

    CHAPTER 9 Filtering, Sorting, and Grouping Rows Data Win dow De si gne r User’s Gu ide 275 Here is the preceding DataW indow object in the Preview view: Using an exp res si on for a group If you w ant to use an expression for one or more column names i n a group, you can enter an expression as the Group Definition on the Gen eral pag e in the Pro[...]

  • Página 292

    Grouping rows 276 Dat aWindow .NET Dat aWindow Object is not up dat able by def ault When you generate a Dat aW indow obj ect using the Gro up present ation style, DataW indow Desi gner makes it not upd atable b y default. I f you wan t to be abl e to upd ate the databas e through t he grouped Data W indow obj ect, you mus t modify its update chara[...]

  • Página 293

    CHAPTER 9 Filtering, Sorting, and Grouping Rows Data Win dow De si gne r User’s Gu ide 277 Creating subgroup s After defining your fir st group, y ou can defi ne subgrou ps, which are groups within t he group y ou just d efined. ❖ T o define subgroup s: 1 Select Rows>Create Group from the menu bar and s pecify the column/expr ession for the [...]

  • Página 294

    Grouping rows 278 Dat aWindow .NET Y ou can also sort o n additional ro ws. For exam ple, if you want to sor t by employee ID within each group, specify em p_i d as the third sorting column. For mor e informati on about so rting, see “Sorting rows ” on page 267. Rearranging the Dat aWindow object When you create a group, DataW indow Designer cr[...]

  • Página 295

    CHAPTER 9 Filtering, Sorting, and Grouping Rows Data Win dow De si gne r User’s Gu ide 279 At runtime, you see this: Suppressi ng group headers If you do n ot want a gr oup head er to dis play at the to p of each p age wh en y ou print or di splay a report, select the Su ppress Group Header check box on the General property p age for the header .[...]

  • Página 296

    Grouping rows 280 Dat aWindow .NET ❖ T o add a summ ary st atistic: 1 Select Inser t>Control>Co mputed Fie ld from the menu bar . 2 Click in the Design view where yo u want the statistic. The Mo dify E xpressi on dial og bo x displa y s. 3 Specify the expr ession that defines the comp uted field (see belo w). 4 Click OK. A shortcut to sum v[...]

  • Página 297

    CHAPTER 9 Filtering, Sorting, and Grouping Rows Data Win dow De si gne r User’s Gu ide 281 T o get the total salary of employees in a depa rtment, sp ecify: Sum( Salary for group 1 ) At runtime, you see this: Sorting the group s Y ou can sort the gr oups in a DataW indow object. For examp le, in a DataW indow object sh owing employ ee informati o[...]

  • Página 298

    Grouping rows 282 Dat aWindow .NET ❖ T o sort th e group s: 1 Place the mouse pointer on the group header bar (not inside the band) until the pointer beco mes a double-headed arrow . 2 Click. The Gener al property page for the gr oup displ ays in the Pr operties v iew . 3 Click t he button next to t he Group So rt box. The Specify Sort C olumns d[...]

  • Página 299

    CHAPTER 9 Filtering, Sorting, and Grouping Rows Data Win dow De si gne r User’s Gu ide 283 For example, if you chose the Salary column, DataW i ndow Desi gn er specifies that the group s will be sorted by the expression sum(sa lary f or group 1) : 5 Select ascending or d escending sort as app ropriate. 6 If you want to modify the expressio n to s[...]

  • Página 300

    Grouping rows 284 Dat aWindow .NET[...]

  • Página 301

    Data Win dow De si gne r User’s Gu ide 285 CHAPTER 10 Highlighting Information in Dat aW indow Objects About thi s chapter This chapt er describ es how y ou modify t he way info rmation dis plays in Data W i ndow ob jects and re ports based o n the condi tions you spe cify . T he conditions are usually related to data values, wh ich are not avail[...]

  • Página 302

    Highlighting inform ation 286 Dat aWindow .NET In the following DataW indow object, the Salary Plus Bene fits co lumn has a Shadow box b order around eve ry data value in the co lumn. T o display the border , you set the bo rder property for the column: Modifying properties at run time In some cases, however , you might want some properties of cont[...]

  • Página 303

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 287 T o control the display of the border , you define a property cond itional expression for the column’ s Border p r operty . When user s run the DataW indow object, DataW indow D esigner c hanges the bor der of in dividual dat a values based on [...]

  • Página 304

    Highlighting inform ation 288 Dat aWindow .NET When users run the DataW indow object, DataW indow Desig ner checks the value in the comp uted column called salary_plus_ben efits to see if it is greater than 60,000. If it is (true), DataW indow Designer displays the value with the Shadow b ox border . If not (false), Da taW i ndow Designer dis plays[...]

  • Página 305

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 289 Modifying p roperties cond itionally at runtime “Modifying prope rties a t runtime” on page 286 described how you can us e conditional expressions that are evaluate d at runtime to highlight informatio n in a DataW indow object. This section [...]

  • Página 306

    Modifying properties conditionall y at runtime 290 Dat aWindow .NET For complete information abo ut what the valid values are for all properties of contr ols in the Dat aW i ndow ob ject, see the discu ssion o f DataW indow object properties in the DataW indow Object Refer ence or online Help. 7 Replace the f (false) with the v alue to use for the [...]

  • Página 307

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 291 5 Click the button next to th e Brush C olor pro perty on th e G eneral page. 6 In the Modify Ex pression dialog b ox, enter the following expression fo r the Brush.C olor property : If(mod(getrow(),2 )=1, rgb(255, 255, 255 ), rgb(240, 240, 240 )[...]

  • Página 308

    Modifying properties conditionall y at runtime 292 Dat aWindow .NET 2 On the Font page in the Properties v iew , click the button next to the Escapement pr operty . 3 Enter the number 4 50 in the Mod i fy Exp res sio n dialog b ox an d click OK. The value entered for font escapemen t is in tenths of degrees, so the number 45 0 means 45 degrees. Y o[...]

  • Página 309

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 293 T o make these controls display in bold with two asterisks if th e employee is not from Massachusetts: 1 Select one of the controls, then u se Ctrl + Click to select the other three controls. The Properties view changes to show the pr operties th[...]

  • Página 310

    Modifying properties conditionall y at runtime 294 Dat aWindow .NET Tip Y ou can use under lines, itali cs, strike through, bo rders, and colors to highlight informatio n . Example 4: changing the size and location of control s The follow ing Dat aW indow object sh ows city and state columns enclosed in a rectangle and u nderlined. The columns chan[...]

  • Página 311

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 295 T o change pro perties of the rectan gle and the line for rows with the state column equal to New Y ork: 1 Select the rectangle, di splay the Position page in th e Properties view , and specify expressions for the following pro perties: 2 Select [...]

  • Página 312

    Supplying property values 296 Dat aWindow .NET V alid values of propertie s are shown in p arenthes es in the Prope rties view w herever p ossible. For ex ample, the d rop-down list showi ng border selections includes the correct number for specify ing each border in par entheses after the name of the border (ShadowB ox (1), Underline (4 )). T able[...]

  • Página 313

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 297 Background.Color Description S etting for the backgroun d color of a contro l. In the painte r Background Co lor on the Gen eral page or Font page i n the Propert ies view . Va l u e A number that specifies the control's back ground color . [...]

  • Página 314

    Supplying property values 298 Dat aWindow .NET The follo wing is a portio n of the result ing DataW i ndow object. Noti ce that the employ ee ID, first name, an d last name h ave a gray backg round if t he employee uses th e day care benefit: Border Description The typ e of border f or the con trol. In the p ainter Border on the General p age in th[...]

  • Página 315

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 299 The following is a p ortion of the resulting Data W indow object. Notice that the status On Leave d isplays with a Shadow box border: About the valu e L and the v alue On Le ave The status colum n uses an edit style. The inter nal value for on le[...]

  • Página 316

    Supplying property values 300 Dat aWindow .NET Brush.Hatch Description Setting for the fill pattern of a graphic control. In the p ainter Brush Hatch on the Gener al page in the P roperties vi ew . Va l u e A number that specifies the pattern that fills the control. V alues ar e: 0 —Horizontal 1 —Bdiagonal (lines from lower left to upper right)[...]

  • Página 317

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 301 The following statement is fo r the Brush.Hat ch property of the rectangle. If the month o f the start date matches the cu rrent month or t he next one, B rush.Hatch is set to Bdiag ona l ( 1). If not, it is set to T ran sparent (7), which means [...]

  • Página 318

    Supplying property values 302 Dat aWindow .NET Font.Escapement (for rotating controls) Description The angle of rotation from the baseline of the text. In the p ainter Escapement on the Fon t page in the Properties view . Va l u e An integer in tent hs of degrees . For example, 450 means 45 d egrees. 0 is horizontal. Exampl e T o enter rotation for[...]

  • Página 319

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 303 How to position c ontrols that are rotate d Make the controls movab le. T o do so, display each control and se lect the Moveable check box in the Position page. Then in the Preview view , click the rotated text control until a gray box displays ([...]

  • Página 320

    Supplying property values 304 Dat aWindow .NET Font.It alic Description A number that s pecifies whether the text should be italic. In the p ainter Italic on the Font page in the Properties vi ew . Va l u e V alues are: 0 —Not italic 1 —Italic Exampl e The following statements are specified fo r the F ont.Italic, Font.Und erline, and Font. W ei[...]

  • Página 321

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 305 Font.Strikethrough Description A number that speci fies whether t he text shou ld be cross ed out. In the painte r Strikeout on the Font pag e in the Pr oper ties view . Va l u e V alues are: 0 —Not cr ossed out 1 —Crossed out Exam ple The fo[...]

  • Página 322

    Supplying property values 306 Dat aWindow .NET Font.Underline Description A number that s pecifies whether the text should be underlined. In the p ainter Underline on the Font page in the Properties view . Va l u e V alues are: 0 —Not underli ned 1 —Underlined Exampl e The following statement, wh en applie d to the Font.Underline p roperty of c[...]

  • Página 323

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 307 Format Description The display format fo r a column. In the painte r Format on the Format page in the Prop erties view . Va l u e s A strin g specifying t he display f ormat. Exam ple The following statement, when applied to the Format pro per ty[...]

  • Página 324

    Supplying property values 308 Dat aWindow .NET Pen.Color Description The color of the line or the outline of a graphic control. In the p ainter Pen Color on the General page in th e Prop ert ies v iew . Va l u e A num ber th at sp ecifi es th e color of the line or outline. For info rmation on specifying colors, see “Specifying colors” on page [...]

  • Página 325

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 309 The following statement is f or the Pen.Co lor property of the line around the edge of the r ectangle. If the mont h o f the start date matches the current month or the next one, Pen.Colo r is set to light gray (12632256). If not, it is set to wh[...]

  • Página 326

    Supplying property values 310 Dat aWindow .NET Pen.Wid t h Description The wi dth of the line or the ou tline of a graphic cont rol. In the p ainter Pen W idth on the Gener al page in t he Properties vi ew . Va l u e An integ er in the unit of measure specified for the DataW indow object. Units of measure in clude PowerBui lder units , thousandths [...]

  • Página 327

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 31 1 Exam ple The following condi tion, entered for t he Pointer pr opert y of every con trol in a row of expense d ata, changes the po inte r to a column eve ry time the value in the expens e column exceeds $100,000. No te that the pointer has no me[...]

  • Página 328

    Supplying property values 312 Dat aWindow .NET The st atus column mu st be retrie ved The status column must be included in the data source even thou gh it d oes not appear in the DataW indow object itself. The Design view includes the text con trol at th e ri ght- hand end of the detail line. The text control is visi ble at runtime only if the val[...]

  • Página 329

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 313 Exam ple The following statement causes a rectangle to be located 6.25 0 inches from the left if the state co lumn for the row ha s the value NY . Otherwise, the rectangle is 4.000 inches from the left: If(state = 'NY', 6250, 4000) For [...]

  • Página 330

    Specifying colo rs 314 Dat aWindow .NET Exampl e For info rmati on, see “Example 4: c hanging the size and l ocation of con trols” on page 294. Y1, Y2 Description The d i stance of each end of the specified line from the top of the band in which the line is located. In the p ainter Y1, Y2 on the Position page in the Properties v iew . Va l u e [...]

  • Página 331

    CHAPTER 10 Highlighting Information in DataW indow Objects Data Win dow De si gne r User’s Gu ide 315 Sample nu meric calcula tion T o create cyan, you use blue an d green, bu t no red. If you wanted to create the most satu rated (brig ht) cyan, you would use maximum amount s of blue an d green in the for mula, which is indi cated by the num ber [...]

  • Página 332

    Specifying colo rs 316 Dat aWindow .NET[...]

  • Página 333

    Data Win dow De si gne r User’s Gu ide 317 CHAPTER 1 1 Using Nes ted Report s About thi s chapter This chapter prov ides infor mation about creati ng repo rt s that have other repor ts nested in th em. Conten ts About repo rts an d Dat aWindow object s A report is the same as a nonupd atable DataW indow object. This chapt er shows the proces s of[...]

  • Página 334

    About nested reports 318 Dat aWindow .NET Often, t he information in t he nested report dep ends on informa tion in the repo rt in which it is placed (the base report). Th e nested report and the base report ar e related to each other by some common data. The base re port and the nest ed repor t have a master/detail relations hi p. Freef orm repo r[...]

  • Página 335

    CHAPTER 11 Using Nested Reports Data Win dow De si gne r User’s Gu ide 319 The d iffere nce between nested a nd compos ite report s There are two important dif ferences betw een nes ting usin g the Composite s tyle and nestin g a report within a base r eport. Data sources The composite report do es not have a data source—it is just a container [...]

  • Página 336

    Creating a report using the Composite presentation style 320 Dat aWindow .NET The wizard displays all reports (Dat aW indow objects) that are in the current pro ject’ s library search path. 3 Click the reports you want to include in the composite rep ort and then click Next . The wizard lists your choices. 4 Cli ck Fini sh. DataW indow Designer p[...]

  • Página 337

    CHAPTER 11 Using Nested Reports Data Win dow De si gne r User’s Gu ide 321 Notice that you are in print pr eview (which is read-only). Working with compo site report s Many of th e options availa ble for working with reports, s uch as Rows>Filter , Rows>Im port, and Rows>Sort, are disabled for a composi te report. If yo u want to use any[...]

  • Página 338

    Placing a nested report in another report 322 Dat aWindow .NET • Select Design>Data Source to go to the Select painter . • Select Design>Retrieval Ar guments from the men u bar in the Select painter . • Define a retrieval argument in the Specify Retrieval Arguments dialog box. In the example, cus tomerID is the nam e assigned to the ret[...]

  • Página 339

    CHAPTER 11 Using Nested Reports Data Win dow De si gne r User’s Gu ide 323 5 Select Insert>Control>Report fro m the menu bar . 6 In the Design view , click where you want to place the repo rt. The Select R eport dial og box dis plays, listi ng defined r eports (DataW i ndow objects) in th e curren t project’ s library search path. 7 Selec[...]

  • Página 340

    Placing a nested report in another report 324 Dat aWindow .NET 1 1 I n the Preview view , you can see what your rep ort looks like: Placing an unrelated nes ted report in another report When you place an unrelated nested report in a base repo rt, the entire nested repor t appear s with each row of th e bas e repor t. ❖ T o plac e an unrelate d ne[...]

  • Página 341

    CHAPTER 11 Using Nested Reports Data Win dow De si gne r User’s Gu ide 325 Wo rking with nested report s When you u se nested repo rts either i n composit e repor ts or in other b ase reports, several en hancements and options ar e available. An easy way to see what you can do is to select the nested report an d look at the Properties v iew for i[...]

  • Página 342

    Working with nested reports 326 Dat aWindow .NET 3 Check the new width in th e Preview view . When you Print preview a DataWindow that con tains a nested N-Up repor t with ne wspaper column s across th e page, you mi ght find that blank p ages display (and print) when the nested r eport in the detail band fills the page. This is because any white s[...]

  • Página 343

    CHAPTER 11 Using Nested Reports Data Win dow De si gne r User’s Gu ide 327 4 Select File>Close from the menu bar . Y ou are prom pted to sav e your changes . 5 Click OK. Y ou return to the composite report or to the base rep ort that includes the nested report. Adding another neste d report to a composite rep ort After you have cr eated a comp[...]

  • Página 344

    Working with nested reports 328 Dat aWindow .NET Why re trieva l argu ments are effic ient Some DBMSs h ave the ability to bind inpu t variables in the WH ERE clause of the SEL ECT s tatement. When you use retrieval ar guments, a DBMS with th is capability sets up placeholders in the WHERE clause and compiles the SELECT statement once . DataWindow [...]

  • Página 345

    CHAPTER 11 Using Nested Reports Data Win dow De si gne r User’s Gu ide 329 The Ar guments bo x lists ar guments defined for t he nested rep ort and provides a way for you t o specify how information from the base r eport will supply the valu e of the ar gument to the nested repor t. 3 Supply the base report column th at will s upply the argu ment[...]

  • Página 346

    Working with nested reports 330 Dat aWindow .NET ❖ T o spe cify criteri a to relate a n ested rep ort to it s base report: 1 Select the nested repo rt and then sel ect the Criteria page in the Prop erties view . The Cri teria property page provides a way for you to specify how information from the base repor t will su p ply the retrieval criteria[...]

  • Página 347

    CHAPTER 11 Using Nested Reports Data Win dow De si gne r User’s Gu ide 331 Note that all bands in the DataWindow also have an Autosize Height option. The option is off by default and must be on for the Autosize Height option for the nested repo rt to work properly . ❖ T o change the Autosize Heig ht option fo r a nested rep ort: 1 In the Design[...]

  • Página 348

    Working with nested reports 332 Dat aWindow .NET Usin g the T rail Footer optio n (c ompos ite only ) The T rail Footer option controls the placemen t of the footer f or the last page of a nested report in a composite report . By default, this op tio n is on. The fo ot er appears directly un der the contents of the nested report and not at the b ot[...]

  • Página 349

    Data Win dow De si gne r User’s Gu ide 333 CHAPTER 12 W orking with Crosst abs About thi s chapter This chapter d escribes how to build crosstabs. Conten ts About crosst abs Cross tabulation is a useful techn ique for anal yzing data. By p resenting data in a spreadsh eet-like grid, a crosstab lets users view summary data instead of a lo ng serie[...]

  • Página 350

    About crosstabs 334 Dat aWindow .NET T able 12-1 : The Printe r table in the EAS Demo DB This information can be s ummarized in a crosstab. Here is a crosstab that shows unit sales b y printer for each qu arter: Rep Quarter Prod uct Unit s Simpson Q1 Stellar 12 Jones Q1 S tellar 18 Perez Q1 S tellar 15 Simpso n Q1 Cosmi c 33 Jones Q1 Cosm ic 5 Pere[...]

  • Página 351

    CHAPTER 12 Working with Crosstabs Data Win dow De si gne r User’s Gu ide 335 The first-quarter sales of Co smic printers displays in the first data cell. (As you can see from the data in the Printer table shown before the crosstab, i n Q1 Simpson so ld 33 units, Jo nes sold 5 u nits, and Perez sold 26 units—to taling 64 units.) DataW indow Desi[...]

  • Página 352

    About crosstabs 336 Dat aWindow .NET T wo types of crosstabs There are two typ es of crosstabs: •D y n a m i c • Static Dyna mic cr osst abs W ith dynamic crosstabs, Da taW indow Designer builds all th e columns and rows in the cr osstab dynamically when you run the crosstab. The num ber of columns and ro ws in the crosstab matc h the data that[...]

  • Página 353

    CHAPTER 12 Working with Crosstabs Data Win dow De si gne r User’s Gu ide 337 Creating crosst abs ❖ T o create a crosst ab: 1 Select File>New from the menu bar . The New di alog box di splays. 2 Select the DataW indow tab. 3 Select the Crosstab presentation style, then click OK. Y ou are prompted to specify the data. 4 Specify the data you wa[...]

  • Página 354

    Associating data with a crosstab 338 Dat aWindow .NET Associating data with a crosst ab Y ou associate crosstab columns, r ows , and cell values with colu mns in a databas e table or other data source. ❖ T o associate dat a wi th a crosst ab: 1 If you ar e defining a new crosstab, th e Define Crosstab Rows, Columns, V alues dialog b ox displ ays [...]

  • Página 355

    CHAPTER 12 Working with Crosstabs Data Win dow De si gne r User’s Gu ide 339 Dyna mic cros stab example The process is illustrated using the followin g dynamic crosstab. The columns in the database are R ep, Quarter , Prod uct, and Units. The cros stab shows the number of printers sold by Qu arter: S pec ifying the column s Y ou use the Colu mns [...]

  • Página 356

    Associating data with a crosstab 340 Dat aWindow .NET Columns tha t use c ode t ables If you specify columns in the database that us e code tables, wh ere data is stored with a data value but displayed with more meanin gfu l displ ay values , the crosstab uses the column’ s display values, not th e data values. For mo re inform ation about co de [...]

  • Página 357

    CHAPTER 12 Working with Crosstabs Data Win dow De si gne r User’s Gu ide 341 ❖ T o specify an ex pression for columns, row s, or va lues: 1 In the Crosstab Defi ni ti on dialo g box (or wizar d page), dou bl e-cli ck th e item in the Columns, Ro ws, or V alues bo x. The Modify Expression dialog box displays. 2 Specify the expression and click O[...]

  • Página 358

    Associating data with a crosstab 342 Dat aWindow .NET In the Design view , the crosstab looks like this : Notice that in the Design view , DataW indow Designer shows the quarter entries using the symbolic notation @qu arter (with dynamic cr osstabs, the actual data values are n o t known at def initi on time). @quarte r is resolved into the actual [...]

  • Página 359

    CHAPTER 12 Working with Crosstabs Data Win dow De si gne r User’s Gu ide 343 Specifying more than one row or colu mn T ypically yo u specify one database column as the Colu mns definition and one database colu mn for the Rows definiti on, as in the printer cr osstab. But you can specify as many co lumns (or expres sions) as you want. For example,[...]

  • Página 360

    Previewing crosstabs 344 Dat aWindow .NET Previewing cro sst abs When you hav e defined the cros stab, you can see it with data in the Preview view . ❖ T o preview the cr osst ab: 1 Select V iew>Preview from the menu bar to display the Preview view . 2 Click on the Preview view to be sure it is cur rent. 3 Select Rows>Retrieve from the men [...]

  • Página 361

    CHAPTER 12 Working with Crosstabs Data Win dow De si gne r User’s Gu ide 345 The rest of this s ection covers topics either uniq ue to crosstabs or especially important when working with crosstabs: • " Specifying basic propert ies" next • “Modifying th e da ta associated wi th the crosstab” on pa ge 346 • “ Changing the name[...]

  • Página 362

    Enhancing crosstabs 346 Dat aWindow .NET Modifying the data associated with the crosstab When you initially define the crosstab, you ass oci ate the crosstab r ows and columns w ith columns in a database t able or other data sourc e. Y ou can change the associated data any time in the Crosstab Definition dialog box. ❖ T o open the Crosst ab Defin[...]

  • Página 363

    CHAPTER 12 Working with Crosstabs Data Win dow De si gne r User’s Gu ide 347 Exam ple For example, if you want the product column to be labeled Printer Model , double-cli ck product in the Crosstab Definition d ialog box and specify printe r_mo del in the New Name dialog box. When the crosstab runs, you see this: Defining summary statistics When [...]

  • Página 364

    Enhancing crosstabs 348 Dat aWindow .NET This is a crosstab that has been en hanced to show averages and maximum values for each co lumn. This is the Desig n view: This is the crosstab at runtime: ❖ T o def ine a ro w summ ary: 1 Select Insert>Con trol > Computed Field fro m the menu bar . 2 Click the empty cell to the right of the last col[...]

  • Página 365

    CHAPTER 12 Working with Crosstabs Data Win dow De si gne r User’s Gu ide 349 Using crosst ab functions There are nine s pecial functions you can use only in cros stabs: CrosstabAvg , CrosstabAvgDec , CrosstabCount , CrosstabMax , Cros stabMaxDec , Cro sstabMin , CrosstabMinDe c , CrosstabSum , and CrosstabS umDec . These functions ar e listed in [...]

  • Página 366

    Enhancing crosstabs 350 Dat aWindow .NET Here CrosstabSum(1) returns the total of sum( units fo r cros stab) for the corres pondin g row . CrosstabSum(2) re tur ns th e to tal fo r sum( unit s * 1.2 for cr osstab ) . For more information For complete inf ormatio n about defini ng computed fields, s ee Chapter 5, “Enhancing Dat aWindow Objects.”[...]

  • Página 367

    CHAPTER 12 Working with Crosstabs Data Win dow De si gne r User’s Gu ide 351 The first step is to determine the expressi on that, given a sala ry , returns the next smaller sal ary that is a multiple of $10,000 . For example, given a salar y of $34,000, the express ion would return $ 30,000, an d given a s alary of $47,000, the expressi on would [...]

  • Página 368

    Enhancing crosstabs 352 Dat aWindow .NET This is the result in the Design view: This is the crosstab at runtime: Y ou can see, for example, that 2 people in departmen t 400 and 5 in dep artment 500 earn between $20,0 00 and $30 ,000. Displ aying blank value s as zer o In the preceding cros stab, several of the cells in the grid are blan k. There ar[...]

  • Página 369

    CHAPTER 12 Working with Crosstabs Data Win dow De si gne r User’s Gu ide 353 ❖ T o display blank val ues in a crosst ab as zero: 1 Select the column you want to modify and click the Form at tab in the Proper ties view . 2 Replace [General] in the Format box with ###0;# ##0;0;0 . The fourth s ection in the mask causes a n ull value to be represe[...]

  • Página 370

    Enhancing crosstabs 354 Dat aWindow .NET For example, in the following scr eenshot, the four values fo r Quarter (Q1, Q2, Q3, and Q4) are displayed in the Design view: At runtime, no m atter what values ar e in the database for the column, the crosst ab sh ow s only t he values th at we re s pecified when the cross tab was defined. In th e printer [...]

  • Página 371

    CHAPTER 12 Working with Crosstabs Data Win dow De si gne r User’s Gu ide 355 Exam ple In the following cr osstab, an expres sion has been specified for Units: The expressi on is for the F ont.W eight property of the uni ts colum n: if (units > 100, 700, 400) The expressio n specifies to us e bold font (wei ght = 700) i f the number o f units i[...]

  • Página 372

    Enhancing crosstabs 356 Dat aWindow .NET[...]

  • Página 373

    Data Win dow De si gne r User’s Gu ide 357 CHAPTER 13 W orking w ith T reeV iews About thi s chapter This chapt er descr ibes how to build and use Da taW indow objects in DataW indow Designer using the TreeV iew pres entation style. Conten ts T reeView present ation style The T r eeV iew presentation styl e provides an easy way to create DataW i [...]

  • Página 374

    TreeView presentation style 358 Dat aWindow .NET Exampl e This samp le T reeV i ew DataW indow uses the depart ment and em ployee t ables in the EAS De mo DB database and has two T reeV iew levels. The first level is the department n ame. The second level is the city wher e each employee resides. T he detail data for each empl oyee is grouped in T [...]

  • Página 375

    CHAPTER 13 Working with TreeViews Data Win dow De si gne r User’s Gu ide 359 Creating a new T reeView Dat aWindow Y ou use the T reeV iew wizard and the DataW indow painter to create a T reeV iew DataWin dow. T reeView creation process A T reeV iew DataWin dow has multiple levels, each of which is a node in the T reeV iew . Y ou use the T reeV ie[...]

  • Página 376

    Creating a new TreeView DataWindow 360 Dat aWindow .NET Multiple columns and multiple T reeView levels Y ou can specify more than o ne column, but all co lumns apply to T reeV iew level one. At this point, you can define only one T reeV iew level. Y ou define additional levels later . In the following example, T reeV iew grouping will b e by depart[...]

  • Página 377

    CHAPTER 13 Working with TreeViews Data Win dow De si gne r User’s Gu ide 361 8 Modify the default color an d border settings if needed, and then click Next. 9 Review the T reeV iew DataWin dow characteristics. 10 Clic k Finis h. The DataW indow painter Design view displays. For inform atio n about the Design vi ew , see “T re eV iew DataWindow [...]

  • Página 378

    Creating a new TreeView DataWindow 362 Dat aWindow .NET If you s elected the Grid S tyle check box , vertical and horizon tal grid lines displ ay: Here is the sample T reeV iew DataW indow object in the Preview view: Usin g an express ion for a c olumn name If you want to use an expres sion for one or mo re column names in a T reeV i ew , you can e[...]

  • Página 379

    CHAPTER 13 Working with TreeViews Data Win dow De si gne r User’s Gu ide 363 What you can do All of the techniques available in a tabular DataW indow ob ject , such a s moving contro ls and specifying d isplay formats, are av ailable for modi fying and enhanci ng T reeV iew DataW indow ob jects. See "Adding and deleting TreeV iew level s&quo[...]

  • Página 380

    Selecting a tree node and navigati ng the tree 364 Dat aWindow .NET In the sam ple DataW ind ow shown i n “Exam ple” on page 358, the second level has a single column, the em ployee_city column. 4 Click OK. The new T reeV iew level and a T railer band for that level are created in the T reeV iew Design view . For informat ion on ho w to set pro[...]

  • Página 381

    CHAPTER 13 Working with TreeViews Data Win dow De si gne r User’s Gu ide 365 Sorting rows in a T reeView Dat aWindow ❖ T o sort the rows within levels in a T reeView Dat aWindow: 1 Select Rows>Sort from the menu bar . 2 Drag the columns that y ou want to so rt the rows on from th e Sour ce Data box to th e Columns box. The order of the colum[...]

  • Página 382

    TreeView DataWindow Design view 366 Dat aWindow .NET T reeView Dat aWindow Design view The Design view for the T reeV iew DataW indow diff ers from the traditional Design view for mos t DataW indow pres entation styles. The Design view has a header band, a T reeV iew level band for each added level, a detail band, a T railer band for each lev el, a[...]

  • Página 383

    CHAPTER 13 Working with TreeViews Data Win dow De si gne r User’s Gu ide 367 • When there is no tree node icon specified, a s haded square icon in the detail band and in each T reeV iew level band represents where the connecting line ends. The position of all the icon s change s when y ou change the ind ent value. For more infor mation about sp[...]

  • Página 384

    Setting properties for the TreeView DataWindow 368 Dat aWindow .NET Setting general T reeView properties Y ou set most T reeV iew DataW indow propertie s on the Gener al page in t he DataW indow Pr operties v iew . The proper ties that are specific to a T reeV iew Dat aW indow are the T r eeV iew properties and the Grid properties in the Gen eral p[...]

  • Página 385

    CHAPTER 13 Working with TreeViews Data Win dow De si gne r User’s Gu ide 369 Setting T reeView level properties In the Properties view , you can specify expanded and collapsed icon s for each T reeV iew level. Y ou access the Properties v iew by clicking the bar identifying the band for that level in the Design view in the DataW indow painter . Y[...]

  • Página 386

    Setting properties for the TreeView DataWindow 370 Dat aWindow .NET 2 Use the DataWindow T reeV iew Level p roperties view that displays to edit the properties fo r the level you selected. The proper ties that are specific to a T reeV iew level band are at the bottom of the Properties v iew: Y ou set the tree node icon file name separately fo r eac[...]

  • Página 387

    CHAPTER 13 Working with TreeViews Data Win dow De si gne r User’s Gu ide 371 Setting detail band properties Y ou can specify an icon for the rows in the detail ba nd by clickin g the detail band in the DataWind ow painter to displ ay the Pr operties view . The only property that is specific to the detail band i s located at the bottom of the Prop[...]

  • Página 388

    TreeView DataWindow samples 372 Dat aWindow .NET Tr ee V i e w Dat aWindow s The T reeV iew DataW indows are d_sales_r eport and d_sa les_r epor t2 . Each T reeV iew DataW indow has three T reeV iew levels : • The first level (level 1) is the sales representati ve's name. Y ou create the first level using the T reeV iew DataW indow wizard. ?[...]

  • Página 389

    CHAPTER 13 Working with TreeViews Data Win dow De si gne r User’s Gu ide 373 Using the Dat a Expl orer Y ou can click on any T reeV iew level in the Data Explorer . If you click a company name in the T reeV iew DataW indow on the left (for example, Able Inc., under C atherine P ickett), order information d isplays on t he right. If you click an o[...]

  • Página 390

    TreeView DataWindow samples 374 Dat aWindow .NET Dat a Explore r Tr ee V i e w Dat aWindow Here is the T r eeV iew DataW indow used in the Data Explorer . One T reeV iew Dat aWi ndow The Data Explorer uses one T reeV i ew Dat aW indow , but Da taW indows that are not T reeV iew DataW indows also suppo r t the Data Explorer ’ s functionality . Dat[...]

  • Página 391

    CHAPTER 13 Working with TreeViews Data Win dow De si gne r User’s Gu ide 375 Dat a Linker sample What the D ata L inker does When yo u first r un the Dat a Linker , no data dis plays on the ri ght side of the window . Using the Dat a Linke r T o use the Data Linker , you first expand an emplo yee name and a company ’ s data in the T reeV iew Da[...]

  • Página 392

    TreeView DataWindow samples 376 Dat aWindow .NET For example, if y ou click first on C ather ine Pickett, then on A von Inc., then on 2073, an d last on Baseball Cap, the d ata in each of the related DataW indows displays on the right. Y ou can also update the data in each of the DataW indows.[...]

  • Página 393

    CHAPTER 13 Working with TreeViews Data Win dow De si gne r User’s Gu ide 377 Data Linker T reeVi ew Data Window Here is the T reeV iew DataW indow used in the Data Linker sample. One T reeV iew Dat aW indow The Data Linker uses one T reeV iew DataW indow , but other DataW indows that are not T reeV iew DataW indows also support the Data Linker ?[...]

  • Página 394

    TreeView DataWindow samples 378 Dat aWindow .NET[...]

  • Página 395

    Data Win dow De si gne r User’s Gu ide 379 CHAPTER 14 Exporting and Importing XML Dat a About thi s chapter The row dat a in a DataW indow can be exp orted and i mported in th e Extensib le Markup Languag e (XML). This chapter descri bes how to create and use templates that control the exp ort and import of data in XML format. Conten ts About XML[...]

  • Página 396

    About XML 380 Dat aWindow .NET An XML documen t is made up of declarations, elemen ts, comments, character references, and processing instructions, indi cated in th e document by explicit mark up. The simple XML d ocument that follows contains an XML declaration followed by the start tag of the root elemen t, <d_d ept_li st> , nested row and [...]

  • Página 397

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 381 XML Schema provides an alternat ive mecha nism for describing an d validating XML data. It provides a richer set of datatypes than a DTD, as well as suppo rt for namesp aces, including the abilit y to use pr efixes in instance d ocuments and accept unknown elem[...]

  • Página 398

    About XML 382 Dat aWindow .NET T o change this into well-formed XML, you need to add all the missin g end tags: <table> <tr> <td>Dog</td> <td>Cat</td> <td>Mouse</td> </tr> </table> Repres enting e mpty elem ents Empty elements canno t be represented in XML in th e same way they are in HTML[...]

  • Página 399

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 383 • Event-based APIs u se callbacks to r epor t events, such as the start and end of elements, to the calling applicatio n, and the application handles th ose events. These APIs provide faster , lower-level access to th e XML and are most ef ficient when extr a[...]

  • Página 400

    The Export/Import Template view for XML 384 Dat aWindow .NET The Export /Import T emplate view for XML Y ou define and edit templates for export and import in the Export/Import T emplate view for XML in the DataW indow painter. The view uses a tree view to represent the template. When yo u create a new Da taW indow obj ect , DataW indow Desi gner d[...]

  • Página 401

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 385 T able 14-1: I cons used i n the Export/Imp ort T empla te view Creating templates T o create a template, select th e New menu item or the New D efault menu item from the pop-up menu in the Export/Imp ort T empl ate view . Creating new bas e template s The New [...]

  • Página 402

    The Export/Import Template view for XML 386 Dat aWindow .NET Creati ng new defa ult templ ates The New Default menu item creates a template with the same contents as the New menu item, as well as a flat st ructur e of child elemen ts of the Detail Start element. A child element is created fo r each Dat aW indow column name, in the order in which th[...]

  • Página 403

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 387 Saving templates T o save a new template, select Save from the pop-up men u in the Export/Import T emplate view , and give the template a name and optionally a comment that identifies its us e. The template is stored inside the DataW indow object in the PBL. Af[...]

  • Página 404

    The Export/Import Template view for XML 388 Dat aWindow .NET The Detail section contains the row da ta, and is generated iteratively f or each row in the DataW indow object. The Det ai l S tart elem ent A line across the Export/Impo rt T emplate v iew separates the Header section from the Detail section. The first element after this line, d_dep t_l[...]

  • Página 405

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 389 Header section The Header section can con tain the items listed in T a ble 14 - 2 . Only the root element is required: T able 14-2: I tems pe rmitted in the He ader section of an XML doc ument Det ail sectio n in root elem ent The root element displays in the H[...]

  • Página 406

    Editing XML templ ates 390 Dat aWindow .NET Editing XML tem plates Using temp lates for dat a import If you u se a templat e created for dat a export, DataW indow expressio ns, text, comments, and p rocessing instructio ns ar e ignored when data is imported. If you are creating a template specifica lly for import, do not add any o f these items. Y [...]

  • Página 407

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 391 If an element has no attributes, you can edit its tag in the Export/Import T emplate view by selecting it and lef t- c licki ng th e tag or pressing F2. Literal text nodes can be edited in the same way . Y ou can delete items (and their children) by pressing th[...]

  • Página 408

    Editing XML templ ates 392 Dat aWindow .NET Exampl e This is an XML declaration that specifi es XML version 1.0 , UTF-16LE encoding, and th at the document can stand alone: <?xml version="1.0" encoding="UTF-1 6LE" standalone="yes"?> Document type declaration The documen t type declaration con tains or points to m[...]

  • Página 409

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 393 An external syst em iden tif ier with a public identifier: <!DOCTYPE d_test PUBLIC "-//MyOrg//DTD Test// EN" "http://www.mysite.org/mypath/mytest.dtd"> An external system iden tif ier wi th an int ernal DTD. The internal DTD is enclose[...]

  • Página 410

    Editing XML templ ates 394 Dat aWindow .NET Controls Adding a DataW indow control reference opens a di alog box co ntaining a l ist of the columns, computed fields, report con trols, and text controls in th e docu ment. Control references can also be added to empty attribute values or element contents using drag -and-drop f rom the Cont rol List v [...]

  • Página 411

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 395 Attributes Controls or exp ressions can also be r e ferenced for element attribute v alues. Select Edit/Add Attribut e fro m the pop-up menu for elements to edit an existing attribute or add a new one. For each attribute specified, yo u can select a control ref[...]

  • Página 412

    Editing XML templ ates 396 Dat aWindow .NET Comp os ite repo rt s For composite reports that use the Composite presentation style, the default template has elements that ref erence each of its nested repo rts. If a compo site DataW indow contains two repor ts that have col umns with identical names, you must use the p ro cedure that follows if you [...]

  • Página 413

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 397 CDA T A secti ons Y ou can export the n ame of a column in a CDA T A section using the synt ax <![CDA TA[ columnna me ]]> . Y ou can export the value o f a column using th e synta x <![CDAT A[~t colu mnname ]]> . T he ~t is used to introd uce a Data[...]

  • Página 414

    Exporting to XML 398 Dat aWindow .NET Processing instructions Processing instruction s (PIs) enable you to provide information to the application that uses the p rocessed XML. Processing ins tructions are enclosed in <? and ?> delimiters and must have a name, called the target, followed by optional data that is processed by the app lication t[...]

  • Página 415

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 399 Default export fo rmat If you have n ot created or assigned an expo rt template, DataW indow Design er uses a defaul t export format. This is the s ame format use d when you create a new default export tem plate. See “Creating templat es” on page 385. OLE D[...]

  • Página 416

    Exporting to XML 400 Dat aWindow .NET When you o pen a DataW indow, the Expo rt/Import T emplate view disp lays the template specified in the DataW indow’ s Use T emplate property . (If the view is not visible in the current layout, select V iew >Export/Import T emplate>XML from t he menu bar .) If t he property has not been se t, the first[...]

  • Página 417

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 401 For example, cons ider a group DataW indow object that includ es the columns sales_orde r_id and sales_ order_order_ date . The following screenshot shows the template for this DataWi ndow object: The root element in th e Header secti on of the template, Orders[...]

  • Página 418

    Exporting to XML 402 Dat aWindow .NET <ShipDate>2005-09-14</ShipDate> </Item> </Order> <Order id="2002"> <OrderDate>2002-03-18</OrderDate> <Item id="2"> <Product>401</Product> <Qty>24</Qty> <ShipDate>2002-09-18</ShipDate> </Item> <Item i[...]

  • Página 419

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 403 In the template show n in the pr eviou s illustration, sales are grouped by customer ID, then by order ID. The cust omer group header has attributes for the custom er ’ s ID and firs t and last nam es. The order group header has attributes for the ord er ID a[...]

  • Página 420

    Exporting to XML 404 Dat aWindow .NET Formatting the exported XML By default, the XML is exported without formattin g . If you want to view or verify the exported XML in a text ed itor , ch eck the I nclude W hitespace ch eck box or set the Expo rt.XML.IncludeWhitespace p roperty in code. T urning this property o n causes the export pro cess to ins[...]

  • Página 421

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 405 Exam ple: i nter nal meta data For example, if yo u select XMLDTD! an d MetaDataInternal!, the header and first row o f the export ed XML would look like this for a simpl e grid DataW indow for the contact table in the EAS Demo DB. The Include Whitespace proper[...]

  • Página 422

    Exporting to XML 406 Dat aWindow .NET <title>ma</title> <street>1280 Washington St.</street> <city>Emeryville</city> <state>MI</state> <zip>94608</zip> <phone>5105551309</phone> <fax>5105554209</fax> </dtdexternal_row> The DTD is in dtdexterna l.dtd : <?xml[...]

  • Página 423

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 407 The example shows the head er and th e first row of the generated XML: <?xml version="1.0" encoding="UTF-16LE" standalone="no"?> <Contacts> <xs:schema xmlns:po="http://www.example.com /PO1" xmlns:xs="h[...]

  • Página 424

    Importing XML 408 Dat aWindow .NET Selecting templates at ru ntime T wo DataW indow pr operties, E xport.XML.T emplateCoun t and Export.XML.T em plate[ ].Name, enable you to provide a list of temp lates from which the user of the appli cation can select at runtime. The T e m pl ateCount property gets the number of templates associated with a DataW [...]

  • Página 425

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 409 Importing with a temp late If the XML do cument or st ring from w hich you w ant to impor t data do es not correspond to the DataW indow column de finition, or if yo u want to import attribute values, you must use a template. If a schema is associated with the [...]

  • Página 426

    Importing XML 410 Dat aWindow .NET Remo ve tab char acter s When you s elect a column name i n the DataW indow expression dialog box, tab characters are added before and after the name. Y ou should remove these characters bef ore saving the expr ession. Impo rting data wi th grou p headers For XML import using a template, element and attribute cont[...]

  • Página 427

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 41 1 Using export te mplates for im port If you have al ready defi ned an expo rt te mplat e for a DataW indow object, you can use it as an import template, but only the mapping of column names to element attribute nam es is u sed for import. All other information [...]

  • Página 428

    Importing XML 412 Dat aWindow .NET • The name element ha s two children, emp_fname and emp _lname, that contain column references to tho se columns. The template exports and imports the dep t_id DataW indow column usin g the attribute of the emp loyee elemen t. It ex ports and i mports the emp_id , emp_ fn ame , and emp_ln ame columns using the c[...]

  • Página 429

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 413 The exported XML can be r eimpor ted into the DataW indow co lumn s dept_id , emp_i d , emp_fname , and emp_ln ame . Before importing, you m ust set th e import template on the Data I mport page in the Properties view or in code usin g the DataW indow object’[...]

  • Página 430

    Importing XML 414 Dat aWindow .NET Elemen ts with non-t ext con tent If the element has no text content, but do es contain comment s, processing instructions, o r any other content, it is not regarded as an empty element and is skip ped for impor t. Example with no empty element s The three XML documents that follow all sh o w th e same result when[...]

  • Página 431

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 415 Exam ple 2 In this example, the elements are not contained in rows, but they still match the DataW indow object. <?xml version="1.0"?> <root_element> <element_1>105</element_1> <element_2>Matthew</element_2> <ele[...]

  • Página 432

    Importing XML 416 Dat aWindow .NET Example with empty element s Exampl e 4 This example uses the same DataW indow object, but there are two emp ty elements in the XML document. Th e firs t has no con tent, and the second h as an attribute but n o content. Both are imported as emp ty elements. <?xml version="1.0"?> <root_element&g[...]

  • Página 433

    CHAPTER 14 Exporting and Importing XML Data Data Win dow De si gne r User’s Gu ide 417 Y ou can also use the Imp ort.XML.T race and Import.XML. T raceFile DataW indow object propert ies. If you use ImportClipb oard or ImportString to import the data, you must specify XML! as the importtype argumen t. For example: importstring(XML!, ls_xmlstring) [...]

  • Página 434

    Importing XML 418 Dat aWindow .NET Exampl e: templa te impo rt The following trace log shows a template impo rt of the department table. The template used is named t_1 . Notice that the DataWi ndow column de pt_id is referenced twice, as both an attr ibut e and a column. The second occur rence is ignor ed for the tem plate import , as described in [...]

  • Página 435

    Data Win dow De si gne r User’s Gu ide 419 CHAPTER 15 W orking w ith Graph s About thi s chapter This chapt er describ es how to build and use grap hs in DataW indow Designer . Conten ts Abou t gra phs Often t he best way to display in formation i s graphicall y . Instead of showin g users a series of rows and columns of d ata, you can present in[...]

  • Página 436

    About graphs 420 Dat aWindow .NET Part s of a graph Here is a column graph created in DataW indow Designer that contains mo st major parts of a gra ph. It sh ows qu arterl y sal e s of thr ee prod u cts: Stel l ar , Cosmic, and Galactic print ers : How dat a is represented Graphs di splay dat a points. T o define g raphs, you need to know h ow the [...]

  • Página 437

    CHAPTER 15 Working with Graphs Data Win dow De si gne r User’s Gu ide 421 Organization of a graph T able 15-2 lists the parts of a typical grap h. T able 15-2: O rganization of a graph T ypes of gra phs DataW ind ow Designer p rovides many types of grap hs for you to choose from . Y ou choose the type on the Defin e Graph S tyle pa ge in the Data[...]

  • Página 438

    About graphs 422 Dat aWindow .NET Area, bar , column, and line graphs Area, bar , column, and line graphs are co nceptually very si milar . They differ only in how t hey physically represent th e data values—wheth er they use areas, bars, columns, or lines to represent the values. All other properties are the same . T ypic ally yo u use area an d[...]

  • Página 439

    CHAPTER 15 Working with Graphs Data Win dow De si gne r User’s Gu ide 423 Scatter graphs Scatter graphs sh ow xy data poi nts. T ypically you u se scatter gr aphs to sh ow the relations hip between two set s of numeric values. Non -numeric values, su ch as string and DateT ime datatypes, do not display correctly . Scatter graphs do not use catego[...]

  • Página 440

    About graphs 424 Dat aWindow .NET Three-dimensi onal graphs Y ou can also create 3-dimen sional (3D) gr aph s of area, bar , column, line, and pie graphs . In 3D g raph s ( except f or 3 D pie gr aphs ), series are p lotted alon g a third axis (the Series axis) instead of along the Categor y axis. Y ou can specify the perspective to use to show the[...]

  • Página 441

    CHAPTER 15 Working with Graphs Data Win dow De si gne r User’s Gu ide 425 Using gr aphs in Dat aWindow ob jects Graph s in Data Win dow obj ec ts are dynam ic Graphs in DataW indow objects are tied directly to the data that is in th e DataW indow object. As the data ch anges, the graph is automatically updated to reflect the new values . T wo tec[...]

  • Página 442

    Using graphs in DataWindow objects 426 Dat aWindow .NET For mor e information , see “Associating dat a with a graph” on page 428. The Design view now co ntains a representation of the graph: 5 Specify the graph's proper ties in the Properties view . Using the graph's Properties view A graph has a Properties view in which you can speci[...]

  • Página 443

    CHAPTER 15 Working with Graphs Data Win dow De si gne r User’s Gu ide 427 Changing a graph's pos ition and size When you firs t place a graph in a DataW indow object, it is in the foreg round— it sits above the bands in the DataWindow object. Unless you change this setting, the graph disp lay s in front of any retrieved data. The initial g[...]

  • Página 444

    Using graphs in DataWindow objects 428 Dat aWindow .NET 3 Select the settings f or the following options on th e General property page: T able 15-5 : Size and p osition settin gs on the Genera l property page Associating data with a graph When us ing a graph in a DataW indow obj ect, you associ ate axes of the graph with columns in the DataW indow [...]

  • Página 445

    CHAPTER 15 Working with Graphs Data Win dow De si gne r User’s Gu ide 429 Spec if ying which rows to include in a graph The Rows drop-do wn list allows you to specif y which rows of data are graphed at any one tim e: T able 15 -6: Specifying which row s to include in a graph If you selec t Group If you are gr aphing da ta in the current g roup i [...]

  • Página 446

    Using graphs in DataWindow objects 430 Dat aWindow .NET Using disp lay valu es of dat a If you ar e graphing colum ns that use code tables, when data is stored with a data val ue but d isplayed t o users with more meaningful display val ues, by default the grap h uses the column's d ata values. T o have the graph use a column's display va[...]

  • Página 447

    CHAPTER 15 Working with Graphs Data Win dow De si gne r User’s Gu ide 431 Y ou can select column n ames from the drop -down list: There is a set of da ta points for each di f fer ent value of the co lumn you specif y here. For example, if you specify in the Series box a column that has 10 valu es, then your graph will have 10 series: one set of d[...]

  • Página 448

    Using graphs in DataWindow objects 432 Dat aWindow .NET Examples This section shows how to specify the data for seve ral different graphs of the data in the Printer table in the EAS Demo DB. The table records qu arterly unit sales of three printers by three sales rep resent atives. T able 15-7 : The Printe r table in the EAS Demo DB Graphi ng tot a[...]

  • Página 449

    CHAPTER 15 Working with Graphs Data Win dow De si gne r User’s Gu ide 433 The Quarter column serves as th e category . Because the Quarter column has four values (Q1, Q2 , Q3, and Q4), th ere will be four categories along the Category axis. Y ou want only one series (total sales in each quar ter), so you can leave the Series box empty , or type a[...]

  • Página 450

    Using graphs in DataWindow objects 434 Dat aWindow .NET Graphi ng uni t sales o f each pr inte r T o graph total quarter ly sales of each pr inter , retrieve all the columns into a DataW indow object and create a graph with the fo llowing settings on the Data page in the Properties view: •S e t R o w s t o All •S e t C a t e g o r y t o quar te[...]

  • Página 451

    CHAPTER 15 Working with Graphs Data Win dow De si gne r User’s Gu ide 435 Here is the resultin g graph: Graphing unit sales by represent ative and tot al sal es T o graph q uarterly sa les m ade b y each re p resentative, plus total sa les for each printer , create a graph with the following settings o n the Data page in the Proper ties view: •[...]

  • Página 452

    Using graphs in DataWindow objects 436 Dat aWindow .NET Here is the resulting graph: Notice that DataW indow Designer uses the literal “T otal” supplied in the Categor y box in t he Graph Data wind ow as a valu e in the Catego ry axis. Graphi ng act ual and proj ect ed sal es T o graph total q uarterly s ales of all pr inters and projected sale[...]

  • Página 453

    CHAPTER 15 Working with Graphs Data Win dow De si gne r User’s Gu ide 437 Here is the resultin g graph. DataW in dow Designer uses the literals you typed for the series as the series labels in the legend: Using overlays It is often useful to call special attention to one of the series in a graph, particular ly in a bar or column graph. Y ou can d[...]

  • Página 454

    Using graphs in DataWindow objects 438 Dat aWindow .NET Here is the resulting graph: T o graph unit s ales of prin ters by quar ter and ov erlay the lar gest s ale made in each quarter , change the V alue expression to th is: sum(units for graph), max(units for graph) Change the Series ex pression to this: "Total Sales", "@overlay~tL[...]

  • Página 455

    CHAPTER 15 Working with Graphs Data Win dow De si gne r User’s Gu ide 439 Using the Graph presen t ation style Instead of em beddi ng a gr aph in a DataW indow obj ect, you can use t he Graph presentation style to create a DataW indow object that is only a grap h—the underlyin g data is no t displa yed. One advantage of the Graph presentation s[...]

  • Página 456

    Defining a graph's properties 440 Dat aWindow .NET Defining a grap h's properties This section describes properties of a g raph. T o define the p roperties of a grap h, you use the grap h's Propertie s view . For general inf ormation abou t the property pages, see “Using the gra ph's Properties view” on page 426. Using the G[...]

  • Página 457

    CHAPTER 15 Working with Graphs Data Win dow De si gne r User’s Gu ide 441 S pec ifying the ty pe of graph Y ou can change the graph type at any time in the development environment. (T o chang e the type at runtime, mo dify a graph's Grap hT ype property .) ❖ T o specif y the grap h type: • On the General pro perties page for the gr aph, [...]

  • Página 458

    Defining a graph's properties 442 Dat aWindow .NET Sorting data for series and categories Y ou can specify how to sort the d ata for series and categ ories. By default, the data is s orted in ascend ing orde r . ❖ T o spe cify how to sort the dat a for series and c ategories in a graph: 1 Select Prop erties from the graph's pop-up m enu[...]

  • Página 459

    CHAPTER 15 Working with Graphs Data Win dow De si gne r User’s Gu ide 443 ❖ T o specif y text prop erties for th e title, label s, axis va lues, and le gend of a graph: 1 Select Properties from the graph's pop -up menu and then select the T ext page in the Properties v iew . 2 Select a text element from the list in the T ext Object drop-do[...]

  • Página 460

    Defining a graph's properties 444 Dat aWindow .NET 2 Specify the rotation you want in t he Escapement box using ten ths of a degree (45 0 means 45 degrees). Changes you make here are sho wn in the model graph in th e Design view and in the Preview view . Usin g displa y forma ts ❖ T o use a display fo rmat for a te xt element in a graph : 1 [...]

  • Página 461

    CHAPTER 15 Working with Graphs Data Win dow De si gne r User’s Gu ide 445 T o accomplish this, the display expressio ns were modified for the title and pie graph lab els: Specifying overlap and spacing W i th bar and column chart s, you can s pecify the pr operties in T abl e 15-8. T able 15 -8: Overlap and spacing properties for bar and column c[...]

  • Página 462

    Defining a graph's properties 446 Dat aWindow .NET Specifying axis properties Graphs hav e two or three axes. Y ou sp ecify the axes' properties in the Axis page in the graph's P roperties view . ❖ T o specify prope rt ies for an axis of a graph: 1 Select Prop erties from the graph's pop-up m enu and th en select the Axi s pag[...]

  • Página 463

    CHAPTER 15 Working with Graphs Data Win dow De si gne r User’s Gu ide 447 T able 15 -1 1: Propertie s for scaling on numeric axes Using ma jor and minor div isions Y ou can divide axes into divi sions. Each d ivisio n is identifi ed by a t ick mark, which is a short lin e that intersects an axis. In the Sales by Pr inter graphs shown in “Exampl[...]

  • Página 464

    Defining a graph's properties 448 Dat aWindow .NET Repres enting divisi ons w ith gri d and drop lines Y ou can specify lines to represent the divi sions as desc ribed in T able 15-12 and illustrated in F i gure 1 5 -1. T able 15-1 2: Representin g graph divisi ons with grid and drop lines Figure 15-1 : Grid and dro p lines in a graph Usin g l[...]

  • Página 465

    449 PA R T 3 Appendixes This part co ntains informa tion ab out the rules for naming objects in DataWin dow Desig ner , the ex tended attr ibute system tables, and starting Da taWindow Design er from a comm and line.[...]

  • Página 466

    450[...]

  • Página 467

    Data Win dow De si gne r User’s Gu ide 451 APPENDIX A Identifi ers About thi s chapter Y ou use identifiers to name objects. This chapter des cribes v alid identifiers. Conten ts Rules Identifiers: • Must start with a letter • Can have up to 40 characters, bu t no spaces • Are case insensitive (P AR T , Part, and part are identical) • Can[...]

  • Página 468

    Reserved words 452 Dat aWindow .NET Exampl es Here are some valid identifiers: first_quarter_summary EMPLOYEE_LABELS EmployeeSalarySummary Employee_by_# Here are some invalid identifiers: 2nd-quarter // Does not start wi th a letter emp list // Contains a space Employee’sInfo // Contains an inval id character Reserved words Y ou cannot use the fo[...]

  • Página 469

    Data Win dow De si gne r User’s Gu ide 453 APPENDIX B The Extended At tribute System T ables About thi s appendi x This appendix describes each column in the extended attribute system tables. Conten ts About the extended attribute system t ables DataW indow Design er stor es informat ion you provide for a data base table (such as the text to use [...]

  • Página 470

    The extended attribute system tables 454 Dat aWindow .NET What to do with t he t ables Y ou can open and l ook at these ta bles in the Dat abase painter just like other tables. Y ou might want to create a report of the extended attribute info rmation used in y our database by buildi ng a DataW indow object w hose data source is the extended attribu[...]

  • Página 471

    APPENDIX B T he Extended Attribute System Tables Data Win dow De si gne r User’s Gu ide 455 About font pitch and family Font pitch and family is a number obtained by adding togeth er two co nstant s: Pitch : 0=Default , 1=Fixed, 2=V ariabl e Family : 0=No Preference, 16=Roman, 32=Swis s, 48=Modern, 64=Scr ipt, 80=Decorative T able B-3: The PBCatC[...]

  • Página 472

    The extended attribute system tables 456 Dat aWindow .NET T able B-4: T he PBCatFmt table T able B -5: The PBCatVld ta ble T able B-6: T he PBCatEdt table 17 pbc_init Initial value 18 pbc_cmnt Column co mments 19 pbc_edit Edit styl e na m e 20 pbc_tag (Reserved) Column Column name D esc ription 1 pbf_name Display format name 2 pbf_frmt Display form[...]

  • Página 473

    APPENDIX B T he Extended Attribute System Tables Data Win dow De si gne r User’s Gu ide 457 Edit style typ es for the PB CatEdt ta b l e T able B-7 shows the edit st yle types available for the PBCatEdt table. T able B-7: Edit style typ es for the PBCatEdt table CheckBox edit style (code 85) T able B-8 shows a sa mple row in the PBC atEd t tab le[...]

  • Página 474

    Edit style types for the PBCatEdt tabl e 458 Dat aWindow .NET RadioButton edit st yle (code 86) T ab le B-10 shows a s ample row i n the PBCatEdt table for a RadioButto n edit style. T ab le B-1 1 shows the meaning of the values in T abl e B - 10 . T able B -10: Sample ro w in PBCatEd t for a Radio Button edit styl e Table B-1 1 : Values used i n R[...]

  • Página 475

    APPENDIX B T he Extended Attribute System Tables Data Win dow De si gne r User’s Gu ide 459 DropDownList Box edit style (code 87) T able B -12 sh ows a sample row in the PBC atEd t tab le for a DropDownListBox edit styl e. T able B-13 shows the meani ng of the val ues in T able B-12. T able B-12: Sam ple row in PBCatEdt fo r a DropDownListBox edi[...]

  • Página 476

    Edit style types for the PBCatEdt tabl e 460 Dat aWindow .NET DropDownDataW indow edit style (cod e 88) T ab le B-14 shows a s ample row i n the PBCatEdt table for a DropDown DataW indow edi t style. T able B-15 shows the meaning of the values in T able B-14. T able B-14: Sample row in PBCatEd t for a DropDownDataWindow edit styl e T able B-15: V a[...]

  • Página 477

    APPENDIX B T he Extended Attribute System Tables Data Win dow De si gne r User’s Gu ide 461 Edit edit style (code 89) T able B-16 sh ows a sa mple row in the PBCatEdt table for an Edit edit style. T able B-1 7 shows the mean ing of the values in T able B- 16. About the example This exampl e shows an Ed it edit sty le using a code table of display[...]

  • Página 478

    Edit style types for the PBCatEdt tabl e 462 Dat aWindow .NET T able B-16: Samp le row in PBCatEd t for an Edit edit style T able B -17: Va lues used i n Edit edi t style samp le Name Edit T ype Cntr Seqn Flag Work MyEdit Lim it 89 1 1 Flag Key MyEdit Fo rmat 89 1 2 0 Focus MyEdit Display1 89 1 3 0 MyEdit Data1 89 1 4 0 MyEdit Display2 89 1 5 0 MyE[...]

  • Página 479

    APPENDIX B T he Extended Attribute System Tables Data Win dow De si gne r User’s Gu ide 463 Edit Mask edit style (code 90) T able B-18 sh ows a sa mple row in the PBCatEdt table for an EditMask edit style. T able B-19 shows the meaning of the v alues in T a ble B-18. About the example This example sh ows an Edi t Mask edit st y le usi ng a code t[...]

  • Página 480

    E d i t s ty l e typ e s f o r th e P BC a tE d t ta b l e 464 Dat aWindow .NET Range Character representat i on (in decimal) of sp in control rang e. The min value a nd max val ue are tab -delimited . Examp le: "1[ta b]13" mean s min = 1, m ax = 1 3 SpinInc Character representati on (i n decimal) of spin increm ent. Display1 Display valu[...]

  • Página 481

    Data Win dow De si gne r User’s Gu ide 465 APPENDIX C St arting Dat aWindow Design er from the Comma nd Line About thi s chapter This chapter d escribes how to us e command-line ar guments to start Data W i ndow Desig ner . Conten ts S t arting Dat aWindow Designer from the comm and line Y ou can star t DataW indow Desig ner from a command line ([...]

  • Página 482

    Starting DataWindow Designer from the command line 466 Dat aWindow .NET Openi ng an obje ct or creatin g a new object Y ou can als o add one or more of the fol lowing opt ional switches to the command line to open a specific object or create a new one. {/L libraryname } {/O objectname } {/ N} {/ R} {/R O} {/ A arguments } All of these switch es m u[...]

  • Página 483

    Dat aWindow D esigner Us er ’s Guide 467 Symbol s + operator 207 @ used in cros stabs 34 1 used in v alidation rules 259 Numerics 24-ho ur times 237 A accelerator ke ys and CheckBox edit style 244 and Rad ioB u tto n ed it style 245 activity log 59 Activity Lo g view 56 using 59 Adap tiv e Ser ver Anyw here database s, creating an d delet i ng 60[...]

  • Página 484

    Index 468 DataWi ndo w .NET border s in Da taWind ow objec ts 181 in grap hs 441 Border s drop-dow n toolbar in DataWindo w painter 154 breaks, i n grou ped Data Window objects 2 70 brush.col or pr operty about 299 specify ing c olors 31 4 brush.hat ch proper ty 30 0 business ca rds 104 butto ns addi ng to D ataWin dow obje cts 210 addi ng to to ol[...]

  • Página 485

    Index Dat aWindow D esigner Us er ’s Guide 469 comments including in SQL statement s 9 3 modif ying in Libra ry pa inte r 4 3 comment s in XML export templa te 397 compiling on imp ort 48 regener a t ing libr ary entrie s 4 5 Composit e presenta tion st yl e about 31 7 limita tions 319 using 319 comp osi t e r e po r t s about 31 7 creating 319 l[...]

  • Página 486

    Index 470 DataWi ndo w .NET pre s en tin g in D at aW indow ob je ct s 238 retr iev i n g an d up da tin g 188 retr ievin g in Data Wi nd ow ob je cts 159, 160 saving in extern al files 91, 1 68 saving in HT ML Table f or mat 1 69 stor in g in D at aWind ow ob je ct s 185 updatin g, cont rolling 191 validatin g in DataWind ow objects 255 data entr [...]

  • Página 487

    Index Dat aWindow D esigner Us er ’s Guide 471 contr ol ling upda tes in 191 creating new 110 custom bu tto ns that add compu ted fields 209 data sour ce , modifyi ng 18 3 data source s 110 data, st or ing in 185 defaul ts 171 displa y formats 227 drawing co ntrols, add ing 2 03 edit styles 238 escapem ent 222 expressio ns in computed fiel ds 207[...]

  • Página 488

    Index 472 DataWi ndo w .NET generating SQL statemen t 8 5 spec ifyi ng an oute r jo in 84 st ore d pro ced ur es 137 supporte d 54 DDE application , usin g as data sourc e for DataWind ow object 111 default la yo ut s in view s 15 defaul t s, for Data Window obj ects 17 1 definin g retrie va l argum ents 13 0 Delete ASA Database utility 61 Delete L[...]

  • Página 489

    Index Dat aWindow D esigner Us er ’s Guide 473 working with in Database painter 240 working with in DataWindow painter 242 elevati o n, in 3D gra phs 4 41 encodin g declaration 391 Equality Required property 188 error me ssages, custo mizing in vali dation rules 260 escapem ent 222 executab les, runnin g from DataWi ndow Designer 26 exp o rt t e [...]

  • Página 490

    Index 474 DataWi ndo w .NET graphs about 419 addi ng to D ataWin dow obje cts 213 addi ng to r eports 213 auto sizing te xt 443 changin g positio n of 42 7 data types of ax es 446 default positioni ng in Data Window obje cts 221 default positioni ng in repo rts 221 definin g properties 44 0 examples 43 2 expressions in 444 in Da taWind ow objec ts [...]

  • Página 491

    Index Dat aWindow D esigner Us er ’s Guide 475 droppi n g from tab les 79, 80 propert ies 80 initial values, for c olumns 260 initializati on files about 32 chan ging path 33 editin g 17 InkPictu re cont rol 214 INSERT statement s, buildin g in Databa se pain ter 94 Interactive SQL view 56 J Join dialog box 84 joins, in Select pa inter 126 JPEG f[...]

  • Página 492

    Index 476 DataWi ndo w .NET List vi ew about 36 sortin g 37 usin g dr a g an d dr o p 38 local Ada ptive Serve r Anywhere da t abases 60 log files about 59 saving 60 logg ing expo rtin g ta ble synta x 72 starting 59 stop ping 60 logical operat o rs 116 LookU pDispl ay fu nction 430 M mailing labels 103 major div isions , in graphs 447 managing lib[...]

  • Página 493

    Index Dat aWindow D esigner Us er ’s Guide 477 runni ng 9 selecting 3 9 Obje cts vi ew 56 onlin e books 29 onlin e Help, usin g 29 Open dialog box 9 openin g Data Mani pulati on view 86 data bas e view s 82 Libr ar y painte r 36 Query pai n ter 4 0, 145 Select pain te r 121 operators, i n Quick Select criteria 116 optimizing libraries 44 Option s[...]

  • Página 494

    Index 478 DataWi ndo w .NET Powe rBar about 21 addi ng cus tom bu ttons t o 25 cont rolling display of 22 displayin g ava ila bl e butto ns 24 using 6 Powe rTip s assigni ng text in cust om butt ons 27 using 6 presenta tio n style s of DataWi ndo w object s 101 usin g Cross tab 333 usin g Grap h 439 using Group 272 previe w for crosstabs 34 4 retri[...]

  • Página 495

    Index Dat aWindow D esigner Us er ’s Guide 479 Q queries def ining 145 modify ing 147 modify in g comme n ts 43 naming 14 7 previewi ng 146 runni ng from toolba r 27 saving 14 6 Query data so urce 136 Query pai n ter, op en ing 40, 145 question ma rks (?) 39 Quick Select data so urce def ining 112 up and down a rrows 113 R RadioB utton ed it styl[...]

  • Página 496

    Index 480 DataWi ndo w .NET S Save As dial o g box 16 8 Save Rows As di alog bo x 91 saving data in DataWi ndow objects 185 data in e xternal files 168 data in HTML Table format 169 DataWi ndow o bjects 144 layou t s in views 14 querie s 146 scatter grap hs 423 search path, of reso urce s in resource files 49 Select pa in ter addi ng tabl es 123 co[...]

  • Página 497

    Index Dat aWindow D esigner Us er ’s Guide 481 expo r tin g to an ot her DBM S 72 for views, di sp laying 83 gene rating t hrough Quick Se lect 112 gene ra tin g thr o ug h SQL Se le ct 121 importing from text file s 95 loggin g 59 painti ng 92 typin g 94 SQLCac he va riable 328 stacked gra ph s 424 standalon e document de claration 391 starting [...]

  • Página 498

    Index 482 DataWi ndo w .NET text f iles expo r tin g ob je ct s to 46 importing SQL statem ents from 95 text pat tern s, ma tching in vali d a tion r ules 2 59 text pr operti e s in Da taWind ow objec ts 179 in grap hs 442 thre e-dim ensio nal g raphs about 424 point of vie w 441 Time k eywor d 23 8 timer, se tting in DataWi ndow obj ects 172 Timer[...]

  • Página 499

    Index Dat aWindow D esigner Us er ’s Guide 483 dockin g 13 droppi ng 85 floa ting 13 in Lib rary pa i nter 36 movin g 11 removi ng 14 resizing 11 restori ng layo ut s 15 saving layo uts 14 title b ar, display ing and us ing 11 updati ng 191 using in painte rs 10 Visi ble prop erty 311 W WHERE clau se specif ie d for updat e and del ete 195 specif[...]

  • Página 500

    Index 484 DataWi ndo w .NET[...]