APPENDIX The .NET Compact Framework

Adapted from Larry Roof's forthcomingApress book, The Definitive Guide to the .NETCompact Framework (ISBN 1-59059-095-3).

MicRosoFr DEVEWPED the .NET Compact Framework (.NET CF) with one intention in mind: to build applications. By applications, I do not mean drivers, COM components, ActiveX controls, or Today screen plug-ins. I am talking about applications that display, gather, process, and forward information-those appli• cations that give users a reason to carry a device. While they typically will have an interface, they do not have to have one. The data that they are working with might be local, remote, or some combination of the two. The .NET Compact Framework simplifies application development on smart devices. Presently this includes the Pocket PC, Pocket PC 2002, Pocket PC Phone Edition, Smartphone, and other devices running Windows CE .NET 4.1 or later.

NOTE Currently you cannot use the .NET Compact Frame• work to develop applications that target the SmartPhone. There will be a Smartphone development kit (SDK) released later. This SDK will install on top ofVisual Studio .NET and will include a Smartphone emulator.

You will need Visual Studio .NET 2003 to build applications that target the .NET Compact Framework. You can build applications using either Visual C# .NET, .NET, or both. The .NET Compact Framework has two main components: the common lan• guage runtime, or CLR, and the .NET Compact Framework class library. The CLR is the foundation of the .NET Compact Framework. It is responsible for managing code at execution time, providing core services such as memory management and thread management while enforcing code safety and accuracy.

627 Appendix

Code that targets the runtime is known as managed code; code that does not target the runtime, as is the case with eMbedded Visual C++, is known as unmanaged, or native, code. The .NET Compact Framework class library is a collection of reusable classes that you can use to quickly and easily develop applications. This framework was designed with porting in mind, whether to or other third-party plat• forms. What does this mean to you? Simply that the coding techniques and the applications you create today to run on a Pocket PC could run on other plat• forms, such as a cell phone or another vendor's PDA, if a version of the .NET Compact Framework was created for that platform.

Common Language Runtime

The common language runtime provides a code-execution environment that manages code targeting the .NET Framework. Code management can take the form of memory management, thread management, security management, code verification and compilation, and other system services. The CLR is designed to enhance performance. It makes use of Just-In-Time (TIT) compiling, which enables managed code to run in the native machine lan• guage of your application's platform. This allows you to create applications that can target a variety of platforms and not have to worry about recompiling or gen• erating executables that target each specific platform. Even though your mobile application is written in VB .NET or C# .NET, and as such is managed code, you are still able to incorporate functions and subrou• tines stored externally in dynamic link libraries (DLLs), including the Windows CE . The .NET Compact Framework provides the data types and support for structures to allow you to easily incorporate functions from the Wmdows CE APis into your application.

• NET Compact Framework Class Library

The .NET Compact Framework class library is a collection of reusable classes that tightly integrate with the common language runtime. Your applications leverage these libraries to derive functionality. As you would expect from an object-oriented class library, the .NET Compact Framework types enable you to accomplish a range of common programming tasks, including tasks such as interface design, leveraging XML, database access, thread management, and file 110. The following sections describe the common functionality available through .NETCE

628 The .NET Compact Framework

Form-Related Classes

The .NET Compact Framework implements a subset of the System.Windows.Forms and System.Drawing classes, which allow you to con• struct rich Wmdows CE-based user interfaces for your device applications. The Form Designer within Visual Studio .NET manages much of the interaction with these classes for you. The implementation ofWmForms under the .NET Compact Framework includes support for forms, most controls found in the .NET Framework, hosting of third-party controls, bitmaps, and menus. Table A-I lists the controls included with the .NET Compact Framework.

Table A-1. Controls Included with the .NET Compact Framework

CONTROL DESCRIPTION Button Simple command button CheckBox Common check box ComboBox Drop-down list of times ContextMenu Context-sensitive menu for association with another object DataGrid Grid that can be bound to a data source DomainUpDown List of items that the user can navigate using scroll bars HScrollBar Horizontal scroll bar lmageList Container used to store images, which in turn will be used with other controls such as the ToolBar, ListView, and Tree View

InputPanel Controls the Soft Input Panel (SIP) on Wmdows CE devices Label Simple control that allows you to display text ListBox List of items from which the user can pick ListView Provides four views for displaying data: large icon, small icon, list, and details MainMenu Menu with a form NumericUpDown Numeric input field that allows both manual entry as well as scroll bars

OpenFileDialog Interfaces with the standard Wmdows CE open file dialog box Panel Container used to hold other controls PictureBox Used to display images of a variety of formats (continued)

629 Appendix

Table A-1. Controls Included with the .NET Compact Framework (Continued) CONTROL DESCRIPTION ProgressBar VISual indicator of a task's progress Radio Button Common radio button SaveFileDialog Interfaces with the standard Wmdows CE save file dialog box StatusBar Simple panel for displaying text TabControl Tabbed interface for an application TextBox Standard text input field Timer Basic timing component ToolBar Implements a toolbar on a form TrackBar Slider interface used with numeric data Tree View Presents data in a hierarchical layout VScrollBar Vertical scroll bar

Like everything that is part of the .NET Compact Framework, tile controls included with .NET CF have limited functionality. They are missing properties, methods, and events found in their .NET Framework counterparts. A little coding can correct these shortcomings. That is because .NET CF allows you to create your own controls by inheriting from the base control class. From this foun• dation, you can add your own properties, methods, and events to create just the control you need.

Data and XML Classes

The .NET Compact Framework includes a set of classes that allow you to easily incorporate data, whether it is from a relational or nonrelational data source, and XML content into your mobile applications. These classes are defined under the System.Data and System.Xml namespaces. The implementation of both data and XML classes under .NET CF is a subset of those found in the .NET Framework.

Web Services

The .NET Framework is much about Web services. In the .NET Compact Frame• work System.Web namespace, you have a scaled-down version of the capabilities

630 The .NET Compact Framework and functionality offered in the corresponding .NET Framework namespace. Most significantly, you can create Web service clients, but you cannot host Web services under the .NET Compact Framework. These Web service clients can be either synchronous or asynchronous. Creat• ing a Web service client that targets the .NET Compact Framework is easy. The Visual Studio .NET IDE does much of the work for you.

GDI Support

The .NET Compact Framework provides support for the GDI drawing elements including bitmaps, brushes, fonts, icons, and pens through the System.Drawing namespace.

Base Classes

The .NET Compact Framework provides a robust set of base classes that expose a wide range of functionality for use by developers. This underlying infrastructure enables you to write rich .NET applications, including being able to create multi• threaded applications {System. Threading), leveraging networking resources {System.Net), and working with files {System.IO).

IrDA Support

Wmdows CE devices, such as the Pocket PC and Pocket PC 2002, include infrared {IR) communication capabilities. In support of this, the .NET Compact Frame• work includes classes that allow you to leverage IR communication from within your application. These classes are part of the System.Net.IrDA namespace. You can use IR to communicate to Pocket PCs, printers, and other IR-enabled devices.

Bluetooth Support

The .NET Compact Framework does not natively provide support for Bluetooth. You can access most third-party Pocket PC implementations of Bluetooth via either serial port communications or a provider's API.

631 Appendix

Visual Basic Support

Visual Basic .NET makes liberal use of helper functions that are located in a VB Helper library. The .NET Compact Framework includes a subset of these functions as well. These functions are considered by VB developers to be a core part of the language, which is the reason for their inclusion. Ifyou are an existing Visual Basic or eMbedded Visual Basic developer convert• ing over to .NET CF, what this means is that many of the VB language functions you are used to working with will be available to you in Visual Basic .NET.

A La Carte Features

To conserve resources on the target device, Microsoft divided the .NET Compact Framework into logical components. By delivering components as separate DLLs, or, as they are referred to within the .NET Compact Framework, assem• blies, Microsoft gives you the option of picking and choosing the features you need, and only those features that your target device has the space to hold. An example of this is the System.SR assembly, which contains error message strings. Including this j;lssembly with your application allows access to detailed descriptions of any errors encountered, which is certainly helpful during a debugging session, but infrequently needed in an application once it is released to production. Excluding this assembly does not affect the performance or func• tionality of your application; it simply means you will not have access to detailed error messages. Another example of the .NET CF a Ia carte approach is the SQL Server CE components, delivered in a set ofDLLs totaling slightly over 1MB in size. Unless you explicitly add a reference to the System.Data.SqlServerCe assemblies, these DLLs will not be included with your application.

Features Missing from the .NET Compact Framework

Some serious trimming had to be made to the .NET Framework so that it could fit into the operating constraints ofWmdows CE. The most notable .NET Frame• work features that did not make it into the .NET Compact Framework are the subject of this section.

632 The .NET Compact Framework

Method Overloads

Overloading a method provides alternative ways to call that method. It also increases the size of a framework. Because of this, the .NET Compact Framework trimmed the overloads from almost all methods. What this means to you is twofold. First, there is a good chance that a partic• ular method overload you used with a desktop application will not be available under .NET CR Second, when you read the documentation, pay close attention to whether or not a method is supported by .NET CR

Missing Controls

A number of .NET controls did not make their way into the .NET Compact Framework. The absence of most of these controls is insignificant to mobile developers. Since printing has such a limited role in mobile applications, remov• ing the whole family of print-related controls is not an issue. That takes care of the CrystalReportViewer, PageSetupDialog, PrintDialog, PrintDocument, PrintPreviewControl, and PrintPreviewDialog controls. You can replace many of the missing dialog boxes with your own or by accessing system dialog boxes directly using the Wmdows CE API.

XML Functionality

As much as the .NET Compact Framework offers in the way ofXML, an equal amount of functionality was trimmed. The key missing XML-related component is the System.Xml.XPath namespace. The XPath namespace made XML parsing far easier than the methods offered under .NET CR In its absence, you can use a combination of recursive and iterative searches against the Document Object Model (DOM). The .NET Compact Framework is missing another key XML component, Extensible Stylesheet Language Transformation, or XSLT. With XSLT, you can con• vert an XML document into different formats. On an XML-related note, .NET CF does not provide support for developing device-based Web services.

633 Appendix

Database Support

While the .NET Compact Framework offers a robust set of data-related tools, it is not without shortcomings. Support is provided for a single database, SQL Server CE. The .NET Compact Framework does not provide support for Pocket Access databases or other third-party device-based databases. On the server side, the .NET Compact Framework provides support for only SQL Server. The key missing namespace is System.Data.OleDb.

Binary Serialization

Both the BinaryFormatter and SoapFormatter classes are absent from the .NET Compact Framework, severely limiting serializing and deserializing objects.

Access to the Windows Registry

The .NET Framework has the Microsoft.Wm32.Registry namespace, which makes it easy to work with the Wmdows registry from an application. Obviously, this namespace was not included in .NET CF, as it has to do with Wm32, not Wmdows CE. Unfortunately, no Wmdows CE equivalent of this namespace was included in .NET CE As a result, you are forced to turn to the Wmdows API if your application requires access to the Wmdows CE registry.

Leveraging COM Components

The absence of the COM interop is one of the most debated limitations of the .NET Compact Framework. This is particularly true for developers who are switching over from eMbedded Visual Basic, where they were accustom to lever• aging COM objects, including ActiveX controls, to extend their development capabilities. Incorporating COM objects into a .NET CF application is a two-step process. First, you must write an unmanaged (that is to say, eMbedded Visual C++) DLL wrapper that exposes the COM object. Depending upon the complexity of the COM object, this may be anything from a simple to extremely complicated pro• cess. Second, you must use Plnvoke to access your DLL wrapper. Luckily, the development community has already begun work on accessing the more com• monly used COM components, several of which are included in the references at the end of this appendix.

634 The .NET Compact Framework

Security

The .NET Compact Framework does not secure access to unmanaged code. Any application can call any system or nonsystem API. There is no role-based security with the .NET Compact Framework. The principal object has no understanding of known identity or known role.

Web Services

The most notable exclusion from the .NET Compact Framework Web service capabilities is the inability to use cookies. Cookies are widely used to maintain state on the server between calls from a client. While the use of cookies in Web services is not as prevalent as their use on Web sites, they are still in use. The .NET Compact Framework offers limited cryptographic abilities in respect to Web services.

Printing

The .NET Compact Framework provides no support for printing. There is no easy way to interact with either network printers or external printers via IR. The workaround for accessing network printers is to build a server-based application that accepts and prints jobs submitted by your mobile application. You can send output through theIR port directly to IR-enabled printers. You use the System.Net.IrDA namespace to access theIR port of your device. The dif• ficult part is that your application needs to control everything sent to the printer, including any control characters that the printer supports.

GDI+

Wmdows CE natively does not support GDI+, so GDI+-related functionality was removed from .NET Compact Framework.

Remoting

Remoting, that wonderful feature of the .NET Framework that allows you to eas• ily build distributed applications, is, sad to say, missing from the .NET Compact Framework. Now, one could make the case that mobile applications are ideal candidates for remoting. To make matters worse, there is not a good way to code around this limitation.

635 Appendix

Additional Resources

Following is a list of resources for further information on .NET CF:

• Larry Roof's MSDN Magazine article "Develop Handheld Apps for the .NET Compact Framework with Visual Studio .NET" at http: I /msdn. microsoft. com/msdnmag/issues/02/03/NETCF/default.aspx

• Larry Roof's "Smart Device Extensions, SQL Server CE, and Me" at http://msdn.microsoft.com/library/default.asp?url=/library/ en-us/dnroad/html/road05222002.asp

• John Kennedy's "Taking Control with C#" at http: I /msdn. microsoft. com/ library/default.asp?url=llibrary/en-us/dnroad/html/road01082003.asp (and other "Two for the Road" columns at MSDN Online)

• Microsoft Newsgroups:

microsoft.public.dotnet.framework.compactframework

microsoft.public.dotnet.framework.aspnet.mobile

microsoft.public.in.dotnet.compactframework

microsoft.public.smartphone.developer

microsoft.public.pocketpc.developer

microsoft. public. pocketpc (and lots of others such as microsoft.public.pocketpc.wireless)

Focus on SQL Server CE 2.0

Microsoft SQL Server CE 2.0 is downloadable from http: I /'tMW. microsoft. com/ sql/ eel downloads/20readme. asp. (Free registration is required-the download is 47.6MB.) Note that it requires Windows XP or 2000 or higher for development. More specifically, you need

• An liS system running under NT4/SP5 or later orWmdows 2000 to do an RDA or replication

• Wmdows 2000 or Wmdows XP for the development system

636 The .NET Compact Framework

• AWmdows CE-based device runningWmdows CE 4.1 for deployment (though you can develop and test apps using the emulators that are included both in Microsoft's free eMbedded Visual Tools 3.0 or the not free Visual Studio .NET and the .NET Compact Framework)

For unmanaged (native) applications (which can run on Pocket PC 2000, Pocket PC 2002, Pocket PC Phone Edition, Handheld PC 2000 [HP/C 2000], and certain other embedded devices that use Windows CE 4.1), you'll use Microsoft eMbedded Visual Tools 3.0 installed with at least one of the following software development kits: Palm-size PC SDK, Handheld PC Pro SDK, or Pocket PC SDK for native (unmanaged) application development. To create Microsoft .NET Compact Framework (managed) applications (which can run on Pocket PC 2000, Pocket PC 2002, Pocket PC Phone Edition, and certain other embedded devices that use Wmdows CE 4.1), you'll need Visual Studio .NET and the .NET Compact Framework (ideally, the just-released 1.1 "Everett" edition). Both development environments have emulators in case you don't have a physical device running CE 4.1. Side-by-side installations of this release ofSQL Server CE 2.0 with earlier versions of SQL Server CE are supported. Download the documentation from http: I /www. microsoft. com/ sql/ ce/techinfo/20bol.asp. Ifyou use SQL Server CE, you must update the server replication compo• nents on servers running Internet Information Services (liS) when you install SQL Server 2000 Service Pack 2 (SP2). Download this package to make sure your operating environment is up to date. SQL Server CE 2.0 Readme (http: I I support. microsoft. com/default. aspx?scid=kb;en-us;Q327957) describes additional info that didn't make it into the SQL Server CE 2.0 documentation. For example, Pocket PC 2000 Service Packl (http://support.microsoft.com/defau1t.aspx?scid=http://www. microsoft.com/mobile/pocketpc/downloads/servicepackl.asporhttp:// www.compaq.com/support/files/handhelds/us/download/9820.htmlforiPAQ users) is required for Integrated Security.

637 Index

Special Characters event firing, grouping, and summary : [colon), 469 fields, 288-89 {} (curly braces), 469 exporting data, 302-4 <%%>(delimiters), 271 free-form text reports, 297-300 %(percent sign), 76, 184 HTTP handlers, 499 "" (quotes), 470 labels, 294-97 ; (semicolon), 470 licensing, 291 " (single quotes), 25 MemoryStream objects, 499-500 page and print settings, 287-88 A Runtime Designer control, 304-5 Access, 335-66 standard columnar reports, 291-94 calling reports from Visual Basic or subreports, 300 VBA,354-56 text box padding, 285 changing report data sources, 351 Viewer control, 290 converting reports, to ActiveReports Web reports, 497-500 for .NET, 285-86 WebViewer control, 497-99 converting reports, to ActiveReports ActiveReports for VB6, 235-80 forVB6, 237-38 components and versions, 235-36 creating PDF reports, 363-64 converting Access and Crystal creating reports, 335-45 Reports reports, 237-38 crosstab reports, 391-92 creating reports, 236-37, 256-68 Distiller printer driver, 363-64 crosstab reports, 404-11 for Pocket PC, 600 data connections, 238-42 report events, 346-48 drill-down feature, 273-74 report events within report sections, eventfiringsequence,246-47 348-50 exporting data, 276-79 report filters, 351-52 free-form text reports, 265-68 reporting concepts, 364-66 grouping and summary fields, 24 7-52 ReportML,356-63 Knowledge Base, 237 report sections, 345-46 labels, 260-64 report snapshots, 363 licensing,235,237,280 report sort orders, 352-53 page and print settings, 242-46 subreport controls, 345 Property List control, 255-56 T-SQL,22 Runtime Designer control, 280 using same report for summary and shading and graphics, 274-75 detail data, 353-54 SpreadBuilder object, 277-79, 333 Acrobat. See Adobe Acrobat standard columnar reports, 256-60 activePDF, 384 subreports, 268-71 ActiveReports for .NET, 281-305 table of contents, 252-54 bookmarks (table of contents), unbound reports, 271-73 289-90 Viewer control, 254-55 converting Access and Crystal Web reports, 490-97 Reports reports, 285-86 Active Server Pages. See ASP (Active creating reports, 283-85, 291-300 Server Pages) crosstab reports, 411-18 ActiveXAutomation, 111,113,307 data connections, 286-87 ActiveX controls, 441-42,490 development environment, 281-82 ActiveX DLL/EXE reports, 485-89 drill-down feature, 300-302 Active XL ReportPro, 333-34

639 Index

ADO (ActiveX Data Objects), 63--69. See Command classes, 595-98 also database access; ADO Connection classes, 592-95 MD technologies DataReader classes, 598--600 ActiveReports and, 238-39 features, 589 ADO.NET vs., 68-69 (see also gathering data, 603-4 ADO. NET) Pocket Access and, 600 Command objects, 64--65 SQL Server CE provider, 591-92 Connection objects, 63--64 SQL Server provider, 590-91 Crystal Reports 9 and, 125 System.Data namespace, 590-92 passing Recordsets to Crystal Reports Advanced Transact-SQLfor SQL Server 9,140-48 2000,63 Recordset objects, 66--68 aesthetics, report, 3-5, 12 Adobe Acrobat, 377-84 aggregate functions, SQL, 40-43 Access PDF reports, 363-64 AS clause and, 40-41 alternatives, 384 AVG,43 books,384 COUNT,41-42 converting existing documents, MIN and MAX, 43 378-81 mixing,44 displaying documents in appli• restricting record access, 42 cations, 381-84 SUM,43 licensing, 377-78 aliases, table, 51,54 online Web document conversion, Analysis Services, SQL Server, 427, 381 428-29 PDF files and, 377-78 anchor tag , HTML, 477, 550-51 Reader, Writer, and Distiller, 377 AND operator, SQL, 32-33 Adobe Acrobat 5 PDF Bible, 384 ANSI SQL-92 join syntax, 55-56 Adobe Acrobat 5: The Professional User's Application objects, 310,335,354 Guide,384 applications Adobe Distiller, 363--64, 377, 378 client vs. server-based, for Web ADOCE,590 reports, 441-42 ADO MD technologies, 429-39 Crystal Enterprise licensing and connecting to OIAP databases with server-based, 525-26 VB6,436-39 desktop vs. Pocket PC, 602, 609, 613, connecting to OIAP databases with 620 VB .NET, 439-40 displaying documents in, 381-84 cubes as DataSets, 429 .NET Compact Framework, 627 MDP and TDP providers, 429-30 Palm (see Palm reporting) MDX (multidimensional Pocket PC (see Pocket PC reporting) .expressions), 430-36 sample (see sample applications) ADO. NET, 68-74. See also database ApressWeb site, 7, 104, 127, 142,202, access 209,232,277,367,397,476, ActiveReports for .NET and, 286-87 601,608,613,620 ADO vs., 68--69 (see also ADO (ActiveX APS (Automated Process Server), Crystal Data Objects)) Enterprise, 519-20 Command objects, 69-74 ARConsulting, 17-19 connecting to OIAP databases, 439-40 arrays Connection objects, 69 control, 78,81-82,94 DataReader objects, 72-74 VS-View array-based reports, for .NET Compact Framework (see 195-202,397-99 ADO.NET for .NET Compact ASCII file export Framework) Preview, 232 passing data to Crystal Reports for VS-View, 206 Visual Studio .NET, 154-56 Web services, 516-18 ADO.NET and ADO Examples and Best AS clauses, SQL, 29-30, 40-41 Practices for VB Programmers, ASMXfiles, 518 63 ASP (Active Server Pages). See also ADO.NET for .NET Compact ASP. NET Framework,589--600 ActiveX DLLs/EXEs and, 485-89 ADOCE vs., 590 COM components and, 485

640 Index

HTML reports, 473-81 (see also Internet Explorer as market standard, HTML (Hypertext Markup 446 (see also Internet Language) reports) Explorer) posting, 452-54 Palm,540,550,564 PQAs and, 566--69, 574 PocketiE,601-2,606 pros and cons of classic report deliv• ReportML files and, 357 ery,456-57 styles and, 468-69 ASP. NET unknown tags and, 472 criteria screens, 505-15 (see also cri• URL length limits, 443 teria screens, Web) DataGrid control reports, 500-505 c Web reports, 500-518 (see also Web calculated members, OLAP, 428 reports candidate keys, 47 Web services, 515-18 Cartesian joins, 50 attachments, e-mail disclaimer, cascading style sheets, 468-73 374-75 case, UPPER function and,38-39 attributes, XML, 358 case-sensitive naming, SQL, 25 audit trail tables, 2-3 Catalog object, OLAP, 438-39 Autolncrement properties, 47 CDATA (character data), XML, 358 Automated Process Server (APS), Crystal Certicom, 543 Enterprise, 519-20 Chart Wizard Automation Server, RDC, 112-16 Access, 336 AutoReport features, Access, 336 Excel,327 availability, report, 15-16 check boxes Avery labels, 184, 225 criteria screens and, 76 AVG function, SQL, 43 JavaScript, 446, 505-6 axis rowsets, OLAP, 430 VB6,88-89 checks,3 B CHILDREN keyword, MDX, 433-34 bandwidth, 564 class attribute, CSS, 470-71 Base64 encoding, 516-18 classes. See object models base classes, .NET Compact Framework, class library, .NET Compact Framework, 631 627,628-32 baud rate, Palm, 573 class wrappers, 78-81,94 BETWEEN clauses, SQL, 36-37 clients. See also servers binary serialization, .NET Compact client-side validation, 76 Framework, 634 Web Clipping and, 542-43 bins. See paper bins Web report applications, 441-42 Bluetooth support Clipper browser, Palm, 542, 550 .NET Compact Framework, 539, 631 code Palm,539 adding, to Pocket PC applications, Pocket PC, 619 586 bookmarks, ActiveReports for .NET, managed and unmanaged, 580 289-90 printing Pocket PC reports with, 607 books Code Centric: T-SQL Programming with Acrobat, 384 Stored Procedures and Excel, 334 Triggers, 62 Outlook, 370 Code Warrior, 539 SQL,62-63 Code window, 586 Word,322 collections, control, 95-96 borders, Preview, 219-22 colon(:), 469 bound reports, 238. See also data con• color, 12, 465, 560-61 nections; data sources COLSPAN command, 462-64 breakpoints, 589 columnar reports browsers Access, 336, 337 ActiveX controls and, 490 ActiveReports for .NET, 283-85, Crystal Reports RDC object, 112 291-94 fonts,464 ActiveReports forVB6, 236-37, HTML compatibility, 441-42 256--60

641 Index

columnar reports (Continued) ActiveReports for VB6 Runtime Crystal Reports 9, 122-26 Designer control, 280 HTML,457-58 ActiveReports for VB6 Viewer, 254-55 Preview, 212-14 ActiveX, 441-42, 490 VS-View, 160--65,178--80 ASP.NET DataGrid, 500-505 VS-View snaked column, 188-94 criteria screen, 75 VS-View variable length columns, Crystal Reports Embeddable 194-202 Designer Control, 135-37 Word, 310, 313 CrystalReportsViewer, 150-51 column concatenation, SQL, 29-30 device-specific, 581 combo boxes grid, 330-34 criteria screens, 75, 76 HTML,446 VB6,87-88 JavaScript, 446 COM components Java Viewer control, 490 ActiveX DLL/EXE reports, 485-89 .NET Compact Framework, 585, ADO MD technologies, 429-39 (see 629-30,633 also ADO MD technologies) RichEdit, 265-68 COM drivers and Crystal Reports, RichTextBox,297-300 145-48 VB6, 77-82 COM interop and, 429, 439, 634 VS-View, 202-4 .NET Compact Framework, 634 converting documents to PDF files, command line 378-81 running PQAs from, 556-57 converting reports specifying criteria for Report CE, 623 to ActiveReports for .NET, 285-86 Command objects to ActiveReports forVB6, 237-38 AD0,64-65 cookies ADO.NET, 69-74 .NET Compact Framework and, 635 ADO.NET for .NET Compact Web Clipping and, 544 Framework,595-98 Copilot, 537 comments,HTML,554 copyright, 15 common language runtime (CLR), .NET correlated subqueries, SQL, 57-58 Compact Framework, 627-28 COUNT function, SQL, 41-42 ComponentOne, Inc., 159, 184, 235, 580. criteria, report, 10-11 See also Preview for .NET; criteria pages, 2 VS-View for Visual Basic criteria screens, 75-107 compiling, Just-In-Time (JIT), 628 building SQL WHERE clauses, 89-94, Compressed Markup Language (CML), 102-6 564 data-driven programming, 77-82, concatenation, SQL column, 29-30 94-97 Connection objects. See also data con- user interface considerations, 75-76 nections VB6, 77-94 AD0,63-64 VB .NET, 94-106 ADO.NET,69 Web (see criteria screens, Web) ADO.NET for .NET Compact criteria screens, Web, 442-56 Framework,592-95 ASP.NET, 505-15 connection pooling, 63, 67 dynamic, 449-56 connections. See data connections Internet Explorer as market standard, constant values 446 ActiveReports, 250 JavaScript check boxes, 446 VS-View, 167-69,171,205 passing parameters, 442-45 controls SQL injection security, 444-45 Access report, 342-43 URL length limits, 443 Access subreport, 345 Web site help, 442 ActiveReports for .NET Runtime cross joins, 50 Designer, 304-5 Crosstab Query WIZard, 392 ActiveReports for .NET Viewer, 290 crosstab reports, 327, 385-423 ActiveReports for .NETWebViewer, Access, 391-92 497-99 ActiveReports for .NET, 411-18 ActiveReports for VB6 Property List, ActiveReports for VB6, 404-11 255-56 crosstab SQL, 385-96

642 Index

Crystal Reports, 419-23 exporting data, 153 dynamic date ranges, 406-7 integrating RPT reports, 149 Excel PivotTables and, 386-90 passing ADO.NET data directly to, Oracle, 395-96 154-56 printing, 396 passing parameters, 152 SQL Server 2000, 392-95 ReportDocument objects, 149-50 types of, 385-86 viewing reports, 150-51 VS-View/Preview, 396-404 CrystalReportsViewer controls, 150-51 zero-sum rows and columns, 396 cubes, OLAP Crystal Decisions, 109, 111, 519, 524-29, as DataSet objects, 429 580 dimensions and, 426-29 Crystal Enterprise 8.5, 519-24 curly braces ({}), 469 alternatives, 528-29 cursor position, VS-View, 172 Crystal Reports 9 and, 109, 519 (see cursors,firehose,66-67, 72 also Crystal Reports 9) licensing, 524-29 D report servers and, 526-28 data. See also database access nwnndngreports,519-23 connections (see data connections) scheduling reports, 523-24 data-driven programming (see data- server-based applications and, driven programming) 525-26 derived, 271 Web site, 442 exporting (see also exporting) Crystal Reports 8.5: The Complete external, 14 Reference, 529 multidimensional, 424-26 Crystal Reports 9, 109-57 .NET Compact Framework, 630 advanced dynamic report creation, parameters (see parameters) 127-35 XML (see XML (Extensible Markup cons, 110-11 Language)) converting reports to ActiveReports, DataAdapter objects, ADO.NET, 237-38,285-86 154-56 crosstab reports, 419-23 database access, 63-74. See also SQL Crystal Enterprise and, 109, 519 (see (Structured Query Language) also Crystal Enterprise 8.5) Access (see Access) Crystal Reports for Visual Studio .NET AD0,63-69 vs., 148 (see also Crystal ADO.NET, 68-74 Reports for Visual Studio ADO.NET for .NET Compact .NET) Framework,589-600,603-4 dynamic report creation, 120-27 Crystal Reports repository, 117-20 Embeddable Designer Control, .NET Compact Framework, 634 135-37 OLAP (seeOLAP (online analytical exporting data, 138-40 processing)) headers, 11 OLTP vs. OLAP, 423-24, 436 licensing,111,126-27,135,525,530 Oracle (seeOracle) object model, 111-12, 121-22 passing ADO.NET data to Crystal passing ADO recordsets directly to, Reports for Visual Studio 140-48 .NET, 154-56 pros,109-10 passing ADO Recordsets to Crystal ROC Automation Server, 112-16 Reports 9, 140-48 ReCrystallize Pro and, 529-33 restricting record access, 3, 42 report designers vs. RPT files, 112 SQL Server (see SQL Server 2000; SQL repository, 117-20 ServerCE) runtime,111 data connections. See also data sources Section Format event, 134-35 ActiveReports for .NET, 283-84, versions, 109 286-87,291-92 Web services, 518-19 ActiveReports for VB6, 238-42 Crystal Reports for Visual Studio .NET, AD0,63-64 148-56 ADO.NET,69 crosstab reports, 419-23 ADO.NET for .NET Framework, Crystal Reports 9 vs., 148 (see also 592-95 Crystal Reports 9) Crystal Reports 9, 125, 129-30

643 Index

data connections (Continued) detail data, Access report, 353-54 Crystal Reports crosstab report, 420 devices. See also drivers DataReader objects and, 72 Web Clipping device capabilities, pooling, 63-67 554-55 VB6, to OLAP databases, 436--39 device profiles, 581 VB .NET, to OLAP databases, 439-40 printers, 13, 619 (see also printer Data Control Language (DCL), 24, 62 selection) Data Definition Language (DDL), 24,62 smart, 580, 627 data-driven programming VS-Vievv Devices property, 172 VB6, 77-82 DHTML (dynamic HTML), 457 VB .NET, 94-97 dictionary prints, 12 Data Dynamics, 235,237, 256, 580. See dimensions, OLAP, 426--29 also ActiveReports for .NET; disclaimers ActiveReports forVB6 e-mail, 374-75 DataGrid control, 500-505 report, 15 paging, 505 disconnected DataSets, 72 reports, 500-503 Distiller printer driver, 363-64, 377, 378 sorting, 503-4 DISTINCT clauses, SQL, 37-38, 41 Data Manipulation Language (DML), 24. distribution, report, 2, 15-16,366. See See also SQL (Structured also e-mail; Web reports Query Language) DML (Data Manipulation Language), 24. DataReader objects See also SQL (Structured ADO.NET, 72-74, 154,286--87 Query Language) ADO.NET for .NET Compact Document objects, 310 Framevvork,598-600 documents DataSet objects Office XP (see Office XP) DataTable objects and, 68-69 paging HTML report, 482-85 OLAP cubes as, 429 security, 3 passing, to Crystal Reports for Visual XML (see XML (Extensible Markup Studio .NET, 154-56 Language) data sources. See also data connections document type definition (DTD), 359, Access report, 344-45,351 361 COM drivers for Crystal Reports, drill-dovvn feature 145-48 ActiveReports for .NET, 300-302 DataTable objects, 68-69 ActiveReports forVB6, 253-54, date and time pickers, Palm OS, 558-59 273-74 date manipulation, SQL, 32 ASP and HTML reporting, 457, 476 date ranges design and, 10 criteria, 75-76 Excel PivotTable crosstab reports, 390 design and, 11 drivers. See also devices dynamic, for crosstab reports, 406--7 COM, 145-48 VB .NET, 98-99 printer, 159, 363-64, 377, 378 DBMSs. See database access DSR files, 236, 280 DCL (Data Control Language), 24,62 dumps. See exporting DDL (Data Definition Language), 24, 62 duplicates, eliminating, 37-38 debugging Pocket PC applications, 581, dynamic controls, 81-82 588-89 dynamic criteria screens, 77, 114-16, Definitive Guide to Excel VBA, 334 449-56,505-15 Definitive Guide to the .NET Compact dynamic crosstab reports, 386, 394-95 Framework, 579 n.1, 627 dynamic date ranges deploying Pocket PC applications, 581, crosstab report, 406--7 586-88 VB .NET criteria screen, 98-99 derived data, 271 dynamic report creation DESCENDANTS function, MDX, 434-35 ActiveReports,256-64,291-97 DESC keyword, SQL, 26, 27 Crystal Reports, 120-34 design, report. See report design designers, report. See report designers E Design Vievv, Access, 335, 340-45 efficiency. See also performance desktop applications vs. Pocket PC appli- Excel crosstab reports, 390 cations,602,609,613,620 high-volume printing, 13

644 Index

report,4 equi-joins, SQL, 51 SQL,62 error message strings, 632 eFinder PQA, 541 Essbase,385,424 elements, XML, 358 Ethernetconnections,588,619 e-mail, 366-76 events disclaimers, 374-75 Access report, 346-50 Lotus Notes, 370-74 ActiveReports for .NET, 288-89 Outlook, 367-70 ActiveReports forVB6, 246-47, Palm applications, 546, 553 249-51 Report CE reports, 624-25 Crystal Reports, 134-35 reporting and, 366 VB .NET handlers, 96-97 setup forms, 375--76 Excel, 322-34 Embeddable Designer Control, Crystal ActiveReportsexport,277 Reports, 135-37 ASP export, 457 eMbedded VISual Tools, 637 books, 334 emptystrings,30-31 Crystal Reports 9 export, 140 emulators efficiency, 390 Palm, 537-40 graphing,327-30 Pocket PC, 581, 587 grid dumping, 330-34 encryption, Web Clipping, 543 PageSetup objects, 309-10 End of Report phrase, 2 PivotTable crosstab reports, 386-90 enterprise reports Preview export, 232 ActiveReports forVB6 and .NET (see spreadsheetexport,322-27,387 ActiveReports for .NET; third-party alternatives, 333-34 ActiveReports for VB6) VS-View export, 206-9 Adobe Acrobat and, 377-84 Excel2002 VBA Programmer's Reference, aesthetics, 3-5 334 criteria screens (see criteria screens) ExecuteReadermethod,72 crosstab reports (see crosstab ExecuteScalar method, 73-74 reports) ExecuteXMLReader method, 74 Crystal Reports (see Crystal EXE files, Crystal Reports, 112 Enterprise 8.5; Crystal Reports exporting. See also parameters 9; Crystal Reports for Visual Access ReportML files, 356-63 Studio .NET) ActiveReports for .NET, 302-4 database access, 63-74 (see also data- ActiveReports for VB6, 276-79 base access) ASPand,457 design, 9-16 Crystal Reports 9, 138-40 e-mail and, 366 (see also e-mail) Crystal Reports for Visual Studio evolution of, 1-2 .NET, 153 international considerations, 6-9 Excel grid dumping, 330-34 .NET Compact Framework and, Excel spreadsheet export, 322-27, 627-38 387 Office XP (see Office XP) Preview, 232 online analytical processing (OLAP), reporting and, 12-13 423-40 (see also OLAP (online VS-View, 205--9 analytical processing)) Extensible Markup Language. See XML for Palms (see Palm reporting) (Extensible Markup for Pocket PCs (see Pocket PC report• Language) ing) external data, 14 Preview for .NET (see Preview for external style sheets, 471-72 .NET) reporting issues, 1-20 F report servers, 16-20 FarPoint Technology, 83, 102 security, 2-3 feature attributes, OLAP, 426 SQL (see SQL (Structured Query Fergus, Dan, 579 n.l Language)) fields, Access subreport linking, 345 VS-View for Visual Basic (seeVS-View fields, summary. See summary fields for Visual Basic) Field Software, 601, 607, 619, 636 Web reports (see Web reports) File Repository Service (FRS), Crystal entities, XML, 358 Reports, 520

645 Index

files FROM clauses, SQL, 24-25, 55-56 ASMX,518 functions, SQL, 38-40 CSS,468-73 aggregate,40-43 Palm formats, 541 mixing aggregate, 44 PDF (see PDF files) search performance and, 39 PQA (see PQAs (Palm Query Applications)) G RDF, 490-91 GDI+ support, .NET Compact ReportML,356-63 Framework, 635 RPT, 110, 112, 143, 149, 520 GDI support, .NET Compact RPX and DSR, 236, 237-38, 280 Framework, 631 RTF, 187-88, 265-68, 297-300 GetLocallnfo API function, 6-8 saving Pocket PC reports in, 605 GET method, 443, 444 temporary, 489 global formatting, VS-View, 163 TTX, 141-42 graphics VB6 FRM, 77-78 ActiveReports for .NET export, 304 filters ActiveReports forVB6, 274-75 Access report, 351-52 .NET Compact Framework support, ActiveReports subreport, 269-71 631,635 criteria screens (see criteria screens) PQA, 551, 560 Report CE, 621-22,623 Preview, 231-32 firehose cursors, 66-68, 72 VS-View, 204 fonts. See also styles graphing, Excel, 327-30 aesthetics and, 3-5 grid dumping, Excel, 330-34 browsers and, 464 GROUP BY clauses, SQL, 38, 44-45 Pocket PC application, 617 grouping footers, report Access report, 346, 350 Access,345-46,350 ActiveReports for .NET, 288-89 ActiveReports subreport, 268 ActiveReports forVB6, 247-51 Crystal Reports 9, 133 Guru's Guide to Transact-SQL, The, 62 Preview, 222 VS-View, 176-77 H foreign keys, 47-49 handheld devices. See Palm reporting; format files, label, 184 Pocket PC reporting formatting Handles keyword, VB .NET, 96-97 Access,348,349,350 HAVING clauses, SQL, 45-46 Crystal Reports, 134-35 headers, report Palm Clipper, 550 Access,345-46,350 Pocket PC HTML reports, 604-5 ActiveReports subreport, 268 reports, 1-2 Crystal Reports 9, 130-31 VS-View, 163, 164 design and, 11-12 Form_Load event, 97,237 Preview, 222 forms VS-View, 176-77 e-mail setup, 375-76 "Hello, World!" PQA, 548-50 .NET Compact Framework classes, help files, criteria screen, 83 629-30 help resources. See books; Palm PQA, 553-54 KnowledgeBase; MSDN Pocket PC applications, 584-85 (Microsoft Developers preprinted, 13 Network); Web sites special variables in Web Clipping, Hewgill, Greg, 537 554-59 Hewlett-Packard, 580 VB6 criteria, 77,82-89 hierarchies, 59-62 forward-only cursors, 66-68, 72 hierarchy, OLAP, 427 free-form text reports. See also mail high-volume printing, 13-14 merge reports horizontal scrolling, 569 ActiveReports for .NET, 297-300 HREF attribute, HTML, 477-78 ActiveReports forVB6, 265-68 HTML (Hypertext Markup Language) Preview, 227-31 reports, 456-85 VS-View, 184-88 ASP, 473-81 FRM files, VB6, 77-78 browser fonts, 464

646 Index

cascading style sheets, 468-73 Java Viewer control, 490 check boxes and controls, 446 Joe Celko's SQLfor Smarties: Advanced CMLvs.,564 SQL Programming, 62 comments and PQAs, 554 joins, SQL, 46-62 documentpaging,482-85 correlated subqueries, 57-58 dynamic criteria screens, 445-56 Crystal Reports 9, 129-30 dynamic (DHTML), 457 Crystal Reports crosstab report, 421-22 features missing in Web Clipping, inner, 51 543-44 n-level trees, 59-62 JavaScript, 466-68 older syntax, 55-56 passing parameters, 442-45 outer, 52-54 for Pocket PC, 601-7 primary keys, foreign keys, and rela- pros and cons of classic, 456-57 tionships, 47-49 snaked column reports, 4 77 self, 54-56 table of contents, 477-81 subqueries, 56-57

tag and, 457-65 table name aliases and, 51 XMLvs.,357 tables and, 46, 49-50 HTTP handlers, ActiveReports Web types of, 46-50 reports and, 499 Just-In-Time (JIT) compiling, 628 hyperlinks. See also URLs "just in time" information, 424 ActiveReports,273-74,275,300-302 ASP,476 K VS-View, 174-76 Kennedy, John, 637 keys, primary and foreign, 47-49 I Knowledge Base IBM, 21 ActiveReports, 237 icons, 551 ASP and COM components, 485 id attribute, CSS, 4 71 crosstab reports, 392 images. See graphics importing, 14. See also exporting L IN clauses, SQL, 37 Label controls, VB6, 88 Index Generation utility, 165 labels, mailing indices, table, 46, 50 Access, 338-40 ink-jet printers, 13 ActiveReports for .NET, 294-97 inline SQL vs. stored procedures, 22-24 ActiveReports for VB6, 260-64 inline styles, 472-73 Preview, 225-27 inner joins, SQL, 51 VS-View, 180-84 integrating reports with Crystal Reports, Word,317-22 149 Labe1Vftzard,Access,336,338-40 internal style sheets, 4 72 laser printers, 13 international considerations, reporting layers, Preview page rendering, 222-24 and,6-9 layout, report, 9-10,250-51 Internet, 441. See also Web; Web reports; left joins, 52 Web sites legal issues, 14-15 Internet Explorer. See also browsers licensing as market standard browser, 446 ActiveReports,235,237,280,291 PDF files and, 489 Adobe Acrobat, 377-78 PocketiE,601-2,606 Crystal Enterprise, 518, 524-29 report snapshots and, 363 Crystal Reports, 111, 126-27, 135, URL length limits, 443 525,530 inventory PQA, 570-77 UKE clauses, SQL, 28-29, 76 IrDA (infrared communication) support Lines, Preview, 219-22 .NET Compact Framework, 631, 635 linking field, Access subreport, 345 PocketPC,619,636 links, PQA, 550-53. See also hyperlinks list boxes J criteria screens and, 76 Janus grid control, 331-33 HTML,447-49 JavaScript IN clause and, 37 check boxes, 446 VB6,86-87 HTML reports, 466-68 VB .NET, 100-101, 104-6

647 Index

ListPro controls, 83, 102 (VBA); Visual Basic .NET (VB ListView control, VB6, 78-81 .NET) logical operators, SQL, 32-33 VVeb sites, 334, 581, 637, 638 Lotus Notes, 370-74 VVindows (seeWrndows) VVord (seeVVord) M migratingVB6 applications to VB .NET, Macro Recorder, 317 149 magnetic ink character recognition MIN function, SQL, 43 (MICR),3 mixing SQL aggregate functions, 44 mailing labels. See labels, mailing Mobile Printing for Pocket PC SDK, 580 mailings, mass, 13-14 mobile solutions. See Palm reporting; mail merge reports. See also free-form Pocket PC reporting text reports MobileVB, 539 Publisher, 317 MSDN (Microsoft Developers Network) VVord,310,317-22 cross tab reports, 392 managed code, 580 MDX,436 many-to-many relationships, 48-49 XML,356,361 margins Multidimensional ActiveX Data Objects. Preview, 215-16 See ADO MD technologies VS-View, 170 multidimensional expressions (MDX), mass mailing, 13-14 429-36 master I detail relationships, 48 multidimensional provider (MDP), mathematical operators, SQL, 27-28 429-30 MAX function, SQL, 43 MDP (multidimensional provider), N 429-30 namespaces MDX (multidimensional expressions), ActiveReports for .NET, 302 429-36 ADO.NET,68 measures, OLAP, 426 Preview for .NET, 209 members, OLAP, 428 System.Data, 590-92 MEMBERS keyword, MDX, 432-33, 434 naming MemoryStream objects, ActiveReports AS clauses and SQL column, 30 VVeb reports and, 499-500 case-sensitive SQL, 25 tags, VVeb Clipping, 545-46 export PDF files, 206 methods JavaScript, 466-67 Command classes, 595, 597 SQL IN clauses and column names, Connection classes, 593, 594 37 .NET Compact Framework method table aliases, 51, 54 overloads, 633 temporary, 489 VS-View, 160, 162-64, 165-69 XML,357 Microsoft native code, 580 Access (seeAccess) nesting tables, 460 Developers Network (see MSDN .NET Compact Framework, 627-38 (Microsoft Developers ADO.NET for (see ADO.NET for .NET Network)) Compact Framework) eMbedded Visual Tools, 637 base classes, 631 Excel (see Excel) binary serialization, 634 Internet Explorer (see Internet Bluetooth support, 631 Explorer) class library, 628-32 Multidimensional ActiveX Data COM component support, 634 Objects (see ADO MD tech• common language runtime (CLR), nologies) 628 newsgroups, 637,638 controls, 585, 629-30, 633 Office XP (see Office XP) data and XML classes, 630 Outlook, 367-70 database support, 634 Publisher, 317 features, 627-28 SQL Server 2000. See SQL Server 2000 features missing from, 632-35 Visual Basic (see Visual Basic 6 (VB6); form-related classes, 629-30 Visual Basic for Applications GDI+ support, 631

648 Index

GDI support, 631 OLAP (online analytical processing), IrDA support, 631 423-40 . limitations, 580--81 connecting to databases with Visual logical components, 632 Basic 6, 436-39 method overloads, 633 connecting to databases with Visual Pocket PC reporting and, 579-81 Basic .NET, 439-40 printing, 635 cubes and DataSet objects, 429 printing and reporting from mobile cubes and dimensions, 426-28 applications, 636 database example setup, 428-29 remoting support, 635 MDP and TDP providers, 429-30 resources,636-37 Microsoft and ADO MD technologies, security, 635 429-39 (see also ADO MD SQL Server CE and, 637-38 technologies) Visual Basic support, 632 multidimensional expressions Web services, 630-31, 635 (MDX), 430-36 Wmdows registry access, 634 multidimensional views, 424-26 XML functionality, 633 online transaction processing vs., network printers, Pocket PC reporting 423-24 and,619 real-time relational (ROLAP), 427 newsgroups, Microsoft, 637, 638 SQL statements vs. MDX expressions, n-level trees, SQL, 59-62 436 Northwind Mobile Pocket PC appli- uses,424 cation, 613-19 OleDbDataReader objects, 72 Notes, 370-74 OLE DB providers, 429 notifications, e-mail, 366 OLTP (online transaction processing), NOT operator, SQL, 32-33 423-24,436 NSBasic/Palm, 539 one-to-many relationships, 48 Null values, SQL, 30-31,73 one-to-one relationships, 49 numbers,page,176,456-57 online analytical processing. See OLAP (online analytical processing) 0 online transaction processing (OLTP), object browser, Crystal Reports RDC, 423-24,436 112 operators, SQL objectives, report, 9 logical, 32-33 object models mathematical, 27-28 ADO.NET for .NET Compact optimizers, query, 49-50 Framework,589-600 Oracle Crystal Reports 9, 111-12, 121-22 column concatenation, 30 Excel,334 crosstab reports, 395-96 .NET Compact Framework (see .NET joins, 52 Compact Framework) keys,47 Word, 310-13 OLAP and, 424 Office XP, 307-76 T-SQL,22 Access (see Access) ORDER BY clauses, SQL, 26-27 attached e-mail disclaimers, 374-75 orientation,page,163,170,216 converting documents to PDF, OR operator, SQL, 32-33 37~1 outer joins, SQL, 52-54 displaying PDF files, 381-84 Outlook, 367-70 e-mail setup forms, 375-76 Outlook 2000 VBA Programmers e-mail tools, 366-76 (see also e-mail) Reference, 370 Excel (see Excel) overloads, method, 633 Lotus Notes and, 370-74 Macro Recorder, 317 p Outlook, 367-70 Page event, Access, 348 PageSetup objects, 309-10 page rendering layers, Preview, selecting appropriate references, 222-24 307-9 pages Web Services Toolkit, 334 criteria, 2 Word (see Word) linking PQA, 550-52

649 Index

page setup passing ADO.NET DataSets directly ActiveReports for .NET, 287-88 to Crystal Reports for Visual ActiveReports for VB6, 242-46 Studio .NET, 154-56 Office XP PageSetup objects, 309-10 passing ADO Recordsets directly to Preview, 215-22 Crystal Reports 9, 140-48 VS-View, 163,170-74, 176 subqueries as, 56-57 pagination, 176, 456-57 parent/ child relationships, 48 paging parsers, XML, 360-61 ASP.NET DataGrid report, 505 passwords, Lotus Notes, 374 HTML document, 482-85 PCDATA (parsed character data), XML, VS-View, 176 358 Palm Programming in Basic, 577 PDAs (personal digital assistants), 16, Pahnreportin~535-77 535. See also Pahn reporting; application flow, 563-65 Pocket PC reporting baud rate, 573 PDBs (Pahn database files), 541 building forms, 553-54 PDF Creator and PDF Converter, 384 building "Hello, World!" PQA, 548-50 PDF files building Web Clipping applications, Access PDF reports, 363-64 559 ActiveReports for .NET export, 303-4 built-in Pahn OS date and time pick• ActiveReports for VB6 export, 276 ers, 558-59 ASP export, 457 complex inventory report example, creating and viewing, 384 (see also 570-77 Adobe Acrobat) creating PQA applications, 547-48, Crystal Reports 9 export, 153 550-65,565-77 Internet Explorer and, 489 HTML comments, 554 Preview export, 232 HTML features missing from Web print width, 409 Clipping, 543-44 VS-View export, 205-6 emulators and simulators, 537-40 Web reports and, 485 formatting text, 550 percent sign(%), 76, 184 linking pages, 550-52 performance. See also efficiency linking to applications, 552-53 functions and SQL search, 39 Pahn OS platform, 535-37 OLAP,426 running PQAs from command line, personal digital assistants (PDAs), 16, 556-57 535. See also Pahn reporting; server-side HTML considerations, Pocket PC reporting 559-61 Picture controls, 204 simple zip code search example, Plnvoke,634 565-70 Pitney-Bowes, 13-14 special variables in Web Clipping PivotTable objects, Excel, 327, 386-90 forms, 554-59 Pocket Access, 600 summary or subset reports, 570 Pocket1E,601-2,606 testing PQAs, 561-63 Pocket PC reporting, 579-626 Web Clipping tags, 545-46 accessing data, 589-600, 603-4 (see Web Clipping security, 543 also ADO.NET for .NET Web Clipping technology, 540-43 Compact Framework) paper bins adding code to applications, 586 ActiveReports, 244 controls, 585 Preview, 216 creating projects, 582-84 VS-View, 170-71 debugging applications, 588-89 paper sizes, 6, 244-45 designing forms, 584-85 parameters desktop applications vs. Pocket PC ActiveReports subreport, 270-71 applications, 602, 609, 613, Command object, 65, 70-71 620 Crystal Reports runtime, 114 Ethernet connections and, 588 passing, in Crystal Reports for Visual HTMLreports, 601-7 Studio .NET, 152 .NET Compact Framework and, passing, in Web report criteria 579-81, 585 (see also .NET screens, 442-45 Compact Framework)

650 Index

PrinterCE.NetCF component, 608-19 PrinterCE object, 612 printing reports, 607 printing with, 609-12,619 Report CE, 619-25 printers report tools, 580, 600-601 drivers, 159, 363-64, 377, 378 SQL Server CE and, 637-38 network, 619 testing applications, 586--88 selecting (see printer selection) Visual Studio .NET solutions, 581-89 types of, 13 pooling, connection, 63, 67 printer selection POSE (Palm Operating System ActiveReports, 245-46, 288 Emulatofj,537-40,561-63 Pocket PC reporting and network positioning, HTML, 458 printers, 619 PQAs (Palm Query Applications), 541. Preview, 216-17 See also Palm reporting PrinterCE.NetCF, 611 building forms, 553-54 VS-View, 172 building "Hello, World!" simple, printing 548-50 Access Print event, 348, 350 file format, 541 crosstab reports, 396 (see also formattingtext,550 crosstab reports) linking pages, 550-52 high-volume, 13-14 linking to other applications, 552-53 print preview, 12 (see also report pre• running, from command line, 556-57 view) server-side considerations, 559-61 Pocket PC (see printing, Pocket PC) special variables in Web Clipping settings (see print settings) forms, 554-59 printing, Pocket PC, 607-25 steps for creating, 547-48 with code, 607 using built-in Palm OS date and time with .NET Compact Framework, 635, pickers, 58-59 636 Web Clipping applications and, with PrinterCE.NetCF, 608-19 540-41, 559, 563-65 (see also with Report CE, 619-25 Web Clipping) print settings PRCs (Palm resource files), 539, 541 ActiveReports for .NET, 287-88 Prepare method, 71-72 ActiveReports for VB6, 242-46 preprinted forms, 13 PDF files, 409 previews. See report preview Private dimensions, OLAP, 428 Preview for .NET, 209-32 procedures, stored. See stored proce- borders and lines, 219-22 dures components, 209-10 profiles,device,581 creating reports, 212-14, 225-31 projects, Pocket PC, 582-84 crosstab reports, 396-404 properties exporting data, 232 Command classes, 596, 597 free-form text, 227-31 Connection classes, 593, 594 headers and footers, 11-12, 222 VS-Viewpage, 163 labels, 225-27 Property List control, ActiveReports for margins, 215-16 VB6,255-56 pagesetup,215-22 providers paper bins, 216 ADO.NET,69 printer driver, 159 OLAP, 429-30 ptinter selection, 216-17 proxies, Web Clipping, 543, 562, 563-65 rendering layers, 222-24 Publisher, 317 simple columnar reports, 212-14 push vs. pull reporting, 16 text styles, 217-18 using graphics, 231-32 Q VS-Viewvs., 159,210-12 (see also queries, SQL. See also SQL (Structured VS-View for Visual Basic) Query Language) primary keys, 47-49 Access report, 343-44 PrinterCE.NetCF component, 607-19 correlated subqueries, 57-58 features,607,608 creating, 547-50 Northwind Mobile application, crosstab (see_crosstab reports) 613-19 data-bound reports and, 144

651 Index

queries, SQL (Continued) generating reports, 620-22, 625 optimizers, 49-50 report design, 9-16 subqueries, 56-57 availability and distribution, 15-16 Query Application Builder (QAB), creating report specifications, 9-12 547-48,549-50 export options, 12-13,322,333 queues, report, 18 external data, 14 quotes ('"'), 4 70 high-volume printing, 13-14 quotes, single ('), 25 preprinted forms, 13 legal issues, 14-15 R VB6 criteria form, 82-89 range rowsets, OLAP, 430 Report Designer Component (RDC), ranges of values, BETWEEN clause and, Crystal Reports, 111-16 36-37 report designers RDBMSs. See relational databases Access,335,340-45 RDC. See Report Designer Component ActiveReports for .NET, 304-5, 497 (RDC), Crystal Reports Active Reports for VB6, 280 RDF (Report Document Format) files, Crystal Reports, 111-16, 135-37, 490-91 142-43 reading. See books VS-View, 235 real-time OLAP, 427 ReportDocument objects, Crystal Real World PDF with Adobe Acrobat 5, Reports, 149-50 384 reporting issues, 1-20. See also enter• record access, restricting, 3, 42 prise reports Recordset objects, ADO, 66-68 aesthetics, 3-5 extracting, for Access reports, 364-66 design, 9-16 (seeal`soreport extracting, for Excel spreadsheets, design) 387 dynamic report creation (see dynamic passing, to Crystal Reports 9, 140-48 report creation) ReCrystallize Pro, 529-33 history of, 1-2 redirection, 442-43, 490 international considerations, 6-9 references print preview, 12 (see also report pre- Office XP, 307-9 view) Outlook, 368 report servers, 16-20, 519, 526-28 PrinterCE.NetCF component, 609-10 report specifications, 9-12 refresh, browser, 606 security, 2-3 registry tools, 442, 539, 600-601 Crystal Reports repository and, ReportML documents, 356-63 119-20 report preview Lotus Notes passwords, 374 print preview, 12 .NET Compact Framework and, 634 VB6 criteria screen, 89 relational databases VS-Viewscreens, 202-4 Access (see Access) report section events, ActiveReports for accessing (see database access) VB6, 249-51 Oracle (see Oracle) Report Viewer, Crystal Reports, 112 relational OLAP (ROLAP), 427 Report WIZard, Access, 335-38 SQL and, 21 (see also SQL (Structured repository, Crystal Reports, 117-20, 520 Query Language)) Retreat event, 348, 350 SQL Server (see SQL Server 2000; SQL RichEdit control, 265-68 ServerCE) RichTextBox control, 297-300 relationships, table, 47-49, 129-30 right joins, 52 remote debugging, 581,589 ROM images, Palm, 538 remoting support, .NET Compact Roof, Larry, 579 n.1, 627,636 Framework, 635 rowsets, OLAP, 430 rendering layers, Preview page, 222-24 ROWSPAN command, 462-64 Render methods, Preview, 214, 227-29, RPT files, Crystal Reports, 110, 112, 143, 231 149,520 Report CE, 619-25 RPXfiles, 236,237-38,280 adding reports to Pocket PC appli• RTF files, 187-88, 265-68, 297-300 cations, 623-25 runtime features, 619-20 ActiveReports, 256

652 Index

Crystal Reports, 111 shading instantiation of objects, 94-97 ActiveReports for VB6, 27 4-75 report creation (see dynamic report aesthetics and, 5 creation) Pocket PC application, 616 Runtime Designer control Shared dimensions, OLAP, 428 ActiveReports for .NET, 304-5 simple columnar reports. See columnar Active Reports for VB6, 280 reports simulators, Palm, 537-40, 554 s single quotes('), 25 sample applications sizes, paper, 6, 244-45 ActiveReports, 237,411 skins, Palm, 538 OLAP, 428 Smart Dev1ce Application template, Palm PQA, 548-50 582-84 PocketPC,601-7,613-19,620-25 smart devices, 580, 627 VS-View and Preview, 165 SmartPhone, 580,581,627 saving Pocket PC HTML reports, 605 Smart Tag Enterprise Resource Toolkit, scheduling reports, Crystal Enterprise, 334 523-24 snaked column reports schema rowsets, OLAP, 430 HTML,477 schemas,~L,359-60 VS-View, 188-94 screens, criteria. See criteria screens Snapshot Viewer, 363,490 screens, VS-View report preview, 202-4 Solutions Explorer, 149 scrolling, horizontal, 569 sorting search performance, SQL, 39 Access report, 352-53 search strings, SQL, 25 ASP.NET DataGrid report, 503-4 sections, report ORDER BY clause, 26-27 Access,345-46,348-50 specifications, report, 9-12 ActiveReports, 247-48 speed. See performance Crystal Reports, 134-35 sp_makewebtask stored procedure, 445 security SpreadBuilder objects, 277-79,333 Lotus Notes passwords, 374 spreadsheet export, Excel, 322-27, 387. .NET Compact Framework, 635 See also Excel reporting and, 2-3 SQL (Structured Query Language), 21-63 report server, 20 ActiveReports for VB6 crosstab restricting record access, 3, 42 reports, 404-6 SQL injection, 444-45 aggregrate functions, 40-44 SQL vs. stored procedures, 23-24 BETWEEN clauses, 36-37 Web clipping, 543 books, 62-63 Selection objects, 312 building VB6 WHERE clauses, 89-94 SELECT statements building VB .NET WHERE clauses, MDX,430-31 102-6 SQL, 24-25, 32, 33-34 case-sensitive naming, 25 self joins, SQL, 54-56 column concatenation with AS semicolon(;), 470 clauses, 29-30 serialization, binary, 634 correlated subqueries, 57-58 servers. See also clients crosstab report, 385-96 (see also Crystal Enterprise licensing and, crosstab reports) 524-29 date manipulation, 32 Crystal Reports automation, 112-16 DESC keyword, 27 HTML considerations for PQAs, DISTINCT clauses, 37-38 559-61 DML, DDL, and DCL, 24, 62 report, 16-20, 519, 526-28 efficiency, 62 server-based Web reports, 441-42 extracting Recordsets, 387 server-side ASP.NET controls, 500 features, 21-22 server-side cursors, 67 functions within, 38-40 server-side validation, 76 GROUP BY clauses, 44-45 Web Clipping and, 542-43 HAVING clauses, 45-46 Session variables, 443-44 IN clauses, 37 setup, page. See page setup inline (embedded), vs. stored proce• setup forms, e-mail, 375-76 dures,22-24

653 Index

SQL (Continued) opening Pocket PC connections to, inner joins, 51 594-95 joins, 46-62 provider for Pocket PC applications, LIKE clauses, 28-29 591-92 logical operators, 32-33 standard columnar reports. See colum- mathematical operators, 27-28 narreports MDXvs.,436 standard members, OI.AP, 428 mixing aggregate functions, 44 static crosstab reports, 386, 392-93 n-level trees, 59-62 stored procedures Null values, 30--31 Command objects and, 70--71 older join syntax, 55-56 document paging with, 482-85 ORDER BY clauses, 26-27 inline SQL vs., 22-24 outer joins, 52-54 security issues in Web reports, 445 primary keys, foreign keys, and rela• Structured Query Language. See SQL tionships, 4 7-49 (Structured Query Language) restricting record access, 42 Studio for Mobile Devices, 580 retrieving statements from data• styles bound reports, 144 Access, 337-38 search performance and functions, cascading style sheets, 468-73 39 HTML,465 SELECT, FROM, and WHERE key• Preview, 217-18 words, 24-25, 33 Style objects, 312-13 self joins, 54-56 VS-View, 172-74 single quotes within search strings, subqueries, SQL, 56-58 25 subreports SQL injection security, 444-45 Access subreport controls, 345 subqueries, 56-57 ActiveReports for .NET, 300 table name aliases, 51 ActiveReports forVB6, 268-71 tables and joins, 46, 50 SUM function, SQL, 43 triggers, 24 summary fields UNION clauses, 33-36 Access report, 353-54 VB6 WHERE clauses, 89-94 ActiveReports for .NET, 288-89 VB .NET WHERE clauses, 102-6 ActiveReports forVB6, 251-52 SqlCeCommand class, 597-98 Crystal Reports 9, 133-34 SqlCeConnection class, 594-95 designing, 10 SqlCeDataReader class, 599-600 symbols, VS-View formatting, 164 SqlCommand class, 74, 595-96 syntax, SQL join, 55-56 SqlConnection class, 592-93 System.Data namespace, 590--92, 630 SqlDataReader class, 72, 598-99 System.Data.OleDb namespace, 68 SQL injection security, 444-45 System.Data.SqlClient namespace, fi8 SQL Server 2000 System. Drawing namespace, 215, 6~!9 Access report filters and, 352 System. Web namespace, 630--31 Analysis Services, 427,428-29 System.Wmdows.Form base class, 94 crosstab reports, 392-95 System.Windows.Forms namespace, 629 executing Pocket PC commands System.XML namespace, 68, 630 against, 596 keys, 47 T OLAP and, 424 TableCell method, VS-View, 162, 165-69 opening Pocket PC connections to, Table method, VS-View, 162 593 table of contents provider for Pocket PC applications, ActiveReports for .NET, 289-90 590--91 ActiveReports forVB6, 252-254 T-SQL (Transact-SQL), 22, 60--61, ASP and HTML, 477-81 62-63,392-95 tables SQL Server CE aliases, 51 executing Pocket PC commands data entry screen, 12 against, 598 HTML,457-65 .NET Compact Framework and, 632, joins and, 46, 50 (see also joins, SQL) 634,637-38 Preview for .NET Table objects, 212

654 Index

primary keys, foreign keys, and rela• user-defined functions, SQL, 40 tionships, 47-49, 129 user interface considerations, criteria VS-View, 162, 165-69 screen, 75-76 . Word Table objects, 313-17

tag, HTML, 457-65 v tabular data provider (TOP), 430 validation,75-76 tabular reports, Access, 336, 337 variable length column reports, VS-View, tags 194-202 HTML (see HTML (Hypertext Markup variables Language) reports) Session, 443-44 ReportML, 362 in Web Clipping forms, 554-59 XML,357-58 VB6. See Visual Basic 6 (VB6) templates VBA. See VISual Basic for Applications Crystal Reports 9, 109-10 (VBA) Visual Studio .NET, 581 VB .NET. See Visual Basic .NET (VB temporary filenames, 489 .NET) testing . Viewer browser, 564 Pocket PC applications, 586-88 Viewer control PQAs, 561-63 ActiveReports for .NET, 290, 414 text. See also fonts ActiveReports for VB6, 254-55 formatting Palm, 550 (see also for• Crystal Reports 9, 112-13 matting) viewing reports free-form (see free-form text reports) Crystal Reports 9, 112 styles (see styles) Crystal Reports for Visual Studio text boxes .NET, 150-51 criteria screens and, 76 views, database padding for ActiveReports for .NET, multidimensional OLAP views, 285 424-26 third-party Excel alternatives, 333-34 OLTP views, 424 threads, security, 3 Visual Basic 6 (VB6) time and date pickers, Palm OS, 558-59 ActiveReports for (see Active Reports time dimension, OLAP, 427 forVB6) toolbox calling Access reports from, 354-56 Access Report Designer, 341 check boxes, 88-89 ActiveReports for .NET, 281-82 combo boxes, 87-88 toolkits, Office XP, 334 connecting to OLAP databases, tools 436-39 Palm,539 criteria form design, 77, 82-89 Pocket PC, 600--601 data-driven programming, 77-82 Web-based reporting, 442 list boxes, 86-87 trees, n-level, 59-62 Crystal Reports for (see Crystal triggers, 24 Reports 9) T-SQL ('D:ansact-SQL), 22, 60--61, 62-63, Office XP references, 307-8 392-95 SQL WHERE clauses, 89-94 TTXfiles, 141-42 VS-View for (see VS-View for Visual twips, 166,170 Basic) Visual Basic for Applications (VBA), 317 u calling Access reports from, 354-56 unbound reports, ActiveReports for VB6, Office XP and, 307 (see also Office XP) 238,271-73 Office XP toolkits, 334 UNION clauses, SQL, 33-36 Visual Basic .NET (VB .NET) unique values, DISTINCT clause and, ActiveReports for (see ActiveReports 37-38,41 for .NET) unmanaged code, 580 calling Access reports from, 354-56 UPPERO function, SQL, 38-39 connecting to OLAP databases, URLs. See also hyperlinks 439-40 Crystal Enterprise and, 523 criteria screens, 94, 97-101 length limits, 443 data-driven programming, 94-97 passing parameters in, 442-43 date ranges, 98-99

655 Index

Visual Basic .NET (Continued) Web list boxes, 100-101 browsers (see browsers) migrating Crystal Reports reports W3C consortium, 469 from VB6 to, 149 PDF document conversion, 381 .NET Compact Framework and, 632 reports (see Web reports) Office XP references, 308-9 services (see Web services Preview for (see Preview for .NET) sites (see Web sites) SQL WHERE clauses, 102-6 Web Browser 2.0, 540 Visual Studio .NET WebCache feature, ActiveReports, Crystal Reports for (see Crystal Reports 491-97 for Visual Studio .NET) Web Clipping device-specific features, 581 applications, 559-61, 563-65 .NET Compact Framework and, HTML features missing from, 543--44 579-81,585 as Palm technology, 540--43 Pocket PC form design, 584-85 PQAs and, 559, 563 (see also PQAs Pocket PC projects, 582-84 (Palm Query Applications)) Pocket PC solutions, 581-89 (see also security, 543 ADO. NET for .NET Compact special variables in forms, 554-59 Framework) Web Clipping Application Viewer, printing with PrinterCE.NetCF, 609-12 540--41 testing and deploying Pocket PC WebFocus Web site, 442 applications, 586-88 tag,515-16 vsLabeler tool, 184 Web reports, 441-533 VSPrinter control, VS-View, 202--4 ActiveReports for .NET, 497-500 VS-View for Visual Basic, 159-209 Active Reports for VB6, 49D-97 components, 159-60 ActiveX DLLs and EXEs, 485-89 creating reports, 160-65, 177-202 advantages, 15-16 crosstab reports, 396--404 ASP.NET, 500-518 cursor position, 172 criteria screens (see criteria screens, exporting data, 205-9 Web) formatting symbols, 164 Crystal Reports, 518-33 free-form text, 184-88 HTML and ASP (see HTML (Hypertext global formatting, 163 Markup Language) reports. headers and footers, 11-12, 176-77 Internet Explorer and, 446 hyperlinks, 174-76 PDF files and Internet Explorer, 4B9 labels, 180-84 ReCrystallize Pro, 529-33 margins, 170 server-based applications, vs. client paper bins, 170-71 applications, 441--42 Previewvs., 159,210-12 (see also SQL injection security, 444--45 Preview for .NET) Web site help, 442, 446 printer driver and, 159 Web services printer selection, 172 ASP.NET reporting and, 515-18 report designer version, 235 Crystal Reports 9, 518-19 report preview screen, 202--4 .NET Compact Framework, 630-3ll, sample applications, 165 635 setting up pages, 170-74 Office XP and, 334 simple columnar reports, 160-65 printing from mobile applications, snaked column reports, 188-94 636 standard columnar reports, 178-80 Web sites TableCell method features, 162, activePDF, 384 165-69 Adobe Acrobat, 363, 381, 489 Table method, 162 ADOCE,590 text styles, 172-74 AfalinaSoft Active XL Report Pro, 333 using graphics, 204 Amayuni Technologies PDF Creator, variable length columns, 194-202 384 VS-View Reporting Edition, 235 Apress, 7, 104, 127, 142, 202, 209, 2:32, 277,367,397,476,601,608, w 613,620 watermarks,364 AR Consulting, 17 WCA Builder, 547--48, 549-50 browser statistics, 446

656 Index

Certicom, 543 Crystal Reports 9, 109 color issues, 12 Cube WIZard, 429 columns by Russ Whitney, 436 Dimension WIZard, 429 Copilot, 537 Smart Device Application WIZard, Crystal Decisions, 127, 523 582-84 Data Dynamics, 235, 237, 286 Word, 310-22 eFinder PQA, 541 Adobe PDF file conversion, 378-81 Essbase, 385 book,322 FarPoint Technology, 83 mail merge and mailing labels, Field Software, 608, 619 317-22 Janus, 331 objects, 310-13 HTML,458 PageSetup objects, 309-10 Mlicrosoft,334,581,637,638 RTF documents, 265-66 MSDN, 356, 361,436 Table objects, 313-17 .NET Compact Framework, 636-37 Word 2000 VBA Programmer's Reference, OLAP, 423 322 Palm,537,539,547,562 wrappers, class, 78-81,94 Pitney-Howes, 14 ReCrystallize Software, 529 X SmartPhone, 581 XML (Extensible Markup Language) SQL,21, 62 ActiveReports and, 238, 240--42 SQL Server CE, 637-38 Crystal Reports repository and, SYWARE,620 117-20 Web-based reporting tools, 442 DataReader objects, 72, 74 WebViewer control, ActiveReports, documents,357-59 497-99 features, 357-61 WHERE clauses, MDX, 431 namespace, 68 WHERE clauses, SQL, 24-25, 33 .NET Compact Framework classes, buildingVB6,89-94 630,633 buildingVB .NET, 102-6 ReportML and, 356-63 HAVING clause and, 46 schemas, 359-60 old join syntax, 55-56 XML Path Language, 242 Whitney, Russ, 436 XML Schema Definition (XSD) docu• wildcards, UKE clause, 28-29 ments, 154-55, 361 Wrndows XML Stylesheet Language Regional Settings, 6-9 Transformation (XSLT) files, registry (see registry) 356-57,360-61 SQL Server CE and, 637 XML Web Services. See Web services Wrndows CE, 580, 606, 628 xp_cmdshell stored procedure, 445 wireless communication, 540 wizards z Access Crosstab Query WIZard, 392 zero-sum rows and columns, crosstab Access Label WIZard, 338-40 report, 396 Access Report WIZard, 335-38 zip code search PQA, 565-70

657