Mimic Popular Scheduling Apps
OfficeWriter 2.0 Enterprise Edition, which bundles SoftArtisans' ExcelWriter and WordWriter products, delivers custom documents over Internet Information Services (IIS).
Janus Systems' Windows Forms Controls for Microsoft .NET provides a remarkable set of UI tools that let you develop applications that mimic the look and feel of popular apps such as Microsoft Excel, Outlook, and Project (see Figure 1). These tools are flexible, easy to use, and do a good job of giving end users control without requiring you to do extensive coding.
Windows Forms Controls includes the GridEX Control, Schedule Control, Timeline Control, and UI Controls. Each is supported by solid documentation and an exhaustive set of tutorials with both C# and VB.NET samples. You should have no difficulties learning to use these controls. Further, each control has a comprehensive set of events, methods, and properties for full runtime control. The controls are fully configurable within .NET's design-time interface.
The time-related controls are the most impressive. The CalendarCombo Control gives you drop-down calendar control seen in applications such as Outlook. The Schedule Control is similar to Outlook's appointment calendar, and the Timeline Control is similar to the Microsoft Project Gantt timeline. These controls are ideal for applications that need to give end users the ability to track delivery dates, scheduling dependencies, or other time-related relationships.
The GridEX Control is a fully functional hierarchical grid ideal for users who like to work in a table-oriented format similar to an Excel spreadsheet. GridEX fully supports runtime grouping, filtering, master-detail data relations, databinding, and a number of editing controls. Like the time-related controls, it supports printing and resizes itself intelligently.
The toolkit also includes several other controls, such as button bars, a panel manager, a tab control, and an explorer bar. Each is solid, flexible, and easy to use. Note that as the product name implies, these controls work within a Windows Forms environment and not within ASP.NET.
Janus' support is extremely responsive, and I encountered no language difficulties working with this Panamanian corporation. Note that Janus does not usually offer phone support at this time. The only problem I encountered with the product was during the installation. I mistyped the license key, but the installation continued until the end when an error message appeared and the product uninstalled itself.
Janus Windows Forms Controls for Microsoft .NET is a strong set of tools that are particularly helpful when your application deals with time-related data and dependencies.
Windows Forms Controls for Microsoft .NET
Quick Facts: Toolkit of visual components for VS.NET.
Pros: Tools are flexible and easy to use; the scheduling and timeline controls are particularly impressive.
Cons: Installation needs better error handling.
Enhance .NET Controls
by David Mack
With .NET and Windows Forms, graphical user interface (GUI) programming has become easier. However, there's still room for improvement with the current set of .NET controls, and that's where DBI's NavTools 3.0 comes in. It gives you a suite of controls, such as dbiListBar, dbiButton, dbiScroll, and dbiTabs, which you can use to enhance your interfaces in C#. You can also use NavTools with Visual C++ 6.0. DBI provides the same controls for it using ActiveX.
The installation of NavTools is easy to follow. Make sure to pay attention at the beginning if you don't want to install all the samples. I went to the DBI Web site first to evaluate the company's technical support. I always look at a company's knowledge base to get a feel for what problems might occur with the software. DBI's knowledge base was under the "FAQ - Technical" section, which was a little confusing. (It seems more intuitive to have it as a separate link.) NavTools doesn't require you to add the license explicitly to the code to use its controls. You need one assembly to distribute the .NET controls. And if you're using COM controls, you'll need MFC42.dll and MSVCRT.dll to distribute them.
I implemented the dbiListBar to see how easy it would be to create an Outlook-style application. Most controls from other vendors allow you to create only one column of images on the left, but NavTools allows you to create as many columns as you want. You use the dbiButton to create a button that is more intuitive than a simple word label. I was impressed with the many ways you can configure a button. NavTools provides built-in "arrow" buttons as well as transparent buttons. Another cool feature is the tool's capability to attach a sound effect to a mouse-over event.
dbiScroll adds style to your user interface. The faded scroll is the most notable, because you don't see it on many interfaces. It's definitely something that will catch the user's eye. dbiScroll provides scroll tips that give you a numerical counter associated with your location, and you can replace the scroll tips with text instead of numbers. You can also put a custom image on your control.
dbiTabs enables you to make the most enhancements (see Figure 1). You can choose the size and color for each individual tab. For example, you won't be forced to use a shorter text phrase than you want because it won't fit in the user interface, because dbiTabs uses text wrapping. I was impressed with dbiTabs' capability to "hot track," which is when you highlight a tab on mouse-over events automatically. I could change the location of my text and image on a tab-by-tab basis. dbiTabs also supports multiple-level tabs. If you're using tabs in your interface, this feature helps you enhance your interface (as opposed to using the standard tab control in Windows Forms).
DBI provides a nice suite of controls for you to use. It gives you the flexibility and control that you want in your interface, and implementing the controls into an existing interface is easy and definitely worth the money.
DBI Technologies Inc.
Quick Facts: Controls to enhance the user interface, ActiveX, and .NET controls.
Pros: Easy to use and lots of customization for each control.
Cons: Support on the Web site could be improved.
About the Author
David Mack is a technical lead for the National Intelligence Division of Titan Systems and an independent consultant. He has more than 10 years of experience in object-oriented programming. Reach him at [email protected].
Create PDFs From HTML Markup
by Ken Cox
DynamicPDF Generator for .NET is a class library that helps you create data-driven PDF documents from scratch without needing Adobe Acrobat. You can send the generated PDF content to the file system, a Stream object or a browser. The library is written in C# and doesn't use COM, which means it supports easy XCOPY deployment without requiring intervention by an administrator.
Building PDFs on the fly using libraries tends to be a code-intensive task because you must create many objects to hold content such as labels, tables, and graphics. Then, you do much of the formatting manually by creating styles you can apply to the text. After you design the elements, you use more code to add them to pages and add the pages to the document.
Generator's Enterprise version makes text insertion easier because it includes an HTMLTextArea object that understands and parses a simple subset of HTML tags (see Figure 1). You assign a string of text with HTML markup to the HTMLTextArea object, and Generator converts the HTML into PDF code at run time and inserts it into the flow. I assembled a custom PDF creator application in minutes by dropping a free HTML editor on a WinForms page and passing its markup to Generator. You have to restrict your HTML to standard fonts and bare-bones formatting (such as bold and colors). For example, the object understands <B> but not <STRONG>. Even with the limitations, it's better to let users create and insert blocks of text for PDFs so you can avoid the coding grunt work.
Generator accommodates headers and footers efficiently by exposing Template objects that contain elements that appear on all pages. The companion EvenOddTemplate class encapsulates content that appears only on an odd- or even-numbered page. You can define individual sections and apply only the elements that you need within them for finer control of the common content.
You place objects you want Generator to generate at coordinates relative to the top left of the page. Fortunately, you don't need to pinpoint the start of every paragraph; the HTMLTextArea and regular TextArea objects support text continuation so that their content flows into subsequent columns and pages automatically.
ceTe Software offers a progressive licensing policy. A Server license lets you install one copy on a production server and any number of copies on development machines. For a slightly higher fee, the Developer license permits a single developer unlimited, royalty-free distribution with an application. The only downside is that you need the costlier Enterprise edition to password-protect and encrypt generated PDFs.
DynamicPDF Generator 3.0 for .NET
Phone: 800-631-5006; 301-656-1331
Price: $999 for Enterprise Developer license
Quick Facts: .NET class library for creating PDF files from scratch.
Pros: Pure .NET implementation; parses simple HTML markup; includes template object for common features; fair and progressive licensing options.
Cons: Password and encryption features are available only in Enterprise version.
Serve Word and Excel Documents Safely
by Ken Cox
Excel and Word components make good reporting solutions for desktop users, but using them on the server side can be unreliable, especially as you scale up beyond a simple mail merge. The hazards are well known to anyone whose unattended, data-driven server application has stopped cold because a COM-based Word component threw up an errant modal dialog box.
OfficeWriter 2.5 Enterprise Edition bundles SoftArtisans' ExcelWriter and WordWriter products (see Figure 1). The package is designed to deliver huge volumes of custom documents ("100,000 reports per hour," according to SoftArtisans) over Internet Information Services (IIS)all without requiring Office on the server. However, it does require programming. In a simple scenario, you build a spreadsheet or chart in Excel and insert syntax such as "%%=$RecipientName" into the cells to serve as data markers. You then point the spreadsheet object to an ADO.NET data set using the SetDataSource method, bind the data, and push out a custom spreadsheet.
Databinding in WordWriter is easier because you populate Word's existing mail-merge fields. Be aware that OfficeWriter's documentation uses the term "template" for a regular Excel spreadsheet or Word document that has OfficeWriter formatting. It's not referring to Microsoft's DOT or XLM files.
Your server-side code can create rich documents on the fly with OfficeWriter, including pivot tables in spreadsheets and embedded images in Word documents. Companies moving to SQL Reporting Services will want to investigate OfficeWriter's tools for creating and delivering reports with Microsoft Office.
Data in OfficeWriter doesn't have to be one-way or read-only. ExcelWriter features "HotCells" in worksheets. You mark cells as editable and insert a macro button so users can post their changes back to a remote data source. The data source's URL can be delivered dynamically as an embedded field in the spreadsheet.
ExcelWriter and WordWriter run fine in .NET, but you don't get Xcopy deployment or administrator-free installation. The ExcelApplication object, called when generating a spreadsheet from scratch, uses COM through .NET Interop. For managed code apps, stick to the ExcelTemplate object even though it limits you to inserting data into existing Excel files.
OfficeWriter works as advertised and includes usable, commented samples and adequate documentation. SoftArtisans charges $6,000 per CPU for the Enterprise version I tested here. If you choose the Standard edition at $2,795 per server, watch out for missing high-end features and restrictions on how much you can output in a day.
OfficeWriter 2.5 Enterprise Edition
Price: $6,000 per CPU for Enterprise Edition; $2,795 for Standard Edition; $799 for Limited Edition
Quick Facts: Reads and serves database-driven Excel spreadsheets and Word documents from a Web application; doesn't require Microsoft Office components.
Pros: Creates scalable reporting applications; generates Office-compatible files; Enterprise version allows data updates from Excel.
Cons: Not entirely managed code; no Xcopy deployment; expensive.