Sybase DataWindow .NET User Manual

DataWindow Designer User’s Guide
DataWindow .NET
2.0
DOCUMENT ID: DC00043-01-0200-01 LAST REVISED: March 2006
Copyright © 2004-2006 by Sybase, Inc. All rights reserved. This publication pertains to Sybase software and to any subsequent release until otherwise indicated in new editions or technical notes.
To order additional documents, U.S. and Canadian customers should call Customer Fulfillment at (800) 685-8225, fax (617) 229-9845. Customers in other countries with a U.S. license agreement ma y co ntac t Customer Fulfillment via the above fax number. All other
international customers should contact their S ybase subsidiary or local distributor. Upgrades are provided only at regularly scheduled software release dates. No part of this publication may be reproduced, transmitted, or translated in any form or by any means, electronic, mechanical, manual, optical, or otherwise, without the prior written permission of Sybase, Inc.
Sybase, the Sybase logo, ADA Workbench, Adaptable Windowing Environment, Adaptive Component Architecture, Adaptive Server, Adaptive Server Anywhere, Adaptive Server Enterprise, Adaptive Server Enterprise Monitor, Adaptive Server Enterprise Replication, Adaptive Server Everywhere, Adaptive Warehouse, Afaria, Answers Anywhere, Anywhere Studio, Application Manager, AppModeler, APT Workbench, APT-Build, APT-Edit, APT-Execute, APT-Translator, APT-Library, AvantGo Mobile Delivery, AvantGo Mobile Inspection, AvantGo Mobile Marketing Channel, AvantGo Mobile Pharma, AvantGo Mobile Sales, AvantGo Pylon, AvantGo Pylon Application Server, AvantGo Pylon Conduit, AvantGo Pylon PIM Server, AvantGo Pylon Pro, Backup Server, BizTracker, ClearConnect, Client-Library, Client Services, Convoy/DM, Copernicus, Data Pipeline, Data Workbench, DataArchitect, Database Analyzer, DataExpress, DataServer, DataWindow, DataWindow .NET, DB-Library, dbQueue, Developers Workbench, DirectConnect, DirectConnect Anywhere, Distribution Director, e-ADK, E-Anywhere, e-Biz Impact, e-Biz Integrator, E-Whatever, EC Gateway, ECMAP, ECRTP, eFulfillment Accelerator, Embedded SQL, EMS, Enterprise Application Studio, Enterprise Client/Server, Enterprise Connect, Enterprise Data Studio, Enterprise Manager, Enterprise SQL Server Manager, Enterprise Work Architecture, Enterprise Work Designer, Enterprise Work Modeler, eProcurement Accelerator , EW A, F inancial Fusion, F inancial Fusion Server, Gateway Manager, GlobalFIX, iAnywhere, iAnywhere Solutions, ImpactNow, Industry W arehouse Studio, InfoMaker, Information Anywhere, Information Everywhere, InformationConnect, InternetBuilder, iScript, Jaguar CTS, jConnect for JDBC, M2M Anywhere, Mach Desktop, Mail Anywhere Studio, Mainframe Connect, Maintenance Express, Manage Anywhere Studio, M-Business Anywhere, M-Business Channel, M-Business Network, M-Business Suite, MDI Access Server, MDI Database Gateway, media.splash, MetaWorks, mFolio, Mirror Activator, MySupport, Net-Gateway, Net-Library, New Era of Networks, ObjectConnect, ObjectCycle, OmniConnect, OmniSQL Access Module, OmniSQL Toolkit, Open Biz, Open Client, Open ClientConnect, Open Client/Server, Open Client/Server Interfaces, Open Gateway, Open Server, Open ServerConnect, Open Solutions, Optima++, PB-Gen, PC APT Execute, PC DB-Net, PC Net Library, Pharma Anywhere, PocketBuilder, Pocket PowerBuilder, Power++, power.stop, PowerAMC, PowerBuilder, PowerBuilder Foundation Class Library, PowerDesigner, PowerDimensions, PowerDynamo, PowerScript, PowerSite, PowerSocket, Powersoft, PowerStage, PowerStudio, PowerTips, Powersoft Portfolio, Powersoft Professional, PowerWare Desktop, PowerWare Enterprise, ProcessAnalyst, QAnywhere, Rapport, RemoteWare, RepConnector, Replication Agent, Replication Driver, Replication Server, Replication Server Manager, Replication Toolkit, Report-Execute, Report Workbench, Resource Manager , RFID Anywhere, R W -DisplayLib, R W -Library , Sales Anywhere, SDF, Search Anywhere, Se c ure SQL Server, Secure SQL Toolset, Security Guardian, SKILS, smart.partners, smart.parts, smart.script, SOA Anywhere, SQL Advantage, SQL Anywhere, SQL Anywhere Studio, SQL Code Checker, SQL Debug, SQL Edit, SQL Edit/TPU, SQL Everywhere, SQL Modeler, SQL Remote, SQL Server, SQL Server Manager, SQL SMART, SQL Toolset, SQL Server/CFT, SQL Server/DBM, SQL Server SNMP SubAgent, SQL Station, SQLJ, STEP, SupportNow, S.W.I.F.T. Message Format Libraries, Sybase Central, Sybase Client/Server Interfaces, Sybase Financial Server, Sybase Gateways, Sybase IQ, Sybase MPP, Sybase SQL Desktop, Sybase SQL Lifecycle, Sybase SQL Workgroup, Sybase User Workbench, SybaseW ar e, Syber Financial, SyberAssist, SybFlex, SyBooks, System 10, System 11, System XI (logo), SystemTools, Tabular Data Stream, TradeForce, Transact-SQL, Translation Toolkit, UltraLite, UltraLite.NET, UNIBOM, Unilib, Uninull, Unisep, Unistring, URK Runtime Kit for UniCode, VisualWriter, VQL, WarehouseArchitect, Warehouse Control Center, Warehouse Studio, Warehouse WORKS, Watcom, Watcom SQL, Watcom SQL Server, Web Deployment Kit, Web.PB, Web.SQL, WebSights, WebViewer, WorkGroup SQL Server, XA­Library, XA-Server, XcelleNet, and XP Server are trademarks of Sybase, Inc. 10/05
Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. All other company and product names used herein may be trademarks or registered trademarks of their respective companies. Use, duplication, or disclosure by the government is subject to the restrictions set forth in subparagraph (c)(1)(ii) of DFARS 52.227-7013
for the DOD and as set forth in FAR 52.227-19(a)-(d) for civilian agencies. Sybase, Inc., One Sybase Drive, Dublin, CA 94568.
Contents
About This Book.......................................................................................................................... xv
PART 1 THE DATAWINDOW DESIGNER ENVIRONMENT
CHAPTER 1 Working with DataWindow Designer............................................. 3
About DataWindow Designer........................................................... 4
The DataWindow Designer environment.......................................... 4
About the PowerBar .................................................................. 5
Working with projects....................................................................... 6
Working with DataWindow objects................................................... 7
Creating new DataWindow objects ........................................... 8
Opening existing DataWindow objects...................................... 8
Running or previewing DataWindow objects............................. 9
Working in painters ........................................................................ 10
Using views in painters............................................................ 10
Using pop-up menus ............................................................... 15
Defining colors......................................................................... 16
Working with tools.......................................................................... 17
Using the file editor.................................................................. 17
Using the To-Do List................................................................ 18
Setting properties........................................................................... 20
Using toolbars ................................................................................ 21
Toolbar basics......................................................................... 21
Drop-down toolbars................................................................. 21
Controlling the display of toolbars ........................................... 22
Moving toolbars using the mouse............................................ 23
Customizing toolbars............................................................... 23
Creating new toolbars ............................................................. 28
Using online Help........................................................................... 29
Customizing keyboard shortcuts.................................................... 30
Changing fonts............................................................................... 31
DataWindow Desi gne r User’s Guide iii
Contents
How your DataWindow Designer environment is managed........... 32
About the registry.................................................................... 32
About the initialization file........................................................ 33
CHAPTER 2 Working with Libraries.................................................................. 35
About libraries................................................................................ 35
About the Library painter................................................................ 36
Working with libraries..................................................................... 37
Displaying libraries and objects............................................... 37
Using the pop-up menu........................................................... 38
Controlling columns that display in the List view..................... 38
Selecting objects..................................................................... 39
Filtering the display of objects................................................. 39
Filtering the display of libraries and folders............................. 40
Opening and previewing objects............................................. 40
Copying, moving, and deleting objects.................................... 40
Setting the root........................................................................ 42
Moving back, forward, and up one level.................................. 42
Modifying comments ............................................................... 43
Deleting libraries...................................................................... 44
Optimizing libraries......................................................................... 44
Regenerating library entries........................................................... 45
Migrating libraries.................................................................... 45
Exporting and importing entries ..................................................... 46
Creating a deployment library (PBD file)........................................ 48
Including additional resources in the PBD file......................... 48
What happens at runtime........................................................ 49
Creating a library directory report................................................... 49
CHAPTER 3 Managing the Database................................................................. 51
Working with database components.............................................. 51
Managing databases...................................................................... 54
Using the Database painter............................................................ 55
Modifying database preferences............................................. 58
Logging your work................................................................... 59
Creating and deleting an Adaptive Server Anywhere database..... 60
Working with tables........................................................................ 62
Creating a new table from scratch........................................... 62
Creating a new table from an existing table............................ 63
Specifying column definitions.................................................. 64
Specifying table and column properties .................................. 64
Altering a table ........................................................................ 68
Cutting, copying, and pasting columns.................................... 70
iv
DataWindow .NET
Contents
Closing a table......................................................................... 70
Dropping a table...................................................................... 70
Viewing pending SQL changes............................................... 71
Printing the table definition...................................................... 72
Exporting table syntax............................................................. 72
About system tables................................................................ 73
Creating and editing Sybase Adaptive Server temporary
tables................................................................................ 74
Working with keys.......................................................................... 75
Working with indexes..................................................................... 79
Working with database views......................................................... 81
Manipulating data........................................................................... 86
Retrieving data........................................................................ 86
Modifying data......................................................................... 87
Sorting rows ............................................................................ 88
Filtering rows........................................................................... 89
Viewing row information .......................................................... 90
Importing data ......................................................................... 90
Printing data............................................................................ 91
Saving data ............................................................................. 91
Creating and executing SQL statements ....................................... 92
Building and executing SQL statements ................................. 92
Customizing the editor............................................................. 95
Controlling access to the current database.................................... 96
PART 2 DATAWINDOWS
CHAPTER 4 Defining DataWindow Objects..................................................... 99
About DataWindow objects............................................................ 99
DataWindow object examples............................................... 100
Choosing a presentation style...................................................... 101
Using the Tabular style.......................................................... 102
Using the Freeform style ....................................................... 102
Using the Grid style............................................................... 103
Using the Label style............................................................. 103
Using the N-Up style ............................................................. 105
Using the Group style............................................................ 106
Using the Composite style..................................................... 107
Using the Graph and Crosstab styles.................................... 108
Using the TreeView style....................................................... 108
Building a DataWindow object ..................................................... 109
Selecting a data source................................................................ 110
DataWindow Designer User’s Guide v
Contents
Using Quick Select....................................................................... 112
Selecting a table.................................................................... 113
Selecting columns................................................................. 114
Specifying sorting criteria...................................................... 115
Specifying selection criteria................................................... 115
Using SQL Select......................................................................... 121
Selecting tables and views.................................................... 122
Selecting columns................................................................. 124
Displaying the underlying SQL statement............................. 125
Joining tables ........................................................................ 126
Using retrieval arguments ..................................................... 129
Specifying selection, sorting, and grouping criteria............... 130
Using Query ................................................................................. 136
Using External.............................................................................. 136
Using Stored Procedure............................................................... 137
Using ADO DataSet..................................................................... 139
Choosing DataWindow object-wide options................................. 141
Generating and saving a DataWindow object.............................. 142
About the extended attribute system tables and
DataWindow objects....................................................... 143
Saving the DataWindow object ............................................. 144
Modifying an existing DataWindow object............................. 144
Defining queries........................................................................... 145
Previewing the query............................................................. 146
Saving the query ................................................................... 146
Modifying a query.................................................................. 147
What's next................................................................................... 147
CHAPTER 5 Enhancing DataWindow Objects................................................ 149
Working in the DataWindow painter............................................. 150
Understanding the DataWindow painter Design view........... 152
Using the DataWindow painter toolbars................................ 154
Using the Properties view in the DataWindow painter .......... 155
Selecting controls in the DataWindow painter....................... 156
Resizing bands in the DataWindow painter Design view...... 157
Using zoom in the DataWindow painter................................ 157
Undoing changes in the DataWindow painter....................... 158
Using the Preview view of a DataWindow object......................... 158
Retrieving data...................................................................... 159
Modifying data....................................................................... 161
Viewing row information........................................................ 162
Importing data into a DataWindow object.............................. 163
Using print preview................................................................ 163
Printing data.......................................................................... 165
vi
DataWindow .NET
Contents
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.................................. 169
Working with PSR files.......................................................... 170
Modifying general DataWindow object properties........................ 171
Changing the DataWindow object style................................. 171
Setting colors in a DataWindow object.................................. 172
Specifying properties of a grid DataWindow object............... 173
Specifying pointers for a DataWindow object........................ 174
Defining print specifications for a DataWindow object .......... 174
Modifying text in a DataWindow object ................................. 178
Defining the tab order in a DataWindow object..................... 179
Naming controls in a DataWindow object.............................. 180
Using borders in a DataWindow object................................. 181
Specifying variable-height bands in a DataWindow object.... 182
Modifying the data source of a DataWindow object.............. 183
Storing data in a DataWindow object using the Data view........... 185
What happens at runtime...................................................... 187
Retrieving data............................................................................. 187
Prompting for retrieval criteria in a DataWindow object ........ 187
Retrieving rows as needed.................................................... 188
Saving retrieved rows to disk ................................................ 189
CHAPTER 6 Controlling Updates in DataWindow Objects........................... 191
About controlling updates............................................................. 191
What you can do ................................................................... 192
Specifying the table to update...................................................... 193
Specifying the unique key columns.............................................. 193
Specifying an identity column....................................................... 194
Specifying updatable columns ..................................................... 194
Specifying the WHERE clause for update/delete......................... 195
Specifying update when key is modified...................................... 197
Using stored procedures to update the database........................ 198
CHAPTER 7 Working with Controls in DataWindow Objects....................... 201
Adding controls to a DataWindow object ..................................... 201
Adding columns to a DataWindow object.............................. 201
Adding text to a DataWindow object ..................................... 202
Adding drawing controls to a DataWindow object................. 203
Adding a group box to a DataWindow object........................ 203
Adding pictures to a DataWindow object............................... 204
Adding computed fields to a DataWindow object.................. 205
DataWindow Designer User’s Guide vii
Contents
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 DataWindow object............................ 214
Displaying boundaries for controls in a DataWindow object . 215
Using the grid and the ruler in a DataWindow object............ 215
Deleting controls in a DataWindow object............................. 216
Moving controls in a DataWindow object .............................. 216
Copying controls in a DataWindow object............................. 216
Resizing controls in a DataWindow object............................ 217
Aligning controls in a DataWindow object............................. 218
Equalizing the space between controls in a DataWindow
object.............................................................................. 218
Equalizing the size of controls in a DataWindow object........ 219
Sliding controls to remove blank space in a DataWindow
object.............................................................................. 219
Positioning controls in a DataWindow object............................... 221
Rotating controls in a DataWindow object ................................... 222
CHAPTER 8 Displaying and Validating Data .................................................. 225
About displaying and validating data............................................ 225
Presenting the data............................................................... 226
Validating data....................................................................... 227
About display formats................................................................... 227
Working with display formats ....................................................... 228
Working with display formats in the Database painter .......... 228
Working with display formats in the DataWindow painter ..... 230
Defining display formats............................................................... 231
Number display formats ........................................................ 233
String display formats............................................................ 235
Date display formats.............................................................. 235
Time display formats............................................................. 237
About edit styles........................................................................... 238
Working with edit styles................................................................ 240
Working with edit styles in the Database painter................... 240
Working with edit styles in the DataWindow painter.............. 242
Defining edit styles....................................................................... 242
The Edit edit style.................................................................. 242
The DropDownListBox edit style........................................... 243
The CheckBox edit style........................................................ 244
The RadioButtons edit style .................................................. 245
The EditMask edit style......................................................... 246
viii
DataWindow .NET
Contents
The DropDownDataWindow edit style................................... 249
The InkEdit edit style............................................................. 251
Defining a code table ................................................................... 251
How code tables are implemented........................................ 252
How code tables are processed............................................ 253
Validating user input.............................................................. 254
About validation rules................................................................... 255
Understanding validation rules.............................................. 255
Working with validation rules........................................................ 256
Defining validation rules............................................................... 257
Defining a validation rule in the Database painter................. 257
Defining a validation rule in the DataWindow painter............ 260
How to maintain extended attributes............................................ 263
CHAPTER 9 Filtering, Sorting, and Grouping Rows ..................................... 265
Filtering rows................................................................................ 265
Sorting rows ................................................................................. 267
Suppressing repeating values............................................... 269
Grouping rows.............................................................................. 270
Using the Group presentation style....................................... 272
Defining groups in an existing DataWindow object............... 276
CHAPTER 10 Highlighting Information in DataWindow Objects ................... 285
Highlighting information................................................................ 285
Modifying properties when designing.................................... 285
Modifying properties at runtime............................................. 286
Modifying properties conditionally at runtime............................... 289
Example 1: creating a gray bar effect.................................... 290
Example 2: rotating controls.................................................. 291
Example 3: highlighting rows of data..................................... 292
Example 4: changing the size and location of controls ......... 294
Supplying property values............................................................ 295
Background.Color.................................................................. 297
Border.................................................................................... 298
Brush.Color ........................................................................... 299
Brush.Hatch........................................................................... 300
Color...................................................................................... 301
Font.Escapement (for rotating controls)................................ 302
Font.Height............................................................................ 303
Font.Italic............................................................................... 304
Font.Strikethrough................................................................. 305
Font.Underline....................................................................... 306
Font.Weight........................................................................... 306
DataWindow Designer User’s Guide ix
Contents
Format................................................................................... 307
Height.................................................................................... 307
Pen.Color .............................................................................. 308
Pen.Style............................................................................... 308
Pen.Width.............................................................................. 310
Pointer................................................................................... 310
Protect................................................................................... 311
Timer_Interval ....................................................................... 311
Visible.................................................................................... 311
Width..................................................................................... 312
X............................................................................................ 312
X1, X2.................................................................................... 313
Y............................................................................................ 313
Y1, Y2.................................................................................... 314
Specifying colors.......................................................................... 314
CHAPTER 11 Using Nested Reports ................................................................. 317
About nested reports.................................................................... 317
Creating a report using the Composite presentation style........... 319
Placing a nested report in another report..................................... 321
Placing a related nested report in another report.................. 321
Placing an unrelated nested report in another report............ 324
Working with nested reports......................................................... 325
Adjusting nested report width and height.............................. 325
Changing a nested report from one report to another........... 326
Modifying the definition of a nested report ............................ 326
Adding another nested report to a composite report............. 327
Supplying retrieval arguments to relate a nested report to
its base report................................................................. 327
Specifying criteria to relate a nested report to its base
report............................................................................. 329
Using options for nested reports ........................................... 330
CHAPTER 12 Working with Crosstabs.............................................................. 333
About crosstabs ........................................................................... 333
Two types of crosstabs.......................................................... 336
Creating crosstabs....................................................................... 337
Associating data with a crosstab.................................................. 338
Specifying the information..................................................... 338
Viewing the crosstab............................................................. 341
Specifying more than one row or column.............................. 343
Previewing crosstabs ................................................................... 344
x
DataWindow .NET
Contents
Enhancing crosstabs.................................................................... 344
Specifying basic properties ................................................... 345
Modifying the data associated with the crosstab................... 346
Changing the names used for the columns and rows........... 346
Defining summary statistics................................................... 347
Cross-tabulating ranges of values......................................... 350
Creating static crosstabs....................................................... 353
Using property conditional expressions................................. 354
CHAPTER 13 Working with TreeViews............................................................. 357
TreeView presentation style......................................................... 357
Creating a new TreeView DataWindow ....................................... 359
TreeView creation process.................................................... 359
Creating a TreeView DataWindow........................................ 359
Adding and deleting TreeView levels........................................... 363
Selecting a tree node and navigating the tree.............................. 364
Sorting rows in a TreeView DataWindow..................................... 365
TreeView DataWindow Design view............................................ 366
Setting properties for the TreeView DataWindow........................ 367
Setting general TreeView properties..................................... 368
Setting TreeView level properties.......................................... 369
Setting detail band properties................................................ 371
TreeView DataWindow samples.................................................. 371
Data Explorer sample............................................................ 372
Data Linker sample ............................................................... 375
CHAPTER 14 Exporting and Importing XML Data........................................... 379
About XML ................................................................................... 379
Valid and well-formed XML documents................................. 380
XML syntax............................................................................ 381
XML parsing.......................................................................... 382
XML support in the DataWindow painter...................................... 383
The Export/Import Template view for XML................................... 384
Creating templates................................................................ 385
Saving templates................................................................... 387
Header and Detail sections................................................... 387
Editing XML templates................................................................. 390
XML declaration .................................................................... 391
Document type declaration.................................................... 392
Root element......................................................................... 393
Controls................................................................................. 394
DataWindow expressions...................................................... 394
Attributes............................................................................... 395
DataWindow Designer User’s Guide xi
Contents
Composite and nested reports.............................................. 395
CDATA sections.................................................................... 397
Comments............................................................................. 397
Processing instructions ......................................................... 398
Exporting to XML.......................................................................... 398
Setting properties on the Data Export page.......................... 399
Selecting templates at runtime.............................................. 408
Importing XML.............................................................................. 408
Importing with a template...................................................... 409
Default data import................................................................ 413
Tracing import ....................................................................... 416
CHAPTER 15 Working with Graphs................................................................... 419
About graphs................................................................................ 419
Parts of a graph..................................................................... 420
Types of graphs..................................................................... 421
Using graphs in DataWindow objects .......................................... 425
Placing a graph in a DataWindow object............................... 425
Using the graph's Properties view......................................... 426
Changing a graph's position and size.................................... 427
Associating data with a graph ............................................... 428
Using overlays....................................................................... 437
Using the Graph presentation style.............................................. 439
Defining a graph's properties ....................................................... 440
Using the General property page in the graph's Properties
view ............................................................................... 440
Sorting data for series and categories................................... 442
Specifying text properties for titles, labels, axes, and
legends........................................................................... 442
Specifying overlap and spacing............................................. 445
Specifying axis properties ..................................................... 446
Specifying a pointer............................................................... 448
PART 3 APPENDIXES
APPENDIX A Identifiers ................................ ....... ...... ....... ...... ...... ....... .............. 451
Rules............................................................................................ 451
Reserved words ........................................................................... 452
xii
DataWindow .NET
Contents
APPENDIX B The Extended Attribute System Tables .................................... 453
About the extended attribute system tables................................. 453
The extended attribute system tables.......................................... 454
Edit style types for the PBCatEdt table........................................ 457
CheckBox edit style (code 85)............................................... 457
RadioButton edit style (code 86)........................................... 458
DropDownListBox edit style (code 87).................................. 459
DropDownDataWindow edit style (code 88).......................... 460
Edit edit style (code 89)......................................................... 461
Edit Mask edit style (code 90)............................................... 463
APPENDIX C St arting DataWindow Designer from the Command Line....... 465
Starting DataWindow Designer from the command line .............. 465
Index ........................................................................................................................................... 467
DataWindow Designer User’s Guide xiii
Contents
xiv
DataWindow .NET

About This Book

Audience
How to use this book
Related documents
Other sources of information
This book is written for programm ers who need to design Data W indow® objects. DataW indow objects are us ed to retrieve, present , and manipulate data from a relational database or other source. You can use the DataWindow objects that you build in DataWindow Designer to create applications for the Microsoft .NET Framework using Sybase DataWindow .NET™.
This book guides you throug h the process of using Dat aWind ow Designer to create DataWindow objects.
For information on using DataWindow objects with the Microsoft .NET Framework, see the DataWindow .NET Programmer's Gui de.
For a complete list of books and online documentation, see the preface in the DataWindow .NET Programmer's Guide.
Use the Sybase Getting Started CD, the SyBooks CD, and the Sybase Product Manuals Web site to learn more about your product:
The Getting Started CD contains release bulletins and installation
guides in PDF format, and may also contain other documents or
updated information no t in cluded o n t he SyBooks CD. It is included
with your software. To read or print documents on the Getting Started
CD, you need Adobe Acrobat Reader, which you can do wnload at no
charge from the Adobe Web site using a link provided on the CD.
The SyBooks CD contains product manuals and is included with your
software. The Eclipse-based SyBooks browser allows you to access
the manuals in an easy-to-use, HTML-based format.
Some documentation may be provided in PDF format, which you can
access through the PDF directory on the SyBooks CD. To read or
print the PDF files, you need Adobe Acrobat Reader.
Refer to the SyBooks Installation Guide on the Getting Started CD, or
the README.txt file on the SyBooks CD for instructions on installing
and starting SyBooks.
DataWindow Desi gne r User’s Guide xv
The Sybase Product Manuals W eb site is an online version of t he SyBooks CD that you can access using a standard Web browser. In addition to product manuals, you will find links to EBFs/Maintenance, Technical Documents, Case Management, Solved Cases, newsgroups, and the Sybase Developer Network.
Sybase EBFs and software maintenance
T o access the Sybase Pro duct Manuals Web site, go to
http://www.sybase.com/support/manuals/
Finding the latest information on EBFs and software maintenance
.
Product Manuals at
1 Point your Web browser to the Sybase Support Page at
http://www.sybase.com/support
.
2 Select EBFs/Maintenance. If prompted, enter your MySybas e user name
and password.
3 Select a product. 4 Specify a time frame and click Go. A list of EBF/Maintenance releases is
displayed. Padlock icons indicate that you do not have download authorization for
certain EBF/Maintenance releases because you are not registered as a Technical Support Contact. If you have not registered, but have valid information provided by your Sybase representative or through your support contract, click Edit Roles to add the “T ec hnical Support Contact” role to your MySybase profile.
5 Click the Info icon to display the EBF/Maintenance report, or click the
product description to download the software.
If you need help
Each Sybase installati on that has purchased a su pport contract ha s one or more designated people who are authorized to contact Sybase Technical Support. If you cannot resolve a problem us ing the manuals or online help, pleas e have the designated person contact Sybase Technical Support or the Sybase subsidiary in your area.
xvi DataWindow .NET
PART 1 The Dat aWindow Designer
Environment
This part introduces you to DataWindow Designer and describes how to work in and manage its environment. It also describes how to work with databases, tables, views, and extended attributes.
CHAPTER 1
Working with DataWindow Designer
About this chapter
Contents
This chapter describes the basics of working w ith DataWindow Designer and its painters.
Topic Page
About DataWindow Designer 4 The DataWindow Designer environment 4 Working with projects 6 Working with DataWindow objects 7 Working in painters 10 Working with tools 17 Setting properties 20 Using toolbars 21 Using online Help 29 Customizing keyboard shortcuts 30 Changing fonts 31 How your DataWindow Designer environment is managed 32
DataWindow Desi gne r User’s Guide 3

About DataWindow Designer

About DataWindow Designer
DataWindow Designer is a tool that creates DataWindow objects for use in applications. A DataWindow object is an object that you use to retrieve and manipulate data from a relati onal database or other data sou rce. The following DataWindow object retrieves and updates employee data.
DataWindow Designer provides built-in connectivity to a broad range of desktop and server-based databases. It includes the EAS Demo DB (a Sybase Adaptive Server® Anywhere database) to create reports and other DataWindow Designer objects.
When you work in DataWindow Designer, you work in a graphical environment—and working with data in this environment means you do not need to understand SQL, the standard programming language for talking to databases. DataWindow Des igner creates all SQL statements behind the scene s as you build your DataWindow objects and other objects graphically.
Painters
In DataWindow Designer, you do most of your work in the DataWindow painter, where you “paint” your DataWindow objects. DataWindow Designer also has painters where you work with databases, libraries, and SQL statements.

The DataWindow Designer environment

When you start DataWindow Desi gner the first time
4 DataWindow .NET
In DataWindow Designer, you always work within the context of a DataWindo w pr oject. Infor mation abou t the proj ect is s tored in a tex t file with the extension .dwp. The DataWindow objects you create are stored in binary files called libraries. Library files have the extension .pbl.
To create a new project and a library to hold your DataWindow obje cts, click the New button on the PowerBar and select Project from the Project tab page.
CHAPTER 1 Working with DataWindow Designer
If you have used DataWindow Design er before
When DataWindow Designer starts
You can open an existing project by selecting Open Project or Recent Projects from the File menu, or Open Project from the pop-up menu in the System Tree.
When DataWindow Designer starts, it opens in a window that contains the System Tree on the left, a menu bar at the top, and the PowerBar below the menu bar. The following figure shows an open project in the System Tree:
You can create new objects, open existing objects, change libraries, access the database, and perform other tasks by usi ng pop- up men us in the Sys t em Tree, menus on the menu bar, or buttons in the PowerBar.

About the PowerBar

What it is
DataWindow Desi gne r User’s Guide 5
From the PowerBar you can create new projects and objects and open existing objects. You can display text on each button to help you identify them, as shown in the following illustration:

Working with projects

Buttons on the PowerBar
Customizing the PowerBar
About PowerTips
From left to right on the PowerBar, here are the buttons and what you can do after you click a button:
This PowerBar button Lets you do this
New Create new projects and DataWindow objects and open tools Open Open existing objects Preview Preview DataWindow objects System Tr e e Show or hide the Syst em Tree To-Do List Keep track of object creation tasks and use links to quickly get
you to the place where you co mplete the tasks Library Manage your libraries using the Li br ary painter DB Profile Define and use named sets of parameters to connect to a
particular database Database Maintain databases and database tables, control user access to
databases, and manipulate data in database s using the Database
painter File Editor Edit text files Exit Close DataWindow Designer
You can customize the PowerBar. For example, you can move it to different locations and add buttons for operations you perform frequently. For more information, see “Using toolbars” on page 21.
In the PowerBar, when you leave the mouse pointer over a button for a second or two, DataW indow Designer di splays a b rief descript ion of the b utton, calle d a PowerTip. PowerTips display in DataWindow Designer wherever there are toolbar buttons.
Working with projects
You can create a new project, add existing libraries to a project’s library list, create a new library , and open a dif ferent project to work on objects in a library in that project. The libraries in your current library list display in the System Tree. You can open the DataWind ow objects in any library on your current list.
6 DataWindow .NET
CHAPTER 1 Working with DataWindow Designer
To create a new project:
1 Click the New button in the PowerBar, or select File>New from the menu
bar.
2 On the Project page in the New dialog box, select the project icon and click
OK.
3 Browse to the location where you want to store the project and type a name
for the project.
4 Do the same for the library, or simply click Finish to create the library in
the same folder as the project and with the same name.
To add existing libraries to a project:
1 Right-click the project icon in the System Tree and select Properties. 2 Click the Browse button to navigate to the folder where the libraries
reside.
3 Select one or more libraries, click Open, then click OK in the Library List
dialog box.
To create a new library:
1 Right-click the project icon in the System Tree and select New Library. 2 Browse to the location where you want to create the library, type a name
for the library, and click OK.
To open a different project:
Right-click the project icon in the System Tree and select Open Project, or select File>Open Project from the File menu.

Working with DataWindow objects

In DataWindow Desig ner, you can:
Create new DataWindow objects
Open existing DataWindow objects
Run or preview DataWindow objects
After you create or open a DataWindow object, it displays in the DataW indow painter and you work on it there.
DataWindow Desi gne r User’s Guide 7
Working with DataWindow objects

Creating new DataWindow objects

To create new DataWindow objects, use the New button in the PowerBar.
T o cr ea te a new object :
1 Click the New button in the PowerBar, or select File>New from the menu
bar. 2 In the New dialog box, select the DataWindow tab page. 3 Select an icon and click OK.
The DataWindow wizard helps you create a new DataWindo w object. For
more information about using the wizard, see Chapter 4, “Defining
DataWindow Objects.”

Opening existing DataWindow objects

There are several ways to open existing objects. The quickest way is to double-click its icon in the System Tree, or select it from the list of recent objects on the File menu. The recent objects list includes the eight most recently opened objects, but you can include up to 36 objects on the list.
To modify the number of recent objects:
1 Select Tools>System Options from the menu bar. 2 In the System Optio ns di al og bo x (G en eral t ab p a ge), modify the number
for the recent objects list. You can also use the Open button in the PowerBar to open a DataWindow
object. The DataWindow object must be in a library on your current library list.
To open existing objects:
1 Click the Open button in the PowerBar, or select File>Open from the menu
bar.
8 DataWindow .NET
CHAPTER 1 Working with DataWindow Designer
2 In the Open dialog box, select one or more libraries in the Libr ary pane and
then select the object you want to open.
3 Click OK.
The object opens in the DataWindow painter.

Running or previewing DataWindow objects

To preview a DataWindow object, use the Preview button in the PowerBar.
To run or preview an object:
1 Click the Preview button in the PowerBar, or select File>Run/Preview
from the menu bar.
2 In the Run/Preview dialog box, select one or more libraries in the Library
pane and then select the DataWindow object you want to preview.
3 Click OK.
The DataWindow object displays in DataWindow Preview mode. This mode has a Painterbar from which you can sort, filter, import, and retrieve rows, insert and delete rows, get information on row activity, and zoom in and out. To return to the DataWindow painter, click the X in the Painterbar .
DataWindow Desi gne r User’s Guide 9

Working in painters

Working in painters
The DataWindow Designer painters are listed in Table 1-1.
Table 1-1: DataWindow Designer painters
Painter What you do
Database painter Maintain databases, control user access to databases, manipulate
DataWindow painter
Library painter Manage libraries Query painter Graphically define and save SQL
Select painter Graphically define SQL SELECT s t at ements for DataWindow

Using views in painters

Most of the DataW i ndow Des igner painter s have views. Each vi ew provides a specific way of viewing or modifying the object you are working on or a specific kind of information related to that object. Having all the views available in a painter window means you can work on more than one task at a time.
data in databases, and create tables Build intelligent objects called DataW indow objects that pres ent
information from the database
SELECT statements for reuse
with DataWindow objects
objects
View s are displayed i n panes in the painter window . Some views are stacked in a single pane. At the bottom of the pane there is a tab fo r each view in the stack. Clicking the tab for a view pops that view to the top of the stack.
Each painter has a default l ayout , but you can disp lay the vi ews you choose in as many panes as you want to and save the layouts you like to work with. For some painters, all available views are included in the default layout; for others, only a few views are included.
Each pane has:
A title bar you can display temporarily or permanently
A handle in the top-left corner you can use to drag the pane to a new
location
Splitter bars between the pane and each adjacent pane
10 DataWindow .NET
Displaying the title 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.
To display a title bar:
1 Place the pointer on the splitter bar at the top of the pane.
2 To display the title bar permanently , click the pushpin at the left of the title
After you display a title bar either temporarily or permanently, you can use the
title bar’s pop-up menu.
To maximize a pane to fill the workspace:
Select Maximize from the title bar’s pop-up menu or click the Maximize
CHAPTER 1 Working with DataWindow Designer
The title bar displays.
bar or select Pinned from its pop-up menu. Click the pushpin ag ain or select Pinn ed again on the p op-up menu to hi de
the title bar.
button on the title bar.
To restore a pane to its original size:
Select Restore from the title bar’ s pop-up menu or click the Restore bu tton on the title bar.
Moving and resizing panes and views
You can move a pane or a view to any location in the painter window. You might find it takes a while to get used to moving pan es and views aroun d, bu t if you do not like a layou t, you can alway s revert to th e default lay out and start again. To restore the default layout, select View>Layouts>Default.
To move a pane, you select and drag the title bar of the view that is at the top of the stack. If the pane contains stacked views, all views in the stack move together. To move one of the views out of the stack, you drag the tab for the view you want to move.
To move a pane:
1 Place the pointer anywhere on the title bar of the view at the top of the
stack, hold down the left mouse button, and start moving the pane.
DataWindow Desi gne r User’s Guide 11
Working in painters
A gray outline appears in the pane:
2 Drag the outline to the new location.
The outline changes size as you drag it. When the pointer is over the middle of a pane, the outline fills the pane. As you drag the pointer toward any border, the outline becomes a narro w rectangle adjacent to that border . When the pointer is over a splitter bar between two panes, rows, or columns, the outline straddles the splitter bar:
When you move the pointer to a corner
When you move the pointer to a corner, you will find that you have many places where you can drop the outline. To see your options, move the pointer around in all directions in the corner and see where the outline displays as you move it.
3 Release the mouse button to drop the outline in the new location:
To move a pane here Drop the outline here
Between two panes On the splitter bar between the panes Between a border and a pane At the side of the pane nearest the b order Into a new row On the splitter bar between two rows or at the
top or bottom of the painter window
Into a new column On the splitter ba r be tween two c olumns or at
the left or right edge of the painte r window
Onto a stack of panes On the middle of the pan e (if th e pane was no t
already tabbed, tabs are created)
12 DataWindow .NET
To move a view in a stacked pane:
Place the pointer anywhere on the view’s tab, hold down the left mouse button, and start moving the view.
You can now move the view as in the previous procedure. If you want to rearrange the views in a pane, you can drag the view to the left or right within the same pane.
To resize a pane:
Drag the splitter bars between panes.
Floating and docking views
Panes are docked by default within a painter window, but some tasks may be easier if you float a pane. A floating pane can be moved outside the painter’s window or even outside the DataWindow Designer window.
When you open another painter
If you have a floating pane in a painter and then open another painter, the floating pane temporarily disap pears . It reap pears when the o riginal painter is selected.
CHAPTER 1 Working with DataWindow Designer
To float a view in its own pane:
Select Float from the title bar’s pop-up menu.
To float a view in a stacked pane:
Select Float from the tab’s pop-up menu.
To dock a floating view:
Select Dock from the title bar’s pop-up menu.
Adding and removing views
Y ou may want to add additional views to the painter window . If there are some views you rarely use, you ca n move them into a stacked p ane or r emove them. When removing a view in a stacked pane, make s ure you remove th e view and not the pan e .
DataWindow Desi gne r User’s Guide 13
Working in painters
To add a new view to the painter window:
1 Select View from the menu bar and then select the view you want to add.
The view displays in a new pane in a new row.
2 Move the pane where you want it.
For how to move panes, see “Moving and resizing panes and views” on page 11.
To remove a view in its own pane from the painter window:
1 If the view’s title bar is not displayed, display it by placing the pointer on
the splitter bar at the top of the pane.
2 Click the Close button on the title bar.
To remove a view in a stacked pane from the painter window:
Select the tab for the view and select Close from its pop-up menu.
To remove a stacked pane from the painter window:
1 If the title bar of the top view in the stack is not displayed, display it by
placing the pointer on the splitter bar at the top of the pane.
2 Click the Close button on the title bar.
Saving a layout
When you have rearranged panes in the painter window, DataWindow Designer saves the layout in the registry. The next time you open the painter window , your last l ayout displays. Y ou can also save customized layo uts so that you can switch from one to another for different kinds of activities.
To save customized layouts for a painter window:
1 Select View>Layouts>Manage from the menu bar.
14 DataWindow .NET
Loading...
+ 470 hidden pages